Showing posts with label myfile. Show all posts
Showing posts with label myfile. Show all posts

Friday, February 24, 2012

COPY to a .txt file

Hi,
How do I copy the rows in my table into a .txt file comma delimited.
I tried COPY mytable TO '/presentation/myfile' WITH DELIMITER ','
but it does not work
TIA
Roy GourgiThat's because SQL Server is not FoxPro<g>. Take a look at the Import /
Export wizard. You can get to it in Enterprise Manager by choosing Tools /
Import/Export.
Andrew J. Kelly SQL MVP
"Roy Gourgi" <royng@.videotron.ca> wrote in message
news:KO45g.43$hR6.20646@.weber.videotron.net...
> Hi,
> How do I copy the rows in my table into a .txt file comma delimited.
> I tried COPY mytable TO '/presentation/myfile' WITH DELIMITER ','
> but it does not work
> TIA
> Roy Gourgi
>|||You can create txt file using SQLCMD.
that is simmiliar to osql utitilty.
"Roy Gourgi"?? ??? ??:

> Hi,
> How do I copy the rows in my table into a .txt file comma delimited.
> I tried COPY mytable TO '/presentation/myfile' WITH DELIMITER ','
> but it does not work
> TIA
> Roy Gourgi
>
>

Copy to a .txt file

Hi,
How do I copy the rows in my table into a .txt file comma delimited.
I tried COPY mytable TO '/presentation/myfile' WITH DELIMITER ','
but it does not work
TIA
Roy GourgiHi Roy
That does not look like SQL Server syntax, which DBMS are you using? If you
are using SQL Server check out the utilities BCP or DTS to do this for you.
John
"Roy Gourgi" wrote:

> Hi,
> How do I copy the rows in my table into a .txt file comma delimited.
> I tried COPY mytable TO '/presentation/myfile' WITH DELIMITER ','
> but it does not work
> TIA
> Roy Gourgi
>
>

Copy to a .txt file

Hi,
How do I copy the rows in my table into a .txt file comma delimited.
I tried COPY mytable TO '/presentation/myfile' WITH DELIMITER ','
but it does not work
TIA
Roy GourgiHi Roy
That does not look like SQL Server syntax, which DBMS are you using? If you
are using SQL Server check out the utilities BCP or DTS to do this for you.
John
"Roy Gourgi" wrote:
> Hi,
> How do I copy the rows in my table into a .txt file comma delimited.
> I tried COPY mytable TO '/presentation/myfile' WITH DELIMITER ','
> but it does not work
> TIA
> Roy Gourgi
>
>