Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > sqsh scripting
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 17th September 00:40
see sig
External User
 
Posts: 1
Default sqsh scripting



does anyone have any experience with scripting with sqsh?
I am trying to write a script to run a check on a field value

what i need to do is check UPLOAD table for a value of 0, if the 0 exists
then check the highest date field, if the date is older than 10 minutes
generate an alert email....

these are the commands to get the data but i'm unsure as to
how to put it together... the docs show that what i have "should" work but
the commands are not being interpreted..

#!/usr/local/bin/sqsh -i
-Upassword -Ppassword -S mssql -h
select TIMESTMP from UPLOAD where TIMESTMP = (select MAX (TIMESTMP) from UPLOAD)
select UPLOADED from UPLOAD where UPLOADED <1
\go |uniq

bash i'm ok in but sql scripting i'm a complete newb...any help would be
apreciated.
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666