Hi
This looks like you are starting a command prompt and running osql/isql? You
may want to look at adding SET NOCOUNT ON to the SQL and using the -h flag
to osql/isql. Alternatively try the
DTS Export wizard or BCP utility. Mor information on all of these can be
found in Books Online.
John
"DraguVaso" <pietercoucke@.hotmail.com> wrote in message
news:OqhPeoEWEHA.208@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I tryed to Export a query to a Fiel with a Job.
> What I found in my file was this:
> "
> Job 'ExportToSiclid' : Step 1, 'ExportFile' : Began Executing 2004-06-22
> 13:16:07
> tdprNFoy tdprNCCD CallDate TEL Choice
> tdprNSocFin Agent
> -- -- -- -- -- -
--
> -- --
> 4240001034 9100 2004-06-22-13.13.48.71700 0478385115 Informatie
110
> Van den Hel, Heidi
> 4276454891 9100 2004-06-22-13.13.57.23300 0 FIDI
104
> Tanghe, Wendy
> (2 rows(s) affected)
> "
> What I actually expected and wanted was this:
> "
> 42400010349100 2004-06-22-13.13.48.717000478385115 Informatie110
> Van den Hel, Heidi
> 42764548919100 2004-06-22-13.13.57.233000 FIDI 104
> Tanghe, Wendy
> "
> So without the header, without the trailer, without the names of the
> columns, and without a space between the columns.
> Is this possible or not, and if so: how?
> Thanks a lot in advance,
> Pieter
>
Thanks,
And how do you put a DTS or BCP in a job so it is executed every day
automaticly?
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:uvJvr2EWEHA.556@.tk2msftngp13.phx.gbl...
> Hi
> This looks like you are starting a command prompt and running osql/isql?
You
> may want to look at adding SET NOCOUNT ON to the SQL and using the -h flag
> to osql/isql. Alternatively try the
> DTS Export wizard or BCP utility. Mor information on all of these can be
> found in Books Online.
> John
> "DraguVaso" <pietercoucke@.hotmail.com> wrote in message
> news:OqhPeoEWEHA.208@.TK2MSFTNGP10.phx.gbl...
> -- -- -- -- -- -
> --
> 110
> 104
>
|||Hi
If you run the DTS export wizard that will give you the option to schedule
the DTS job. This can also be changed in the created job. If you are already
running osql from your batch job, you can change the command to run BCP
instead.
John
"DraguVaso" <pietercoucke@.hotmail.com> wrote in message
news:eygYb4FWEHA.1048@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Thanks,
> And how do you put a DTS or BCP in a job so it is executed every day
> automaticly?
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:uvJvr2EWEHA.556@.tk2msftngp13.phx.gbl...
> You
flag[vbcol=seagreen]
2004-06-22[vbcol=seagreen]
> -- -- -- -- -- -
Informatie[vbcol=seagreen]
Informatie110[vbcol=seagreen]
104
>
|||Thanks!!
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:OCSgETGWEHA.2908@.TK2MSFTNGP10.phx.gbl...
> Hi
> If you run the DTS export wizard that will give you the option to schedule
> the DTS job. This can also be changed in the created job. If you are
already[vbcol=seagreen]
> running osql from your batch job, you can change the command to run BCP
> instead.
> John
> "DraguVaso" <pietercoucke@.hotmail.com> wrote in message
> news:eygYb4FWEHA.1048@.tk2msftngp13.phx.gbl...
osql/isql?[vbcol=seagreen]
> flag
be
> 2004-06-22
> -- -- -- -- -- -
> Informatie
> Informatie110
> 104
>
Showing posts with label command. Show all posts
Showing posts with label command. Show all posts
Wednesday, March 7, 2012
Sunday, February 19, 2012
Export through MS SQL Server
I am new to the MS SQL Server, is there any command that exports a Table form Microsoft SQL Server 7 to a delemiterd text file?
Also, how could it be automated? i.e not form the GUI but through the schedule manager
ThanksYou can use bcp or DTS to export a delimited file. With bcp, you need to look up xp_cmdshell in Books OnLine (BOL), and build a bcp string to execute via a scheduled SQLServer Agent job. With DTS (visit www.SQLDTS.com (http://www.SQLDTS.com) for an opportunity to learn about DTS) you build the DTS package and then schedule the job to run via SQLServer Agent.|||Thank you for your help, I'll have a look...
Thanks again|||I am new to the MS SQL Server, is there any command that exports a Table form Microsoft SQL Server 7 to a delemiterd text file?
Also, how could it be automated? i.e not form the GUI but through the schedule manager
Thanks
If you are looking to export to a delemited text file, BCP can do the Job faster than DTS !! u could schedule it as well..|||You can schedule dts. I usually save dts as stuctured storage files and launch them though the scheduler. dtsrun.|||u r right Ebola!! u can schedule dts as well!! my choice was for performace when the export is to txt files... I prefer BCP for that...
Also, how could it be automated? i.e not form the GUI but through the schedule manager
ThanksYou can use bcp or DTS to export a delimited file. With bcp, you need to look up xp_cmdshell in Books OnLine (BOL), and build a bcp string to execute via a scheduled SQLServer Agent job. With DTS (visit www.SQLDTS.com (http://www.SQLDTS.com) for an opportunity to learn about DTS) you build the DTS package and then schedule the job to run via SQLServer Agent.|||Thank you for your help, I'll have a look...
Thanks again|||I am new to the MS SQL Server, is there any command that exports a Table form Microsoft SQL Server 7 to a delemiterd text file?
Also, how could it be automated? i.e not form the GUI but through the schedule manager
Thanks
If you are looking to export to a delemited text file, BCP can do the Job faster than DTS !! u could schedule it as well..|||You can schedule dts. I usually save dts as stuctured storage files and launch them though the scheduler. dtsrun.|||u r right Ebola!! u can schedule dts as well!! my choice was for performace when the export is to txt files... I prefer BCP for that...
export the table to csv by command line
Hello:
Is it possible to export the table by command line. I
have try to use isql but the format is not like CSV.
Thanks a lot!isql.exe is the old DB-Lib version and does not support SQL Server 2000
features, use osql.exe.
In fact, what you probably want is bcp.exe. Something like:
bcp mydb..mytable out c:\mytable.csv -c -t, -T
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Alan wrote:
> Hello:
> Is it possible to export the table by command line. I
> have try to use isql but the format is not like CSV.
> Thanks a lot!
Is it possible to export the table by command line. I
have try to use isql but the format is not like CSV.
Thanks a lot!isql.exe is the old DB-Lib version and does not support SQL Server 2000
features, use osql.exe.
In fact, what you probably want is bcp.exe. Something like:
bcp mydb..mytable out c:\mytable.csv -c -t, -T
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Alan wrote:
> Hello:
> Is it possible to export the table by command line. I
> have try to use isql but the format is not like CSV.
> Thanks a lot!
export the table to csv by command line
Hello:
Is it possible to export the table by command line. I
have try to use isql but the format is not like CSV.
Thanks a lot!
isql.exe is the old DB-Lib version and does not support SQL Server 2000
features, use osql.exe.
In fact, what you probably want is bcp.exe. Something like:
bcp mydb..mytable out c:\mytable.csv -c -t, -T
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Alan wrote:
> Hello:
> Is it possible to export the table by command line. I
> have try to use isql but the format is not like CSV.
> Thanks a lot!
Is it possible to export the table by command line. I
have try to use isql but the format is not like CSV.
Thanks a lot!
isql.exe is the old DB-Lib version and does not support SQL Server 2000
features, use osql.exe.
In fact, what you probably want is bcp.exe. Something like:
bcp mydb..mytable out c:\mytable.csv -c -t, -T
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Alan wrote:
> Hello:
> Is it possible to export the table by command line. I
> have try to use isql but the format is not like CSV.
> Thanks a lot!
Export table to dbf file
I need to export certain fields of a table from sql 2000 into a dbf
file, but can't find the proper query command to make it work. I also
want to set this up to run each night automatically.
file, but can't find the proper query command to make it work. I also
want to set this up to run each night automatically.
Any help will be greatly appreciated.
RandyHi
You will probably need a scheduled DTS job, check out Books online for more
information about DTS and the following site is also very useful
http://www.sqldts.com/default.aspx
John
"Randy Henson" <rhenson@.cellxion.com> wrote in message
news:5dde95d2.0308220515.1232d9b5@.posting.google.c om...
> I need to export certain fields of a table from sql 2000 into a dbf
> file, but can't find the proper query command to make it work. I also
> want to set this up to run each night automatically.
> Any help will be greatly appreciated.
> Randy
Subscribe to:
Posts (Atom)