|
|
| Author |
Message |
MGayathri
New User
Joined: 19 May 2007 Posts: 21 Location: Chennai
|
|
|
|
| Want to fetch the rows from a table if the Current DAY matches with Day value of Eff-date field which is of Character Type |
|
| Back to top |
|
 |
References
|
Posted: Wed Apr 23, 2008 4:46 pm Post subject: Re: Fetching the rows matching with current day |
 |
|
|
 |
Gnanas SNG
Senior Member
Joined: 06 Sep 2007 Posts: 414 Location: India
|
|
|
|
Why Eff-date column is in as Char?
Please look at the manual for Date and conversion functions. |
|
| Back to top |
|
 |
ashimer
Active User
Joined: 13 Feb 2004 Posts: 269 Location: Bangalore
|
|
|
|
If you know the position in Eff-date where day will come use Substr
select * from table where
substr(Eff_date,1,2)= char(day(current date));
assuming the eff-date is of format DD-MM-YYYY... |
|
| Back to top |
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 893 Location: Virginia, USA
|
|
|
|
| ashimer wrote: |
If you know the position in Eff-date where day will come use Substr
select * from table where
substr(Eff_date,1,2)= char(day(current date));
assuming the eff-date is of format DD-MM-YYYY... |
That will only work if there is just 1 months worth of data in the table.
What format is EFF_DATE in (mm/dd/yyyy yyyy-mm-dd etc)? |
|
| Back to top |
|
 |
MGayathri
New User
Joined: 19 May 2007 Posts: 21 Location: Chennai
|
|
|
|
| thanks a lot it helped me |
|
| Back to top |
|
 |
|
|