ry.rith (10/31/2008)
Thank so much,that you tell me about the solution.
I also do the same of yours to complete the crosstab-report, but something that i want is to know why it's process abnormally.
any technique, please inform me.
your faithfully.
Observe the following line of your code...
Set @sql=@sql+' WHERE dbo.tab_IC_Packing_List_Detail.PackingListNo='+ char(39)+ @po_no + char(39) + char(13)
Looks harmless enough until you trace it back to the real problem... which is...
Alter Proc rsp_IC_PackingList_CrossTab (@po_no [font="Arial Black"]nvarchar[/font](32))
Ask yourself... what do you get when you concatenate a VARCHAR(8000) with an NVARCHAR of any length? ;)
--Jeff Moden
Change is inevitable... Change for the better is not.