Re: varchar cutting at 257th
From: Wayne Snyder (wayne.nospam.snyder_at_mariner-usa.com)
Date: 08/09/04
- Next message: Andrew John: "Re: SQL Trigger"
- Previous message: Chris Bilson: "Re: Reading Transaction Log Files"
- In reply to: Mawron: "varchar cutting at 257th"
- Next in thread: Mawron: "Re: varchar cutting at 257th"
- Reply: Mawron: "Re: varchar cutting at 257th"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 9 Aug 2004 08:21:23 -0400
To add to Keiths response... The data is being correctly stored in the
database. Query Analyzer was truncating the data from the display.
-- Wayne Snyder, MCDBA, SQL Server MVP Mariner, Charlotte, NC www.mariner-usa.com (Please respond only to the newsgroups.) I support the Professional Association of SQL Server (PASS) and it's community of SQL Server professionals. www.sqlpass.org "Mawron" <mawronthefounder@SPAMBLOCKyahoo.it> wrote in message news:HaJRc.36605$OH4.1039581@twister1.libero.it... > Hi to all. > Please take a look at this simple code and the inline comments: > > -- start here -- > declare @t varchar(2000) > > set @t='12345678901234567890' -- 20 chars > set @t=@t+@t -- @t now contains 40chars > set @t=@t+@t -- 80 > set @t=@t+@t -- 160 > set @t=@t+@t -- 320 > set @t=@t+@t -- 640 chars > > -- this line print all the 640 characters > print @t > > -- the table has a column declared as varchar(2000) > insert into table > (columnName) > values > (@t) > > -- the query should return all the 640 chars, but... > -- only the first 257 chars are memorized! :( > select * > from table > -- stop here -- > > The code comes from a stored procedure I wrote to test my real db table. > Why only the first 257 chars are inserted? I don't understand... :( > > -- > . . * + > . . Mawron . * > * . . . +
- Next message: Andrew John: "Re: SQL Trigger"
- Previous message: Chris Bilson: "Re: Reading Transaction Log Files"
- In reply to: Mawron: "varchar cutting at 257th"
- Next in thread: Mawron: "Re: varchar cutting at 257th"
- Reply: Mawron: "Re: varchar cutting at 257th"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|