建立测试环境遇到的问题?

 所属目录:Java   |   类型:技术问答   |   时间:2007-05-21
 问题:

表  
      
   nyr                   dt1       dt2         dt3       dt4  
     
  01/01/1961         55         50           91         69  
  01/02/1961         60         54         121       108  
  01/03/1961         106       111       160       151  
  ...................................  
   
  建立测试环境  
  set   nocount   on  
  go  
  create   table   a  
  (  
      nyr   varchar(10),  
      dp1   int,dp2   int,dp3   int  
  )  
   
  insert   a  
  select   01/01/1961,55,50,91   union    
  select   01/02/1961,60,54,121   union  
  select   01/03/1961,106,111,160   union  
  .........    
   
  select   *   from   a  
   
  --测试  
  declare   @tb   table(id   int   identity,dp   int)  
  insert   @tb(dp)   select   dp1   from   a  
  select   [差值(dp1)]=datediff(day,t.dp,b.dp)   from   @tb   t   join   @tb   b   on   t.id+1=b.id  
   
  --删除测试环境  
  drop   table   a  
   
  select.....union中的数值部分(01/01/1961,55,50,91     01/02/1961,60,54,121       01/03/1961,106,111,160   )   一定要手工输入吗?那记录很多怎么办呢?  
 

· 网友精彩回答:

发表者:hsj20041004

如果其他地方有的话,可以复制过来,  
  没有的话,只好手写了。

发表者:morningtea

放在一个txt文本,导进来,  
  问题是,txt里面的东西不是也是人工key   in进去的吗?  
  嘿嘿

.
处理 SSI 文件时出错
© 2006-2008 All Rights Reserved