I have a SQL Server script that I'm using to insert some data into a database. I won't upload the whole script here just for space/time savings sake, but I will include the important bits.
So here is the problem. I have a table that has a column for some loginhtml
, this column is of a non-nullable type. I would like for this column to be left blank on this particular add so it can default back to the parent that I'm pointing it at. So here we have the declaration for this important portion:
declare @loginTitle varchar(250), @loginHtml varchar(max)
And here we have what it will be set to:
set @loginHtml = null
And here is the insert part that is inevitably going to fail:
insert dbo.ApplicationLogin(ApplicationID, Title, Html)
select @appID, @loginTitle, @loginHtml
EDIT: How can I have this script "default" the loginhtml column to whatever the PARENT Application is? Is there some "IF" statement/clause that can be used to accomplish this?