I'm not a SQL expert, but have a stored procedure query to insert a record into a table. I have a select call in my insert query to replace a NULL DateTime field to ''. But for some reason it doesn't work. The DateTime field is still NULL in the database table after the insert. Could someone look at the query below let me know if the select call to clear the DateTime field is valid to do in the same insert call.
CREATE PROC pCreate_DBQuery
INSERT INTO dbo.TestTbl(Message, DateTime)
VALUES (@Message, @DateTime)
SELECT ISNULL(@ProcessedDateTime,'1900-01-01') AS [Changed Processed
EXEC pCreate_DBQuery 'None', NULL
Table results from insert