Home > SQL Development > between and datetime column

between and datetime column



Hi,



I have this select stmt:



SELECT * FROM table1 WHERE b BETWEEN a AND c



Here, a,b,c all the three columns are of type datetime. I want to retrieve records where time b is between start time a and end time c. The query complies successfully but at times the result displayed is incorrect..



Any solutions?

Thanks.

    
Guest


If you posted some details maybe someone can help. How is anyone to know what might make the results incorrect "at times" ?

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved