开发者

sql server: will this datetime work?

开发者 https://www.devze.com 2023-01-21 08:04 出处:网络
SELECT \"2 0 Analytical开发者_StackOverflow中文版 (Testing Phase)\" FROM \"dbo\".\"Lab Occurrence Form\"
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

精彩评论

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