473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Concatenation getting truncated

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
3 3240
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ralph Freshour | last post by:
I have a form where the user can enter text - I noticed that if I enter a sentence like: That is what I'm thinking that when I save that string into a php global session variable, when I use...
1
by: Bill | last post by:
I'm submitting data through a form with multiple rows on it, that goes out to a processing page, which then scrolls through the data row by row and sends it into a database table. It is...
17
by: Howard Kaikow | last post by:
How do I find where I am screwing up? Using the following in Eudora, and equivalent links elsewhere, the URLs with the # get truncated just before the #. <a...
2
by: sp | last post by:
Hello everybody, I have an xml doc and I am trying to write the values from xml file to a tab delimited text file. Currently, what I am doing is I am reading xml file through XpathNavigaotr and...
2
by: bil.shah | last post by:
Hi, I am listening to a port for data but I am not able to recieve whole data, I only get truncated data. Client sends me data that exceeds 40K and the data I recieve in my callback function is...
12
by: Jack | last post by:
Since, I have not got some desired advise, I am reposting this for some asnwer/valuable suggestion. Thanks. THE FOLLOWING IS A PART OF CODE FROM A ASP PAGE <% sql01 = "SELECT COUNT(*) AS...
4
by: R.Manikandan | last post by:
Hi In my code, one string variable is subjected to contain more amount of characters. If it cross certain limit, the string content in the varabile is automatically getting truncated and i am...
1
by: Veeru71 | last post by:
When I am SELECT'ing a CLOB column from command prompt, the output is getting truncated after a certail limit (8 K ??) How do I get the full data out of a CLOB column? Are there any string...
4
by: crs27 | last post by:
Hai All, This is my create statement CREATE TABLE `dbname`.`tablename` ( `vh_id` int(10) unsigned NOT NULL, `gh_utc` time NOT NULL, `gh_mydate` date default NULL, `gh_serverdate_time`...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
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,...
0
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...

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.