SQL in unix environment
Posted in 1999
Topics: SQL Development & Query Writing
How do I read in the date from my unix box(i.e., `date +%m/% d/%y`)into an SQL script? I have a date field in my database that I want to do an SQL query on, comparing the database date with Today's(from unix) date. Any ideas on how to do this? I figure I have to write a unix shell script with my SQL script embedded in the unix shell script, but not sure on the details. 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!
Select * from mytable where mydatefield = today;
HTH
Michael
Scott wrote:
> How do I read in the date from my unix box(i.e., `date +%m/%
> d/%y`)into an SQL script? I have a date field in my
> database that I want to do an SQL query on, comparing the
> database date with Today's(from unix) date. Any ideas on
> how to do this? I figure I have to write a unix shell
> script with my SQL script embedded in the unix shell
> script, but not sure on the details.
>
> 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!