Advertisement

02.22.2008 at 12:01PM PST, ID: 23185666
[x]
Attachment Details

Removing whitespace from output file (.csv).

Asked by Homer2040 in MS SQL Server, VB Script

Tags: MS, SQL Server, 2000, vbscript, dos bat

Experts,

I am using a batch file to execute OSQL, which executes an SP to extract data and place it in an CSV file. Then the batch file calls a vbscript file to relocate it and email it as an attachment.

My problem is this...

When the data is extracted the full db column width is used for the csv file column width.
(IE: the db field is a varchar 50, and the actual # of chars in the field is only 40, so it's padded with 10 more whitespaces)

Is there a way to remove the whitespace so the csv file does not show all the extra padding?

Thanks.

H.
Start Free Trial
[+][-]02.22.2008 at 12:07PM PST, ID: 20960927

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.22.2008 at 12:12PM PST, ID: 20960962

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.22.2008 at 12:12PM PST, ID: 20960965

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.22.2008 at 12:17PM PST, ID: 20961000

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.22.2008 at 12:24PM PST, ID: 20961058

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.22.2008 at 12:26PM PST, ID: 20961079

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, VB Script
Tags: MS, SQL Server, 2000, vbscript, dos bat
Sign Up Now!
Solution Provided By: bhess1
Participating Experts: 3
Solution Grade: A
 
 
[+][-]02.22.2008 at 01:07PM PST, ID: 20961433

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.22.2008 at 01:09PM PST, ID: 20961457

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.25.2008 at 10:32AM PST, ID: 20977942

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628