S
Steven Livingstone
Working on this just now, but maybe someone has a quick answer for me
I simly want to say that is the param is NULL, then use the default value.
This fails - some problem with default :S
"Incorrect syntax near the keyword 'DEFAULT'."
declare @someid INT
SET @someid = NULL
insert into mytable (id, otherid)
values (323, COALESCE(@someid, DEFAULT))
This works fine
insert into mytable (id, otherid)
values (323, DEFAULT)
Anyone?
regards,
Steven.
I simly want to say that is the param is NULL, then use the default value.
This fails - some problem with default :S
"Incorrect syntax near the keyword 'DEFAULT'."
declare @someid INT
SET @someid = NULL
insert into mytable (id, otherid)
values (323, COALESCE(@someid, DEFAULT))
This works fine
insert into mytable (id, otherid)
values (323, DEFAULT)
Anyone?
regards,
Steven.