Unix Technical Forum

sqsh scripting

This is a discussion on sqsh scripting within the Sybase forums, part of the Database Server Software category; --> does anyone have any experience with scripting with sqsh? I am trying to write a script to run a ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 04:03 PM
see sig
 
Posts: n/a
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:49 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com