Sql Server - Insufficient result space to convert uniqueidentifier value to char -


i getting below error when run sql query while copying data 1 table another,

msg 8170, level 16, state 2, line 2 insufficient result space convert uniqueidentifier value char.

my sql query is,

insert dbo.cust_info ( uid, first_name, last_name ) select newid(), first_name, last_name dbo.tmp_cust_info 

my create table scripts are,

create table [dbo].[cust_info](     [uid] [varchar](32) not null,     [first_name] [varchar](100) null,     [last_name] [varchar](100) null)  create table [dbo].[tmp_cust_info](     [first_name] [varchar](100) null,     [last_name] [varchar](100) null) 

i sure there problem newid(), if take out , replace string working.

i appreciate help. in advance.

a guid needs 36 characters (because of dashes). provide 32 character column. not enough, hence error.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -