首页新闻找找看学习计划

请教sql优化,多条查询语句合成一句

0
悬赏园豆:5 [已关闭问题] 关闭于 2014-08-21 16:37

SET @cnee = (SELECT ISNULL(cnee,'') FROM #TMP_SHIP WHERE e_id = @v_row)
SET @Name = (SELECT ISNULL(Name,'') FROM #TMP_SHIP WHERE e_id = @v_row)
SET @BookingNo = (SELECT ISNULL(BookingNo,'') FROM #TMP_SHIP WHERE e_id = @v_row)
SET @OrderNo = (SELECT ISNULL(OrderNo,'') FROM #TMP_SHIP WHERE e_id = @v_row)
SET @POL = (SELECT ISNULL(POL,'') FROM #TMP_SHIP WHERE e_id = @v_row)
SET @ETD = (SELECT CONVERT(varchar(16),ETD,103) FROM #TMP_SHIP WHERE e_id = @v_row)
SET @MainVessel = (SELECT ISNULL(MainVessel,'') FROM #TMP_SHIP WHERE e_id = @v_row)
SET @CWRef = (SELECT ISNULL(CWRef,'') FROM #TMP_SHIP WHERE e_id = @v_row)

 

像这种情况能不能通过一句语句实现?谢谢!

Tiger2009的主页 Tiger2009 | 初学一级 | 园豆:181
提问于:2014-08-21 16:12
< >
分享
所有回答(1)
0

SELECT @cnee= ISNULL(AGN_RecordNo,''),@Name= ISNULL(AGN_JobNo,'') FROM L_Agent

Tiger2009 | 园豆:181 (初学一级) | 2014-08-21 16:37
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册