print 没有结果
DECLARE @WHSCODE VARCHAR(20),@ITEMCODE VARCHAR(30),@Codebars varchar(30),@datefrom datetime,@dateto datetime
SET @DATEFROM='2010-01-01'
SET @DATETO='2011-01-01'
SET @WHSCODE='1-AZJT01'
SET @ITEMCODE='A'
declare @sql nvarchar(4000)
set @sql='s'
declare @cur varchar(4000) --保存动态游标语句,实现物料模糊查询
declare @type nvarchar(4)
set @cur=N'
declare cur1 cursor for --获取型号列值,作为分组依据
select distinct m.型号
from
(SELECT tt.DocDate,tt.DocEntry, tt.DocNum, tt.Comments,d.ItemCode,d.Quantity,left(T4.[BatchNum],3) AS COLORCODE
,SUBSTRING(T4.[BatchNum],4,2) AS ''型号'',d.WhsCode,tt.U_DJLX,tt.U_JYLX,d.LineTotal,D.ObjType,D.LineNum
FROM dbo.OIGN AS tt
INNER JOIN dbo.IGN1 AS d ON tt.DocEntry = d.DocEntry AND tt.CurSource = ''C''
inner join ibt1 T4 ON T4.BaseType = D.ObjType AND D.DocEntry=T4.BaseEntry AND D.LineNum=t4.BaseLinNum
where isnull(SUBSTRING(T4.[BatchNum],4,2),'''')<>'''' and tt.docdate between '
+convert(varchar(20),@datefrom,112)+N' and '''+convert(varchar(20),@dateto,112)
+N''') M
left join OITM p on p.ITEMCODE=m.itemcode
inner join owhs t5 on M.whscode = t5.whscode
where M.whscode ='+@whscode+N' and M.ItemCode like '''+@itemcode+N'%'''+N'
open cur1
fetch next from cur1 into '+@type+'
while @@fetch_status=0
begin
set @sql='+@sql+'['+@type+'],'+'
fetch next from cur1 into '+@type+'
end
set @sql=stuff('+@sql+',1,1,'''')
set '+@sql+'=left('+@SQL+',len('+@SQL+')-1)
close cur1
deallocate cur1'
PRINT @cur
为什么我print后没有结果啊?
相关推荐
Python中print和return的作用及区别解析
print的作用是输出数据到控制端,就是打印在你能看到的界面上。这篇文章给大家介绍Python中print和return的作用及区别解析,感兴趣的朋友跟随小编一起看看吧
python让函数不返回结果的方法
函数返回值简介 1、简单介绍print和return的区别,print仅仅是打印在控制台,而return则是将return后面的部分作为返回值:作为函数的输出,可以用变量接走,继续使用该返回值做其它事。 2、函数需要先定义后调用,函数体中return语句的结果就是返回值。如果一个函数没有reutrn语句,其实它有一个隐含的return语句,返回值是None,类型也是’NoneType’。 def func(x,y): num = x + y return print(func(1,2)) #上面代码的输出结果为:None 从上面例子可以看出print( )只是起一个打印作用,函数具体
解决使用python print打印函数返回值多一个None的问题
主要介绍了解决使用python print打印函数返回值多一个None的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
python中print()函数的“,”与java中System.out.print()函数中的“+”功能详解
python中的print()函数和java中的System.out.print()函数都有着打印字符串的功能。接下来通过本文给大家分享python中print()函数的“,”与java中System.out.print()函数中的“+”功能,需要的朋友参考下吧
深入理解 Pytest 输出捕获机制:为什么你的 print 没有显示?
深入理解 Pytest 输出捕获机制:为什么你的 print 没有显示?


疑难问题
