By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,263 Members | 1,321 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,263 IT Pros & Developers. It's quick & easy.

SQL field sep question

P: n/a
currently my select produces the following output:

"a", "b", "c"

I would like it to be:

a | b | c

does anyone know of a way to eliminate the double quotes and substitute
the pipe for the comma ?

thanks,

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi

Are you saying that you have double quotes in the data? Posting DDL (Create
table statements etc...) http://www.aspfaq.com/etiquette.asp?id=5006 and
example data as insert statements http://vyaskn.tripod.com/code.htm#inserts
would help to remove any ambiguity in the questions

For example:
CREATE TABLE myTable ( col1 char(1), col2 char(1), col3 char(1) )

INSERT INTO MyTable ( col1, col2, col3 ) Values ( 'a', 'b', 'c' )

SELECT Col1, Col2, Col3 FROM MyTable

/* Returns
Col1 Col2 Col3
---- ---- ----
a b c

(1 row(s) affected)
*/

SELECT Col1 + '|' + Col2 + '|' + Col3 FROM MyTable
/* Returns

-----
a|b|c

(1 row(s) affected)
*/

John

<th*****@mindspring.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
currently my select produces the following output:

"a", "b", "c"

I would like it to be:

a | b | c

does anyone know of a way to eliminate the double quotes and substitute
the pipe for the comma ?

thanks,

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.