[ www.netezza.com ]

This Question is Not Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
2 Replies Last post: Oct 23, 2009 12:29 PM by samirkakade  
samirkakade   19 posts since
Sep 3, 2009
Currently Being Moderated

Oct 23, 2009 11:42 AM

spooling data

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

David Birmingham   245 posts since
Sep 24, 2007
Currently Being Moderated
1. Oct 23, 2009 12:25 PM in response to: samirkakade
Re: spooling data

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

 

!

More Like This

  • Retrieving data ...