![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Unix script for executing oracle query | ravi gongati | Shell Programming and Scripting | 14 | 03-24-2008 02:53 AM |
| Print out loop index on the console after executing each sybase DB query | Alaeddin | Shell Programming and Scripting | 2 | 12-16-2007 01:30 AM |
| executing a SQL query in shell script | lijju.mathew | Shell Programming and Scripting | 1 | 05-17-2007 08:29 AM |
| Executing Sql Query Using Shell Script | ragha81 | Shell Programming and Scripting | 14 | 07-31-2006 11:15 AM |
| Executing a SQL query from a shell script | 98_1LE | UNIX for Dummies Questions & Answers | 3 | 03-23-2002 12:29 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Script executing sql query
Hello,
I have a sh script excuting a sql query through sqlplus. I am having trouble making my date equal to the date of the server time in the sql script. How can i call the server date from my query? Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
I'm not understanding the problem. You want to get the time/date on the server then use it in your query? Just use the variable "SYSDATE" in your query, it is the current time on the server. example:
Code:
SELECT STUFF FROM MYTABLE WHERE TABLE_DATE > SYSDATE -1; |
|
#3
|
|||
|
|||
|
Thanks for your help! It works!!
Last edited by kingluke; 01-23-2008 at 11:29 AM. Reason: figured it out! |
|||
| Google The UNIX and Linux Forums |