SQL's problem with JSP pages...
Posted on 2003-11-18
Hi, I have this funny problem due to the DB design. In fact I think i don't have much choice other than design in this way.
P_code Filter A Fliter B Filter C Filter D Filter F
A134 11/2/2002 10/5/2003 5/5/2001 5/9/2002 5/3/2003
P8A5 5/8/2001 31/1/2003 18/2/1999 7/4/2001 25/2/2003
I have this kind of design of my database. And this is the problem.
I have a page, to query a expiring date of each filter. Howwould be my SQL statement would be, i mean i need to go through the data horizontally rather than vertically. I mean i need to go through the product's filter one by one to check for the expired date.
If i use this,
SELECT * from Table1 where Filter > ' "+startDate +" '
then my db design should be like this
Which i dont want....
Can you help?