on 2014 Apr 17 7:09 AM
Guys,
I'm having trouble trying to output the the table to a file:
IF (NumRows > 0 ) THEN
MESSAGE 'We have not had backups for more than 2 hours! Affected volumes are: ';
SELECT * FROM LatestBackup WHERE datediff (minute, ExecTime, getdate()) < 130;
OUTPUT TO '/dir1/dir2/textfile FORMAT TEXT;
END IF;
Such a code returns syntax error. While I'm executing SELECT and OUTPUT only, it works perfectly fine. Any ideas? Can't I use OUTPUT in a batch?
Thank you.
Request clarification before answering.
OUTPUT is a command which can only be used in the tool dbisql, but you can use the UNLOAD command instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FWIW, as you have used the "output" tag yourself, that tag lists a whole bunch of FAQs and explanations to that topic:
User | Count |
---|---|
53 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.