Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 copy

Author  Topic 

thelak
Starting Member

5 Posts

Posted - 2010-09-23 : 07:42:44
How to copy a content of the table fully in to text file
please provide the command

Reg
Thelak

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2010-09-23 : 07:52:53
Look up BCP, the best way to learn is to find out yourself.
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2010-09-23 : 08:02:44
RickD -- generally I'd agree with you..... but BCP is bit horrible your first time.

thelak -- try here: http://www.sqlteam.com/article/exporting-data-programatically-with-bcp-and-xp_cmdshell

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2010-09-23 : 08:03:09
Example

bcp "SELECT * FROM pubs..authors" queryout authors.txt -U garth -P pw -c


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

thelak
Starting Member

5 Posts

Posted - 2010-09-23 : 09:00:19
Hi charlie,
I am not working in T-sql please help me to know these things in sql server please.


Reg
Thelak
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2010-09-23 : 09:15:02
quote:
Originally posted by thelak

Hi charlie,
I am not working in T-sql please help me to know these things in sql server please.

Reg
Thelak


..................?

T-SQL is the flavour of SQL used by Microsoft SQL Server (it's short for TRANSACT SQL) (because it has transactions).

Are you using microsoft SQL SERVER? or something else. If you are not using Microsoft SQL SERVER then we won't be able to help you.

BCP is a command line utility.



Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2010-09-23 : 09:45:01
Snap:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=150546

Did the OP copy and paste their answer?
Go to Top of Page
   

- Advertisement -