Hello ALL,
I have table test with following structure-
Test id |
Test Name |
Start Date |
End Date |
1 |
ABC |
10-Jan-11 |
10-Jan-11 |
2 |
PQR |
10-Jan-11 |
11-Jan-11 |
1 |
ABC |
11-Jan-11 |
12-Jan-11 |
3 |
XYZ |
10-Jan-11 |
12-Jan-11 |
I just want to display distinct record of Test ID and Test Name in my report based on selection of start date and End Date.
i have created record selection formula as
test.start date >={?St_Dt } and
test.end date<={?End_Dt}
I am using only Test Id and Test Name in my report however SQL generated by report is -
Select distinct Test ID,Test Name, Start Date,End Date
from Test
where Test.Start Date >= To_Date(''02-01-2011 00:00:00', 'DD-MM-YYYY HH24:MI:SS'') and
Test.End Date <= To_Date(''13-01-2011 00:00:00', 'DD-MM-YYYY HH24:MI:SS').
This SQL is giving me duplicate records of Test ID and Test Name.
How could i restrict start date and end date to appear in select clause of SQL.
Really appreciate your help on this.
Thanks in advance
Amit