qd

js比对两个table的tbody的数据,一个字段是否有相同的,或其他

微笑、不失礼 提交于 2020-02-26 18:36:28
<html> <header> </header> <body> <!-- 装备清单 --> <div id="zbqd"> <table border="1" cellspacing="0" style=" border-collapse: collapse;font-size: 14px;"> <thead> <tr> <th colspan="3" height="40px;" style="width: 295px;">装备清单</th> <th colspan="1" align="center" style="width: 70px;"> <input type="button" id="ok" class="optInput" value="调拨" onclick="pushEq()" /> </th> </tr> </thead> <tbody id="qdtbody"> <tr> <th align='center' style='width: 120px;'>装备名称</th> <th align='center'>数量</th> <th align='center' style='width:47px'>调拨数</th> <th align='center' style='width: 156px;'>存放地址</th> </tr> <tr id="1">

行转列笔记

空扰寡人 提交于 2019-12-18 07:51:44
DECLARE @sql VARCHAR (MAX),@sql2 VARCHAR (MAX),@sql3 VARCHAR (MAX) --设置行转列字段 SELECT @sql = '' SELECT @sql = @sql + ',' + '[' + rtrim (b.bugno) + ']' FROM (SELECT DISTINCT q.bugno,qd.bugname FROM qaaETmxb q right JOIN dbo.QAAqdmxb qd ON q.bugno=qd.bugno WHERE q.bugno<>'') b SELECT @sql=STUFF(@sql, 1 , 1, '') --求和 行转列的字段 SELECT @sql3 = '' SELECT @sql3 = @sql3 + ',' + 'SUM([' + rtrim (b.bugno) + ']) [' + rtrim (b.bugname) + ']' FROM (SELECT DISTINCT q.bugno,qd.bugname FROM qaaETmxb q right JOIN dbo.QAAqdmxb qd ON q.bugno=qd.bugno WHERE q.bugno<>'') b SELECT @sql3 = STUFF(@sql3, 1 , 1, '') SELECT