View Single Post
Old February 20th, 2010, 11:09 PM   #2 (permalink)
Neobux
Junior Member
 
Join Date: Feb 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Neobux is an unknown quantity at this point
Default

Quote:
Originally Posted by Jessica View Post
Hi,

I have a table consisting five columns Card No, Sdate, Edate, ATime, Etime

Now i want to get three columns info CardNo, Sdate, Edate from table. But i am facing problem when i get input from user to get their required info. For example user want to exact CRad name & his info from a specific Sdate to Edate.

Any effort will be appreciated .
Following might help.. If SDate and EDate are date type columns..

SELECT CardNo, SDate, EDate FROM table WHERE SDate > INPUT_DATE AND EDate < INPUT_DATE

Alternately better method is..

SELECT CardNo, SDate, EDate FROM table WHERE INPUT_DATE BETWEEN SDate AND EDate
Neobux is offline   Reply With Quote Share with Facebook