э这是一个SQL查询:)
ssh ip<<'EOF'
sed -i 's~"libraries"~"pack/&"~; s~"objects"~"pack/&"~' file.json
EOF
这是一个sql查询以某种方式将表格(...,key,...,value,...)转换为(a1,a2,a3,a4,...,a14)每个14可能的密钥和一些其他限制。但是,每次使用像“a1.vdsValue”或“u.vdsDomain”这样的结构都会导致错误:
DECLARE @uDomain nvarchar(255)
SET @uDomain = 'loadtest'
INSERT INTO newnd.dbo.new_attributes
SELECT u.vdsUserId, u.vdsDomain,
a1.vdsValue,
a2.vdsValue
a3.vdsValue,
a4.vdsValue,
a5.vdsValue,
a6.vdsValue,
a7.vdsValue,
a8.vdsValue,
a9.vdsValue,
a10.vdsValue,
a11.vdsValue
a12.vdsValue
a13.vdsValue
a14.vdsValue
FROM ([linkedserver].master.dbo.vdsUser u
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a1 ON a1.vdsUserId = u.vdsUserId AND a1.vdsDomain = u.vdsDomain AND a1.vdsName = 'as1'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a2 ON a2.vdsUserId = u.vdsUserId AND a2.vdsDomain = u.vdsDomain AND a2.vdsName = 'as2'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a3 ON a3.vdsUserId = u.vdsUserId AND a3.vdsDomain = u.vdsDomain AND a3.vdsName = 'as3'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a4 ON a4.vdsUserId = u.vdsUserId AND a4.vdsDomain = u.vdsDomain AND a4.vdsName = 'as4'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a5 ON a5.vdsUserId = u.vdsUserId AND a5.vdsDomain = u.vdsDomain AND a5.vdsName = 'as5'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a6 ON a6.vdsUserId = u.vdsUserId AND a6.vdsDomain = u.vdsDomain AND a6.vdsName = 'as6'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a7 ON a7.vdsUserId = u.vdsUserId AND a7.vdsDomain = u.vdsDomain AND a7.vdsName = 'as7'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a8 ON a8.vdsUserId = u.vdsUserId AND a8.vdsDomain = u.vdsDomain AND a8.vdsName = 'as8'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a9 ON a9.vdsUserId = u.vdsUserId AND a9.vdsDomain = u.vdsDomain AND a9.vdsName = 'as9'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a10 ON a10.vdsUserId = u.vdsUserId AND a10.vdsDomain = u.vdsDomain AND a10.vdsName = 'as10'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a11 ON a11.vdsUserId = u.vdsUserId AND a11.vdsDomain = u.vdsDomain AND a11.vdsName = 'as11'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a12 ON a12.vdsUserId = u.vdsUserId AND a12.vdsDomain = u.vdsDomain AND a12.vdsName = 'as12'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a13 ON a13.vdsUserId = u.vdsUserId AND a13.vdsDomain = u.vdsDomain AND a13.vdsName = 'as13'
LEFT OUTER JOIN [linkedserver].master.dbo.vdsUserAttr a14 ON a14.vdsUserId = u.vdsUserId AND a14.vdsDomain = u.vdsDomain AND a14.vdsName = 'as14'
) WHERE u.vdsDomain = @uDomain
这可能是什么问题?