sql server - Sql Create Table Code Failing -


for life of me don't know why code below failing. input appreciated. many thanks.

create table #t_dem_pflow                (unit varchar(10),               source varchar(7))                insert #t_dem_pflow                 (unit, source)               values     insert #t_dem_pflow                 (unit, source)               values     /*        insert #t_dem_pflow                 (unit, source)               values           */            create table #t_dem_decsvc           (unit varchar(10),           source varchar(7))             insert #t_dem_decsvc            (unit, source)           values             create table #t_dem_inunsched            (unit varchar(10), source varchar(7))   insert #t_dem_inunsched (unit, source) values 

error message:

msg 156, level 15, state 1, line 10 incorrect syntax near keyword 'insert'.

msg 156, level 15, state 1, line 22 incorrect syntax near keyword 'create'.

msg 156, level 15, state 1, line 32 incorrect syntax near keyword 'create'.

msg 102, level 15, state 1, line 38 incorrect syntax near 'values'.

your insert statements incomplete..

your current syntax:

insert #t_dem_inunsched (unit, source) values 

what should be:

insert #t_dem_inunsched (unit, source) values ('unit name', '/source') 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -