水晶超难得问题(设计存储过程修改)
这是储存过程
CREATE PROCEDURE WHM_ProductStat
@starttime datetime,
@endtime datetime,
@CategoryId int
AS
set nocount on
create table #t(id int,level int)
declare @l int
set @l=0
insert #t select CategoryId,@l from CMRC_Categories where ParentCategoryid=@CategoryId
while @@rowcount>0
begin
set @l=@l+1
insert #t select a.CategoryId,@l
from CMRC_Categories a,#t b
where a.ParentCategoryid=b.id and b.level=@l-1
end//上面是选择该@CategoryId 下所有的子节点的过程
//下面是对所选的子节点的统计
select
O.ModelName,
sum(O.Quantity) TotalQuantity,
sum(O.UnitCost*O.Quantity) TotalMoney
from
CMRC_Categories a,#t b ,
CMRC_Products P,
WHM_OutBill OB,
WHM_OutBillDetails O
where
a.CategoryId=b.id
and O.BillCode=OB.BILLCODE
AND O.PRODUCTID=P.PRODUCTID
AND P.CATEGORYID=a.CATEGORYID
and OB.POSTDATE>=@starttime
and OB.POSTDATE<=@endtime
group by
O.ModelName
我测试了
存储过程 每问题
问题在于:
当我想生成XSD文件的时间
我把左边的服务器资源管理器里面的对应的存储过程拉到
XSD页面上
VS。NET提示错误:
把 WHM_ProductStat 放在设计器时出现错误,无法从此对象解释XML构架
---------------------------------------------------------------------
我想因该市我的存储过程因该修改一下,以便XSD能认得它的结果是什么
但是该如何修改???????