当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 请问activereport或其他哪些报表能实现分层打印,即树状结构的打印,如把记录值为国务院的所有子节点与它呈树状显示 国务院 卫生部 符灿真 头衔,级别,配偶,子女,学历 教育部 谭勇 头衔,级别,配偶,子女,学历 小陈 头衔,级别,配偶,子女,学历 ......
    摘要: 关于两个数据表间的sql查询语句问题 有两个数据表。 表一:area, id area cn_linename en_linename 13 欧洲线 欧洲其他联运点 europe other spline 5 亚洲线 北京 -- 德里 pek -- del 4 亚洲线 北京 -- 富冈 pek -- fuk 3 亚洲线 北京 -- 大阪 pek -- osa 9 欧洲线 北京 -......


下面的存储过程用临时表怎么改,谢谢

CREATE   PROCEDURE   [pro_ssfzsp_spstroe]    
  AS  
   
  set   nocount   on  
   
  declare   @li_spbhid   int  
  declare   @li_spckid   int  
  declare   @li_spcwid   int  
  declare   @li_spjs   int  
  declare   @ld_spsl   decimal(12,2)  
   
  delete   ssfzsp_spstore  
   
  declare   cursor_ckcwstore   scroll   cursor   for  
  select   spbhid,spckid,spcwid,spjs,spsl   from   ssfzvw_spdxmx  
   
  open   cursor_ckcwstore  
   
  fetch   first   from   cursor_ckcwstore  
  into   @li_spbhid,@li_spckid,@li_spcwid,@li_spjs,@ld_spsl  
   
  while   @@fetch_status   =   0  
  begin  
      insert   into   ssfzsp_spstore(spbhid,spckid,spcwid,spjs,spsl)  
      values(@li_spbhid,@li_spckid,@li_spcwid,@li_spjs,@ld_spsl)  
   
      fetch   next   from   cursor_ckcwstore  
      into   @li_spbhid,@li_spckid,@li_spcwid,@li_spjs,@ld_spsl  
  end  
   
  close   cursor_ckcwstore  
  deallocate   cursor_ckcwstore  
  commit;  
  return  
  GO  
 

NO.1   作者: caiyunxia

有必要用游标吗

NO.2   作者: w_rose

insert   into   ssfzsp_spstore(spbhid,spckid,spcwid,spjs,spsl)  
      select   spbhid,spckid,spcwid,spjs,spsl   from   ssfzvw_spdxmx


    摘要: 关于两个数据表间的sql查询语句问题 有两个数据表。 表一:area, id area cn_linename en_linename 13 欧洲线 欧洲其他联运点 europe other spline 5 亚洲线 北京 -- 德里 pek -- del 4 亚洲线 北京 -- 富冈 pek -- fuk 3 亚洲线 北京 -- 大阪 pek -- osa 9 欧洲线 北京 -......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE