Quote:
|
Originally Posted by tiger66
select * from db where date < (select convert(char(12),getdate()) || select convert(char(5), @startTime, 12))
|
You can only have one select in a sub query.
Whenever theres a null value, the date has Jan 1 1900
So, Im guessing you want something like this.
select * from db where date < getdate() OR date < @startTime
where @startTime != 'Jan 1 1900'