水晶超难得问题(设计存储过程修改)

lgjsoft 2005-04-05 11:07:37
这是储存过程
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能认得它的结果是什么
但是该如何修改???????
...全文
126 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
silverseven 2005-04-06
  • 打赏
  • 举报
回复





登 录.. [注 册] 忘记密码 注销登录






csdn.net 首 页 | 第二书店 | 社 区 | 专 题 | 精 华 | SUN | IBM | 微 软 | 微 创 | 书 社 | 《程序员》 | 调 查 | 聊 天 | 黄 页
新 闻 | Donews | 文 档 | FAQ | 专 栏 | 人 才 | 培 训 | 移 动 | 人 邮 | 清 华 | 《开发高手》 | 搜 索 | 软 件 | 会 员



2005.4.6




CSDN - 技术社区 - .NET技术 图表区问题
回复 | 收藏此页 | 专题 | 公告 | 管理 | 保存 | 关闭窗口




我的问题
我参与问题
我得分问题
我的短消息
我的收藏夹




主  题: 水晶超难得问题(设计存储过程修改)
作  者: lgjsoft (王量)
等  级:
信 誉 值: 100
所属社区: .NET技术 图表区
问题点数: 10
回复次数: 0
发表时间: 2005-04-05 11:00:31



这是储存过程
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能认得它的结果是什么
但是该如何修改???????










管理 | 关闭窗口





--------------------------------------------------------------------------------

网站简介 - 广告服务 - 网站地图 - 帮助信息 - 联系方式
百联美达美公司 版权所有 京ICP证020026号
Copyright © CSDN.net, Inc. All rights reserved







登 录.. [注 册] 忘记密码 注销登录






csdn.net 首 页 | 第二书店 | 社 区 | 专 题 | 精 华 | SUN | IBM | 微 软 | 微 创 | 书 社 | 《程序员》 | 调 查 | 聊 天 | 黄 页
新 闻 | Donews | 文 档 | FAQ | 专 栏 | 人 才 | 培 训 | 移 动 | 人 邮 | 清 华 | 《开发高手》 | 搜 索 | 软 件 | 会 员



2005.4.6




CSDN - 技术社区 - .NET技术 图表区问题
回复 | 收藏此页 | 专题 | 公告 | 管理 | 保存 | 关闭窗口




我的问题
我参与问题
我得分问题
我的短消息
我的收藏夹




主  题: 水晶超难得问题(设计存储过程修改)
作  者: lgjsoft (王量)
等  级:
信 誉 值: 100
所属社区: .NET技术 图表区
问题点数: 10
回复次数: 0
发表时间: 2005-04-05 11:00:31



这是储存过程
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能认得它的结果是什么
但是该如何修改???????










管理 | 关闭窗口





--------------------------------------------------------------------------------

网站简介 - 广告服务 - 网站地图 - 帮助信息 - 联系方式
百联美达美公司 版权所有 京ICP证020026号
Copyright © CSDN.net, Inc. All rights reserved







登 录.. [注 册] 忘记密码 注销登录






csdn.net 首 页 | 第二书店 | 社 区 | 专 题 | 精 华 | SUN | IBM | 微 软 | 微 创 | 书 社 | 《程序员》 | 调 查 | 聊 天 | 黄 页
新 闻 | Donews | 文 档 | FAQ | 专 栏 | 人 才 | 培 训 | 移 动 | 人 邮 | 清 华 | 《开发高手》 | 搜 索 | 软 件 | 会 员



2005.4.6




CSDN - 技术社区 - .NET技术 图表区问题
回复 | 收藏此页 | 专题 | 公告 | 管理 | 保存 | 关闭窗口




我的问题
我参与问题
我得分问题
我的短消息
我的收藏夹




主  题: 水晶超难得问题(设计存储过程修改)
作  者: lgjsoft (王量)
等  级:
信 誉 值: 100
所属社区: .NET技术 图表区
问题点数: 10
回复次数: 0
发表时间: 2005-04-05 11:00:31



这是储存过程
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能认得它的结果是什么
但是该如何修改???????










管理 | 关闭窗口





--------------------------------------------------------------------------------

网站简介 - 广告服务 - 网站地图 - 帮助信息 - 联系方式
百联美达美公司 版权所有 京ICP证020026号
Copyright © CSDN.net, Inc. All rights reserved


4,819

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧