如何用GetDate()返回Date类型 rt 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Declare @Date DateTimeSelect @Date =GetDate()Select @Date--Result 2007-04-02 10:32:17.733 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。 好象這次還是不是SQL語句的問題,你可以這樣測試下Declare @T Table (TestDate DateTime)Insert @T Select GetDate()Select * From @T如果你沒辦法使用GetDate(),你可以在程序中得到一個當前時間,然後插入數據庫. 输出sql1将sql1放置sqlserver 中检查错误 SQLSERVER设置最大内存 请问一个sql default用法提问? 得到如下结果 多个用户对一个表同时操作的问题 大侠帮人忙,求个存储过程 主键是否该用标识列 可能是很简单的问题:字段的数据类型 采用 字符串合理还是数字合理? 多条件查询 请问已知IP地址如何连接数据库? C#从字符串中提取数字 如何只显示一条记录中字段值不为空的字段 问一个关于数据类型转化的问题!
Select @Date =GetDate()
Select @Date
--Result 2007-04-02 10:32:17.733
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。
Declare @T Table (TestDate DateTime)
Insert @T Select GetDate()
Select * From @T如果你沒辦法使用GetDate(),你可以在程序中得到一個當前時間,然後插入數據庫.
将sql1放置sqlserver 中检查错误