rt

解决方案 »

  1.   

    Declare @Date DateTime
    Select @Date  =GetDate()
    Select @Date
    --Result 2007-04-02 10:32:17.733
      

  2.   

    String sql1  = " insert into social.grant4(personid,yearfr,monthfr,yearto,monthto,fee,operator,opertime)";
                   sql1 += " select s.personid,@yearfr,@monthfr,@yearto,@monthto,@fee,@operator,GetDate()";
                   sql1 += " from social.soclogin s,social.paysoc p,sqdta.community c,sqdta.street t";
                   sql1 += " where s.personid=p.personid and p.ispay='1' and s.livcomm = c.commid and c.streetid = t.streetid and t.branchid='"+strBranchID+"'";opertime为Date类型?SystemErr     R java.sql.SQLException: [SQL0204] 找不到*LIBL类型*N中的GETDATE。
      

  3.   

    好象這次還是不是SQL語句的問題,你可以這樣測試下
    Declare @T Table (TestDate DateTime)
    Insert @T Select GetDate()
    Select * From @T如果你沒辦法使用GetDate(),你可以在程序中得到一個當前時間,然後插入數據庫.
      

  4.   

    输出sql1
    将sql1放置sqlserver 中检查错误