Hi,
How can i spool data from a table into a file? something similar to the 'spool' command in Oracle. Would appreciate if anyone can help me with this query. I am using WinSql for quering the NZ database.
Thanks and regards,
Samir
nzsql -d $TARGET_DB -A -q -t -c " sql statement here; " > $FILE_NAME
you can also use the -o instead:
nzsql -o $FILENAME -d $TARGET_DB -A -q -t -c "sql statement here; "
or
nzsql -o $FILENAME -d $TARGET_DB -A -q -t <<!
complex sql statement here
!
Thanks David!