下面sql server 2008R2的fetch sp中,@object中select语句中的列名- >/ ^ /这些字符代表什么?
CREATE Proc Pr_FetchPatientIssueItemsMis
As
Begin
Declare @Object varchar(MAX)
SET NOCOUNT ON
Set @Object= '(Select '
+ 'ISD.[' + /*v*/'SalesID'/*v*/ + '] SalesID,'
+ 'ISD.[' + /*v*/'ItemID'/*v*/ + '] ItemID,'
+ 'V.DisplayName ItemName,'
+ 'V.ItemCode ItemCode,'
+ 'v.CategoryID CategoryID,'
+ 'v.Category Category'
+ ' From Dbo.[' + /*v*/'V_ItemPatientIssues'/*v*/ + ']ISD'
+ ' Inner Join Dbo.[v_items]V ON ISD.[' + /*v*/'ItemID'/*v*/ + ']= V.ItemID'
+ ')OBJ'
EXEC('Select * from (Select * From ' + @Object +')XYZ')
Return 0
End