x

Create Table syntax - flat file

Is there some way to use the create table statement...something like...

CREATE TABLE c:\test.xxx columns....etc.

To create a flat file to hold table data, to where I could then use an INSERT statment to add data to the file.

I think I remember seeing a way to do something like this, but now I can't seem to find the syntax.

more ▼

asked Feb 12, 2010 at 03:51 PM in Default

Jim Czerniak gravatar image

Jim Czerniak
24 4 4 4

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

No, but you can BCP the data out to a file, it can either be pushed out from the table as is, or you can use a format file, something like:

http://www.nigelrivett.net/SQLTsql/MoveImportData.html

I can't think of any way of inserting any new data without shelling out to the command line..

more ▼

answered Feb 15, 2010 at 10:32 AM

RickD gravatar image

RickD
1.7k 1 1 4

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x476
x415

asked: Feb 12, 2010 at 03:51 PM

Seen: 766 times

Last Updated: Feb 12, 2010 at 03:51 PM