SQL running on unix
Posted in 1999
Topics: General Discussion
How do I read in the date from my unix box(i.e., `date +%m/% d/%y`)into an SQL script where I want to compare today's date (from unix) to a date-field in my database? any suggestions would be greatly appreciated! :-) Thanks Scott * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!
Echo the shell script date into .sql file and then \\
perform dbaccess on the .sql file. Works every time.
or
dbaccess $DBNAME << EOF
select my_date from table
where my_date = $VARIABLEEOF
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!