nvarchar(max)
I have a nvarchar(MAX) “Description” field in my SQL Server 2005 database. Somewhere I think I read that nvarchar(MAX) is the size of 4000.
My question is in my Insert Stored Proc
setANSI_NULLSON
setQUOTED_IDENTIFIERON
GO
ALTERPROCEDURE [dbo].[syl_CodeScheduleTypeInsert]
@.ScheduleName nvarchar(50),
@.ScheduleDescription nvarchar(????)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SETNOCOUNTON;
BEGINTRY
INSERTI
What number should replace the ???? with? nvarchar(4000) is that correct?
I tried nvarchar(MAX) and nvarchar but both versions only input one character into my database table.
Please help a newbie out, cheers!
No NVarchar (max) is more than 4000 because it can grow to 2 gig so the ?? can be replaced with any thing between 4000 and 2gig. There are restriction using this data type like no Order By and some other clauses because it is bigger than one SQL Server page which is NVarchar 4000. Try the links below for details. Hope this helps.
http://msdn2.microsoft.com/en-us/library/ms186939.aspx
http://msdn2.microsoft.com/en-us/library/ms187752.aspx
|||
newbie06:
I tried nvarchar(MAX) and nvarchar but both versions only input one character into my database table.
This sounds strange. How did you use the @.ScheduleDescription nvarchar(max) parameter in your stored procedure?
No comments:
Post a Comment