Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bulk out with format file?

Status
Not open for further replies.

goldyr

Programmer
May 26, 2003
25
SE
Hi!
I need to export data from a table to a file with fixed column lengths. I do´nt want any column separator at all. Can I use a format file in bulk out? Or do you have any other suggestions how to solve this?
Lenght Output
Column Datatype Table Length
value1 varchar 2 2
Action char 2 2
CustomerID uniqueidentifier 16 32
CustomerNumber nvarchar 20 10
OrganisationNumbe nvarchar 22 11
Name1 nvarchar 72 36
Address nvarchar 160 160
ZipCode nvarchar 20 10
City nvarchar 48 24
County nvarchar 72 36
State nvarchar 4 2
CountryCODE nvarchar 6 3
Phone nvarchar 32 16
Fax nvarchar 32 16
DistrictCODE nvarchar 6 3
CustomerGroupCODE nvarchar 6 3
CreateDATE float 8 8
UpdateDATE float 8 8
 
Just right click on the table or query you want to export and choose Export..., then give the file a name and choose a location to save it to and also choose the export file type; which in your case would probably be Text Files, click the Export button. A Dialog box will pop up, now click on Advanced on the bottom left of the dialog box that pops up and set up the export format the way you want. You can also save the format so you can use it over and over.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top