Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mojpro
Starting Member
15 Posts |
Posted - 2007-04-22 : 13:42:15
|
| Has anyone experienced problem with ntext as memo field? What is the proper field type? text? ntext, nvarchar, varchar?Thanks. |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-04-22 : 13:49:19
|
| I believe it would be varchar(max)************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
mojpro
Starting Member
15 Posts |
Posted - 2007-04-22 : 13:52:52
|
| wonderful! Thanks a lot.Shall I determine "max", like:varchar(2000) ? |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-04-22 : 15:14:49
|
| no. you use varchar(max)max is a keyword not a number you should put in._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
mojpro
Starting Member
15 Posts |
Posted - 2007-04-22 : 15:57:38
|
| Thank you Spirit1 |
 |
|
|
mahesh_bote
Constraint Violating Yak Guru
298 Posts |
Posted - 2007-04-24 : 10:26:58
|
quote: Originally posted by spirit1 no. you use varchar(max)max is a keyword not a number you should put in._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp
max is a keyword not a number you should put in. so does it mean, u can specify any upper, more than 8000, limit for storing data for VARCHAR? if no, then what is the maximum limit for such datatype in SQL 2005.thanks in advance,Mahesh |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-04-24 : 10:38:31
|
| you must use it like this:declare @var varchar(max)select @var = replicate('abcd ', 5000)select @varread about this in BOL = books online = sql server help.this will be 25000 bytes long_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-24 : 11:18:05
|
| I believe VARCHAR(MAX) is 2,147,483,647 bytes long. Exactly as old datatype TEXT was.Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|
|
|