![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| compare files in the system with last modified date | bsandeep_80 | Linux | 6 | 01-15-2008 12:56 AM |
| How can i get the yesterday's date in YYYYMMDD format | prasadsr | HP-UX | 4 | 01-19-2007 09:52 AM |
| get yesterday's date? | fedora | Shell Programming and Scripting | 1 | 12-08-2006 03:28 PM |
| Yesterday's date function | ssmiths001 | UNIX for Dummies Questions & Answers | 4 | 01-11-2005 10:06 AM |
| Yesterday's date | ssmiths001 | UNIX for Dummies Questions & Answers | 2 | 11-22-2004 09:46 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Compare date from db2 table to yesterday's Unix system date
I am currently running the following Korn shell script which works fine:
#!/usr/bin/ksh count=`db2 -x "select count(*) from schema.tablename"` echo "count" I would like to add a "where" clause to the 2nd line that would allow me to get a record count of all the records from schema.tablename where PROCESS_DT(a datetime variable in tablename which is formatted as DATE9.) is equal to the today's unix system date - 1. I'm not sure of the proper syntax. Please help. count=`db2 -x "select count(*) from schema.tablename where PROCESS_DT=UNIX system date-1"` |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|