Wednesday, March 21, 2012

Exporting a table to a file -reg

Dear Friends,
I am having Sql Server 2005 Express Edition. Also I have installed "Sql
Server Management Studio Express".
In "Sql Server Management Studio Express", how to export a table to a csv
file, or to another table?
Thanks & Regards,
Thirumalai.Hi
Use AdventureWorks
--Import to another table
SELECT * INTO Person.Address_New FROM
Person.Address
SELECT * FROM Person.Address_New
--Import to the file
exec master..xp_cmdshell 'BCP AdventureWorks.Person.Address_New OUT
c:\test1.txt -c -C850 -SSERVER\SQLSERVERDEV2005 -Usa -Ppwd'
"Thirumalai" <thirumalai@.cspl.com> wrote in message
news:eiQpaM$SGHA.4452@.TK2MSFTNGP12.phx.gbl...
> Dear Friends,
> I am having Sql Server 2005 Express Edition. Also I have installed "Sql
> Server Management Studio Express".
> In "Sql Server Management Studio Express", how to export a table to a csv
> file, or to another table?
> Thanks & Regards,
> Thirumalai.
>
>

No comments:

Post a Comment