April 8, 2009 at 12:17 pm
I have 2 fields as varchar(4000) each.
Will this max out row size and return an error?
Many thanks!!!
CREATE TABLE [LogTransaction] (
[logid] [int] IDENTITY (1, 1) NOT NULL ,
[logTemplateid] [int] NULL ,
[logTitle] [varchar] (180) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logBody] [nvarchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logDescription] [varchar] (400) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logWhy] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logWhen] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logAction] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logImpact] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logSendDate] [smalldatetime] NULL ,
[logReminder] [bit] NOT NULL ,
[logReminderDate] [smalldatetime] NULL ,
[logEmailTo] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logOwner] [nvarchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logApprover] [nvarchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logStatus] [int] NOT NULL ,
[logRawHTML] [nvarchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logReminderRawHTML] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logErrors] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logSubmitDate] [smalldatetime] NULL CONSTRAINT [DF_LogTransaction_logSubmitDate] DEFAULT (getdate()),
[logApprovedDate] [smalldatetime] NULL ,
[logDepartmentID] [int] NULL ,
[logSendStatus] [int] NULL ,
[logReminderStatus] [int] NULL
) ON [PRIMARY]
GO
April 8, 2009 at 12:19 pm
Yes. Each NVARCHAR column could require up to 8000 bytes each.
April 8, 2009 at 1:50 pm
If you're on SQL 2005 you could use the NVARCHAR(MAX) datatype instead
April 8, 2009 at 2:02 pm
So what should I do?:cool:
Split data into 2 tables to handle this?
I am SQL Server 2000
April 8, 2009 at 2:23 pm
Split them off so each has its own table, with just the nvarchar and an ID column. Otherwise, you might have trouble with the other columns.
I'll ask Steve to move this thread to the right forum.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply