开发者

sql server: will this datetime work?

SELECT "2 0 Analytical开发者_StackOverflow中文版 (Testing Phase)"  
  FROM "dbo"."Lab Occurrence Form" 
 WHERE (("Occurrence Date" BETWEEN  @P1 AND  @P2 ) 
   AND ("2 0 Analytical (Testing Phase)" LIKE ''%2.%'' ) ) ', N'@P1 datetime,@P2 datetime','2010-04-30 00:00:00','2010-04-01 00:00:00'

is this the correct format to return records between a certain datetime?


The SQL SELECT syntax looks right but the date values for the parameters should be swapped (older date in @P1.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜