I am trying what I though was simple, copy a record, change a field and paste it back into the table. I am using the Pubs database for practice. I copied an example and modified it. Thought I was home free- this is the code
CREATE table #MyTemp AS SELECT * FROM dbo.jobs WHERE job_id =14;
UPDATE #MyTemp SET job_desc = 'Big Pest' where job_id = 14;
UPDATE #MyTemp SET job_id = null;
INSERT INTO dbo.jobs SELECT * FROM #MyTemp;
DROP TABLE #MyTemp;
I get an incorrect syntax near 'AS'
Please help, I just shoveled 30" of snow from a storm that predicted 6-8" so I'm felling low enough.