Re: sql nvarchar(50)
From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 01/20/05
- Next message: Patrick: "Drop an article from transactional replication"
- Previous message: CPK: "Error Description"
- In reply to: psb: "sql nvarchar(50)"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 20 Jan 2005 13:28:09 -0600
There is probably more to this than that. This script works:
create table someTable
(
CategoryName nvarchar(50)
)
go
insert into someTable
select replicate('*',75)
go
alter table sometable
alter column CategoryName nvarchar(75)
go
insert into someTable
select replicate('*',75)
go
select * from someTable
go
drop table someTable
First time it fails, second time not. I would check:
1. The actual size of the string. It might be larger then 75, without
realizing it (my first test case was.) Use len(<value>) before your insert
to make doubly sure
2. Script out your table to make sure that the column size is actually
larger.
2. Code. Could there be triggers or something like that.causing your
issue?
-- ---------------------------------------------------------------------------- Louis Davidson - drsql@hotmail.com SQL Server MVP Compass Technology Management - www.compass.net Pro SQL Server 2000 Database Design - http://www.apress.com/book/bookDisplay.html?bID=266 Note: Please reply to the newsgroups only unless you are interested in consulting services. All other replies may be ignored :) "psb" <pbellman@msn.com> wrote in message news:O8BgILy$EHA.3120@TK2MSFTNGP12.phx.gbl... >I have a table with a column CategoryName as nvarchar(50). A new category > name I am trying to add has 59 charaters in it. I get the typical data > will > be truncated message. I then increase the table and sp to nvarchar(75), > and > I am still getting that error. It only allows 50. Are nvarchars stuck!! > Can these not be changed once they are set? I keep having problems with > nvarchars in dbs. this was an inherited db. I usually stick to char or > varchar > > thanks for any reply, > ~psb > >
- Next message: Patrick: "Drop an article from transactional replication"
- Previous message: CPK: "Error Description"
- In reply to: psb: "sql nvarchar(50)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|