473,804 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL 2005 - Export table to a fixed width file.

I want to export a table into a "fixed width" file using SQL 2005
import export wizard.

This is the version I have:
SQL Server 2005 - 9.00.2047.00

For some reason it joins all the rows together. For EX: if the table
is like this:
Create table Mytable (col1 varchar(50) null, col2 varchar(60) null,
col3 varchar (100) Null)

Insert into MyTable values ("abcdef", "12345", "8900")

Insert into MyTable values ("xxxxxxx", "11111111", "22222222")
Insert into MyTable values ("yyyyyyyyy" , "55555555555555 55",
"6666666666 ")

Insert into MyTable values ("abcdef", "12345", "8900")

Insert into MyTable values ("xxxxxxx", "11111111", "22222222")
Insert into MyTable values ("yyyyyyyyy" , "55555555555555 55",
"6666666666 ")

It is not exporting every row in a single line. Actually if I open it
in "Ultra Edit", it is all in one line.
I used to do this regularly with SQL 2000 import export wizard and it
exported every row in one line.

I looked at the setting:

The header row delimiter has {CR}{LF}
Code page has 1252 Ansi-Latin.
In the Advanced tab:
String:dt_str.

I tried changing the header row delimiter to just {CR} or just {LF}.
Also I tried changing the string to dt_text and nothing seems to help.

Please help.

Thank you

Oct 31 '06 #1
0 1810

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2690
by: Ted Theodoropoulos | last post by:
i posted an earlier thread about exporting data from a subform in an ..ADP to an .MDB file. i had only one gracious response but it wouldn't work in the given situation. so i thought i would share the code with you that i wrote to solve the problem. certainly nothing sophisticated but it would have been very helpful to me had i gotten ahold of it when i started out to tackle the problem. i welcome any feedback. the solution uses a...
5
3437
by: Reggie | last post by:
Hi and TIA! I have a query that I want to save as a fixed-width text file. I can get the export to work using an export specification with one exception. This is a government message and they need the remarks field to print on a separate line from the details section and I can' figure out how to get the remarks to start on a new line. So what I want is (Start Column & Width in parenthesis) Nomen(1 - 21) PartNo(22 - 14) ...
10
14741
by: Neil | last post by:
Hi guyz, just trying out this google feature so if i post if in the wrong area i appologize. now to my question. BTW i'm new to access programming, i've done a little vb6.0 and vb.net but access vba is a little confusing for me since i have never used it plus i have lost touch with vb coding since last 8 monhts. anywayz, my problem is i'm trying to export a table that's modified by me which is taken from a file at a prompt, now i have to...
1
1589
by: ANDRESUK | last post by:
Everyone, I'm trying to export a table containing numeric fields with formats such as "00000000" which would return the value with some leading zeros. It works fine in the table as it is displayed as I want, the problem is that I lose the formats when I try to export the table to a TXT file; e.g. in the table the numeric field is displayed as 00034569 but it exports as 34569. I know I can convert the numeric field to "Text" with the...
3
3961
by: Daniel Wetzler | last post by:
Dear MSSQL- experts, I have a strange problem with SQLSERVER 2000. I tried to export a table of about 40000 lines into a text file using the Enterprise manager export assitant. I was astonished to get an exported text file of about 400 MB instead 16 MB which is the normal size of that data. By examining this file with a text editor I found that the file included alongside the data of my table MANY zeros which caused the big file size.
1
7735
by: gelangov | last post by:
I am sorry, I am posting this message again, since I did not get any reply. I want to export a table into a "fixed width" file using SQL 2005 import export wizard. This is the version I have: SQL Server 2005 - 9.00.2047.00
1
1929
by: jpetrie | last post by:
We're using Access 2003, on XP systems. All users are on SP2. We've written a database that works fine in IT, but the end users are not able to run it. The process includes exporting a table to a fixed-width txt file. The users are getting an error during the export. When the export starts (and this happens in manual exports as well), we choose a Save As type of Text Files, and name the file (for example, test.txt). We then click on...
3
10983
by: Wayne | last post by:
I'm trying to automate the export of a query to a text file using code. If I export the query manually I get the exact result that I want i.e. If I select the query then choose File/Export from the menu bar, choose "Text" as the save format, and then select "fixed width" as the export format, I end up with a fixed width text file with no column headers. I've tried to automate the process using: DoCmd.OutputTo acOutputQuery,...
0
2440
by: Max | last post by:
Hi I am trying to export an Access table to a fixed-width text file. The table contains 2 memo fields of approx. 1000 characters each. I am using the 'Export text wizard' to export. In this wizard I change the default width (512) of the memo fields to the required larger size but it still only exports as 512. This has always worked fine for me in Access 2003 but it is truncating
0
9712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10089
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9171
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.