views:

25

answers:

1
SELECT "2 0 Analytical (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?

+2  A: 

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

bobs
that was the problem!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
i am a girl