dbTalk Databases Forums  

select question

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss select question in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John
 
Posts: n/a

Default select question - 10-27-2009 , 08:39 AM






hi all,

i have a table with some records in it. I have for each
record the field date and the field time.

How can i setup an SQL statement that allows me to select
only those records of today say from 08.00 am till 13.00pm ?

! they are time fields , not date-time fields.

TIA
John

Reply With Quote
  #2  
Old   
Kory Hodgson (Sybase iAnywhere)
 
Posts: n/a

Default Re: select question - 10-27-2009 , 09:36 AM






So if I understood correctly you have two columns, one that is a date
column, and one that a time column?

If that's true you could do:

SELECT * FROM table WHERE date_column = TODAY() AND time_column BETWEEN
'08:00:00' AND '13:00:00'


John wrote:
Quote:
hi all,

i have a table with some records in it. I have for each
record the field date and the field time.

How can i setup an SQL statement that allows me to select
only those records of today say from 08.00 am till 13.00pm ?

! they are time fields , not date-time fields.

TIA
John

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.