视图不能带参数的,你可以先创建视图,在视图里面用where
CREATE VIEW 视图名称
AS
SELECT
NRequestItemno
,[ItemSource]
,[NRequestFormNo]
,[BarCodeFormNo]
,[TollItemNo]
,[formno]
,[ParItemNo]
,(select cname from testitem where itemno=a.paritemno) as itemnamecw
,(select orderno from testitem where itemno=a.paritemno) as orderno
FROM dbo.NRequestItem
select * from 视图名称
where nrequestformno=@nrequestformno