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

Concatenation getting truncated

P: n/a
Hello,

Using SQL SERVER 2000

I have 4 columns with varchar(80) each that I want to concatenate.
When I look at the result, it only gives me 256 characters. What am I
missing on my code?

Select Cust_Number, Info = convert(varchar(1000),rtrim(line1) +
char(13)+rtrim(Line2) + char(13)+ rtrim(line3) + char(13)+
rtrim(line4))
From tableOne

Go

Thank you for your input.

Edgar

May 24 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Edgar (ed*******@yahoo.com) writes:
Using SQL SERVER 2000

I have 4 columns with varchar(80) each that I want to concatenate.
When I look at the result, it only gives me 256 characters. What am I
missing on my code?

Select Cust_Number, Info = convert(varchar(1000),rtrim(line1) +
char(13)+rtrim(Line2) + char(13)+ rtrim(line3) + char(13)+
rtrim(line4))
From tableOne

Go


Probably nothing. If you are using Query Analyzer, look under
Tools->Options->Results->Maximum Characters per Column.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
May 24 '06 #2

P: n/a
On 23 May 2006 21:09:32 -0700, Edgar wrote:
Hello,

Using SQL SERVER 2000

I have 4 columns with varchar(80) each that I want to concatenate.
When I look at the result, it only gives me 256 characters. What am I
missing on my code?

Select Cust_Number, Info = convert(varchar(1000),rtrim(line1) +
char(13)+rtrim(Line2) + char(13)+ rtrim(line3) + char(13)+
rtrim(line4))
From tableOne

Go

Thank you for your input.

Edgar


Hi Edgar,

Query Analyzer is displaying only part of the results.

Click "Tools" / "Options" and activate the "Results" tab. Increase the
"Maximum characters per column" to at least 320. Now rerun the query.

--
Hugo Kornelis, SQL Server MVP
May 24 '06 #3

P: n/a
Thank you so much, Mr. Kornelis and Mr.Sommarskog, for your direction.

Now I can see all the data on my concatenated column.

Edgar J.

May 24 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.