日期:2014-05-17 浏览次数:20751 次
alter proc getFrontMultipleRecords怎么将 begin select * 的* 改为
@startingRow int, --起始行
@terminaRow int, --终止行
@queryCondition nvarchar(50) --查询条件
as
begin
select *
from (select row_number() over (order by sgi.factoryNumber) as rowNum,sgi.* from
SellGoodsInfo as sgi Inner join ManufacturerInfo as mfi on sgi.factoryNumber = mfi.factoryNumber
Inner join GoodsType as gt on sgi.goodsTypeId = gt.goodsTypeId
where
sgi.goodsName like '%'+@queryCondition+'%')
as tbl where rowNum between @startingRow and @terminaRow
end
go
sgi.goodsBarCode,sgi.goodsName,gt.goodsType,sgi.costPrice,mfi.factoryName,sgi.goodsNo,sgi.storageAlarm就会报这样的错误的消息 8156,级别 16,状态 1,过程 getFrontMultipleRecords,第 7 行
alter proc getFrontMultipleRecords
@startingRow int, --起始行
@terminaRow int, --终止行
@queryCondition nvarchar(50) --查询条件
as
begin
select *
from (
select row_number() over (order by sgi.factoryNumber) as rowNum,
sgi.goodsBarCode,
sgi.goodsName,
gt.goodsType,
sgi.costPrice,
mfi.factoryName,
sgi.goodsNo,
sgi.storageAlarm
from SellGoodsInfo as sgi
Inner join ManufacturerInfo as mfi on sgi.factoryNumber = mfi.factoryNumber
Inner join GoodsType as gt on sgi.goodsTypeId = gt.goodsTypeId
where sgi.goodsName like '%'+@queryCondition+'%'
) as tbl where rowNum between @startingRow and @terminaRow
end
go