retrieving records



IBM's flagship relational database management system

retrieving records

Postby sivanandam » Sat Nov 07, 2009 7:28 pm

there is a table with date column.. which consist of date from 1st day to the end of month.. my quest is ?is it possible
to retrieve the records between this date..if means plz tell the query
User avatar
sivanandam
 
Posts: 7
Joined: Sat Oct 10, 2009 9:27 am
Has thanked: 0 time
Been thanked: 0 time

Re: retrieving records

Postby swd » Mon Nov 09, 2009 7:07 pm

Hi,

I don't really understand what you are asking. If your table has a date column that has values are from the first of the month to the last of the month, then you can select BETWEEN 2 dates values, so

SELECT * FROM TABLE.NAME WHERE DATE_COLUMN BETWEEN '01.10.2009' AND '31.10.2009'

or you can select between any 2 dates you want to. I'm not sure if this is what you mean, so please can you clarify.
User avatar
swd
 
Posts: 109
Joined: Wed Feb 18, 2009 9:18 pm
Location: UK
Has thanked: 0 time
Been thanked: 0 time

Re: retrieving records

Postby sivanandam » Mon Nov 16, 2009 10:21 pm

thank u .. i had a doubt whether we can use' between' now my doubt cleared.
User avatar
sivanandam
 
Posts: 7
Joined: Sat Oct 10, 2009 9:27 am
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post