select 660000773,sx#,jj,jj,0,0,lsj,lsj=cast
(htj/0.7 as numeric(8,1)),'',66,identity(1,1),null,null,null,0,0,0 into _jj
from jsptab  where hs=3401;提问以下错误信息,要怎么写才对呢?
服务器: 消息 170,级别 15,状态 1,行 2
第 2 行: '1' 附近有语法错误。

解决方案 »

  1.   

    不能这样写的吧?2005的话可以用row_number()来生成ID
      

  2.   


    我的是SQL2000的,要怎么写呢?
      

  3.   

    try this,select 660000773 'col1',
           sx# 'col2',
           jj 'col3',
           jj 'col4',
           0 'col5',
           0 'col6',
           lsj 'col7',
           lsj=cast(htj/0.7 as numeric(8,1)) 'col8',
           '' 'col9',
           66 'col10',
           identity(int,1,1) 'col11',
           null 'col12',
           null 'col13',
           null 'col14',
           0 'col15',
           0 'col16',
           0 'col17' 
    into _jj
    from jsptab 
    where hs=3401