2007 Apr 25 8:09 AM
hi
i have two fields of table
bedga that is the starting date
endda thats the end date
now suppose begda have the value 01.02.2002
and endda have the value 31.12.9999
now what i have to do i have to write a select query that retrives data from the two dates thats the satrting date as well as the end date
now depending on the data entered by the user the query should pick the record.
suppose user enter starting date as 01.04.2007 and end date as 31.01.2007 then it should look in between the two fielda of the table and pick the record
what i am doing is i am making it as stsrtdate > userenter start date
and end date < user entered end date but it is not picking any records.
please let me know if some thing can ce done
i need record of a financila year from the satrting date and the end date that is ying between the values of these fields
2007 Apr 25 8:12 AM
HI,
In ther where clause you can write the code. ..
WHERE DATE BETWEEN START_DATE AND END_DATE.
Regards
Sudheer
hi
i have two fields of table
bedga that is the starting date
endda thats the end date
now suppose begda have the value 01.02.2002
and endda have the value 31.12.9999
now what i have to do i have to write a select query that retrives data from the two dates thats the satrting date as well as the end date
now depending on the data entered by the user the query should pick the record.
suppose user enter starting date as 01.04.2007 and end date as 31.01.2007 then it should look in between the two fielda of the table and pick the record
what i am doing is i am making it as stsrtdate > userenter start date
and end date < user entered end date but it is not picking any records.
please let me know if some thing can ce done
i need record of a financila year from the satrting date and the end date that is ying between the values of these fields
2007 Apr 25 8:12 AM
HI,
In ther where clause you can write the code. ..
WHERE DATE BETWEEN START_DATE AND END_DATE.
Regards
Sudheer
2007 Apr 25 8:13 AM
select * from <table> into <itab> where begda >= user_entered_begda and enda is <= user_entered_endda.
regards,
Aabhas
<reward if problem is solved>
2007 Apr 25 8:18 AM
are u using select options ??if so try this
chk this
select .. where startdate GT <b>s_date-low</b> and enddate LT <b>s_date-high.</b>
2007 Apr 25 10:28 AM
try this
select ...... where startdate in <b>s_date</b> and enddate in <b>s_date</b>.
I think this will solve your problem.
<b>Reward if useful</b>
Regards,
Sudheer
2007 Apr 25 10:32 AM
Hi Ashish,
write...
SEELCT <FIELDS> FROM DBTABLE WHERE BEGDA <= STARTDATE AND ENDDA >= ENDDATE.
This will definitely work,
<b>Reward points for helpful answers,</b>
Regards,
Tejas
2007 Apr 25 10:37 AM
HI,
you are using the reverse logic
DO LIKE THIS
<b> stsrtdate <= userenter start date
and end date >= user entered end date</b>
Regards,
2007 May 07 11:50 AM
Hi,
U have to <b>award points for useful answers</b> and u have to mention it as solved if ur question is solved. Dont forget.
Regards,
Sudheer
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |