January 8, 2007 at 5:57 am
hi
i need to run a big query say 50line query which gives me 5 output
2943 Records, Jan 5 2007 1:23AM
197 Records, Feb 28 2006 1:00PM
No Data
No Data
1 Records, Jan 6 2007 8:01PM
i need to export the query out to a c:\data\test.txt file
is it possible to
use dcp,isql,osql
C:\>bcp "SELECT GETDATE()" queryout testfinal.txt -c -t ","
-Uxyz -Pabc -Sserverab
C:\>isql -Sserverab -Uxyz -Pabc -d northwind -q"select getdate()" -o.\erappa.txt
how can i do this i dont want to use DTS or query analyzer
i need to this by command prompt(windows)
thanxs
January 8, 2007 at 6:42 am
"osql -?" for list of options, check books online for more information on each one ( http://msdn2.microsoft.com/en-us/library/ms162806.aspx .
I belive the option you're after though is:
-i inputfile
where inputfile is a file containing some sql to run.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply