in reply to Problem passing date to SQL
You're trying to perform a string comparison of the string '08/%/2015' with a date field, which is a number. This absolutely will not work in Microsoft SQL and I suspect (though can't test) that it won't work in Oracle either.
A better solution is: SELECT ... WHERE DATE >= $startdate AND DATE <= $enddate
UPDATE: Yeah, dunno who down-voted me, but there are some assumptions I made:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem passing date to SQL
by runrig (Abbot) on Aug 18, 2015 at 20:41 UTC | |
by SimonPratt (Friar) on Aug 18, 2015 at 21:09 UTC |