第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Sql server cursor問題

Sql server cursor問題

青春有我 2018-07-23 15:15:09
有一張表,數(shù)據(jù)如下編寫如下sql語句/****** Script for SelectTopNRows command from SSMS  ******/declare @output nvarchar(max)declare @year char(4)declare @startdate datetimedeclare reader cursor forSELECT distinct TOP 10 [cme_year]       ,[start_date]FROM [ayn_cme_year] order by cme_yearopen readerfetch next from reader into @year,@startdatewhile @@fetch_status=0beginset @output=@output+convert(nvarchar(4),@year)+' '+convert(nvarchar(10),@startdate)+' '  fetch next from reader into @year,@startdateendselect @outputclose readerdeallocate reader執(zhí)行之后無結(jié)果,為什么?
查看完整描述

1 回答

?
BIG陽

TA貢獻(xiàn)1859條經(jīng)驗 獲得超6個贊

在使用@output之前初始化一下就對了 set @output=''


查看完整回答
反對 回復(fù) 2018-08-13
  • 1 回答
  • 0 關(guān)注
  • 837 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號