Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 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 May 29th, 2007, 05:04 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to vinchellam
Default varchar(max) in sql server 2005

how to use varchar(max) in sql server 2005 and doesn't support varchar(max) in sql 2005

vinoth
 
Old May 29th, 2007, 07:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

How did you use that ? can you post here your code that you tried?

_________________________
- Vijay G
Strive for Perfection
 
Old May 30th, 2007, 02:48 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to vinchellam
Default

declare @content varchar(max)
create table <table_name> (nam varchar(max))

vinoth
 
Old May 30th, 2007, 03:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I dont understand what you mean "it doesn't support", do you see any errors? IF so whats that?

This always works in SQL server 2005
Code:
CREATE TABLE BigStrings
(
    BigString VARCHAR(MAX)
)
Both your statements work good in sql server 2005

_________________________
- Vijay G
Strive for Perfection
 
Old May 31st, 2007, 10:32 AM
Authorized User
 
Join Date: Oct 2005
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are getting an error when you declare a variable as VARCHAR(MAX), maybe the database you are connecting to is not really SQL Server 2005 but SQL Server 2000. You may be connected to a SQL Server 2000 database from SQL Server 2005 Management Studio.

For other FAQ about VARCHAR(MAX), refer to the following link:

http://www.sql-server-helper.com/faq...r-max-p01.aspx

SQL Server Helper
How well do you know SQL? Find out with the free test assessment from SQL Server Helper!!!
http://www.sql-server-helper.com/free-test/default.aspx

Got a SQL Server Question? Ask us here: http://www.sql-server-helper.com/forums/default.asp





Similar Threads
Thread Thread Starter Forum Replies Last Post
reg conn to sql server 2005 from vb.net 2005.. veda SQL Server 2005 2 July 1st, 2008 12:16 AM
Conflict in SQL Server 2000 and SQL Server 2005 ayan.mukherjee SQL Language 0 June 30th, 2008 03:34 AM
Cast varchar as int SQL Server 2005 mr_pc1963 SQL Language 2 April 23rd, 2008 06:09 AM
migrating from sql server 2000 to sql server 2005 abinashpatra SQL Server 2005 2 December 1st, 2006 03:45 PM
Text/large varchar fields in SQL server pseudomorph Classic ASP Databases 0 August 16th, 2006 11:50 PM





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