473,513 Members | 3,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

export data without trailing spaces

Hello,
when I export data from a table to a text file, I get trailing spaces
if the data type in char. (This dosen't happen if the data type is
varchar). I can get rid of the spaces by using the trim() function on
every signle column. here is an example:
DTSDestination("first_name") = DTSSource("last_name")

My question is:
Is there any easier way to get ride of the training spaces for all
columns when exporing a table? It is too time consuming if I have to
type trim() for every single column in the table.
Thank you in advance,
Eddy

Jul 23 '05 #1
1 3989
Hi

You can create a trim string transformation for the columns you wish to
trim. Depending on what currently have you may have to remove them from the
current transformation and create a new one.

John

<ed********@hotmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hello,
when I export data from a table to a text file, I get trailing spaces
if the data type in char. (This dosen't happen if the data type is
varchar). I can get rid of the spaces by using the trim() function on
every signle column. here is an example:
DTSDestination("first_name") = DTSSource("last_name")

My question is:
Is there any easier way to get ride of the training spaces for all
columns when exporing a table? It is too time consuming if I have to
type trim() for every single column in the table.
Thank you in advance,
Eddy

Jul 23 '05 #2

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

Similar topics

3
11739
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem...
5
2936
by: Michael Hill | last post by:
Hi, folks. I am writing a Javascript program that accepts (x, y) data pairs from a text box and then analyzes that data in various ways. This is my first time using text area boxes; in the past, I have used individual entry fields for each variable. I would now like to use text area boxes to simplify the data entry (this way, data can be...
7
7385
by: ITM | last post by:
Can anyone tell me how I can prevent Access adding trailing spaces when I insert a value into a Text column? For example, if I execute the following statement: UPDATE Log SET Log.Title = 'Testing' WHERE Log.Identifier=1; ....then the following statement:
5
3352
by: Stan Shankman | last post by:
How do I add trailing spaces within a right-justified textBox? In order to add a trailing space to the text in a right-justified textBox, I use to just append a space to the end of the text string. But now, textBox seems to have gotten smarter, as it automatically remove trailing spaces. So the question remains: How now do I add...
4
4359
by: Albert | last post by:
This isn't entirely related to C, but Kernighan and Ritchie asks in Execise 1-18 of their C programming language book to 'Write a program to remove trailing blanks and tabs from each line of input, and to delete entirely blank lines'. What do they mean by trailing?
14
6417
by: bonehead | last post by:
Greetings, I'm using the DoCmd.TransferText method to export the results of a MS Access query to a csv file. The csv will then be used to load an Oracle table. In other systems such as TOAD for Oracle, it's possible to force an additional comma delimiter after the last column, if the column is empty on a particular row. Oracle requires...
9
7676
by: NEWSGROUPS | last post by:
I have data in a table in an Access 2000 database that needs to be exported to a formatted text file. For instance, the first field is an account number that is formatted in the table as text and is 8 characters long. This field needs to be exported as pic(15) padded in the front with 0's (zeros). The next field an ID name that is 15...
5
2939
by: brian.j.parker | last post by:
Hey all, I've noticed an obscure little quirk: it appears that if you use a login with trailing spaces on the name, SYSTEM_USER automatically trims those trailing spaces in SQL Server 2000, but not SQL Server 2005. Anybody know if this change in behavior is documented? If it is intentional? Is there a "quick fix" to revert to the old...
1
3299
by: maryanncanor | last post by:
Hi everyone, My problem is whenever I export a report to a textfile. The output textfile have blank spaces. Here is my query: SELECT ( & '|' & & '|' & ......................and so on .........................AS EXPR1 FROM ;
0
7270
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...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7563
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7125
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...
0
7543
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...
0
5703
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...
0
4757
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...
0
3252
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...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.