问个存储问题,语法太不熟悉,请大家帮忙
传递一参数 返回一SQL查询
sql语句如下
select bdp_name,bdp_num,yqghsj,bdp_desc,(select '标项 '+rtrim((select count(distinct
bdp_fzid) from bid_detailed_plan where bdp_fzid <b.bdp_fzid)))
bx,bdp_fzid,a.bi_id,a.bi_endbmtime, ' ' flag from bid_item a inner join bid_detailed_plan b
on a.bi_id=b.bdp_pid where a.bi_id = '20070202131249 ' order by bdp_fzid
要传递bi_id参数
还要对上面SQL查询的纪录再操作
语法 好像INTO T 不太清楚
然后返回操作完的T
[解决办法]
create table #t(...)
insert into #t exec 存储过程名 参数列表
select * from #t