Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2006, 05:38 PM
Authorized User
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to assign string length of more than 256

I am unable to assign a string variable more then 256 characters.
 when i display that string it simply truncates and display only first 256 characters.


declare @simply varchar(400)
set @simply='
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwx yzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv wxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst uvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqr stuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnop qrstuv01234567783343'
'
select @simply see

OUTPUT

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwx yzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv wxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst uvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqr stuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnop qrstuv

It is not showing numbers assigned even if the range in varchar is 400
what can be the problem here. is something needs to be configured properly.
Please let me know about this

thanks in advance



regards
rahul pokharna
__________________
regards
rahul pokharna
 
Old January 8th, 2006, 07:16 PM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

In Query Analyzer Click on the Tools Menu and then select Options. Goto the Results tab. Look in the Maximum characters per column. I'll bet that it says 256. So change it 8000.


David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com
 
Old January 9th, 2006, 10:57 AM
Authorized User
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks David for the quick reply but sorry for late confirmation

regards
rahul pokharna
 
Old January 12th, 2006, 04:58 PM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

rahulpokharna:
No Sweat! The first time that happened to me right after installing SQL 2000 for the first time,
I thought I had discovered a major bug. Instead it turned out to a feature -- but one you can
control.

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable so assign value to .Lookin Property Colster Excel VBA 1 August 24th, 2007 03:16 PM
How to fix string length Ivanchan Excel VBA 2 July 26th, 2007 08:55 AM
string-length problem alapati.sasi XSLT 3 July 4th, 2007 10:08 AM
Assign string to what object? tranzformerz ASP.NET 1.0 and 1.1 Basics 5 August 26th, 2005 06:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.