Dear Friends :-),
Need your help once again.
I have following SQL in a shell script to pick values from database
select date_stamp, time_stamp from logs
where date=31012012
However, at times we need to take these value(s) from a variable. To do this we have following query.
select $date_stamp, $time_stamp from logs
where date-31012012
Now I want to write this SQL such a way that it will check if the variable is null then it will pickup value from database, and if variable is not null then it will pick it from the variable.
Please guide me to do it efficiently as I got to do it for lacs of records.
Thanks
Anu.