首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

SQL里format使用出现有关问题

2012-01-24 
SQL里format使用出现问题TEMPFormat(D_SortYM.Value,YYYY-MM )sqlStr1strSQL&whereFormat(List.Date,

SQL里format使用出现问题
TEMP   =   Format(D_SortYM.Value,   "YYYY-MM ")
sqlStr1   =   strSQL   &   "where     Format(List.Date, 'YYYY-MM ')   = "   &   TEMP   &   "   order   by   List.Code "

结果:   FORMAT   不是可以识别的函数名



[解决办法]
mssql没有format这个函数,可以改用convert
[解决办法]
cdate(list.date)?
[解决办法]
sqlStr1 = strSQL & "where ' " & Format(List.Date, 'YYYY-MM ') & " '= ' " & TEMP & " ' " & " order by List.Code "

热点排行