sql - why doesn't my nested insert statement work? -


insert mytable (id) values (        select id sometable seriesid not in (120, 130, 110, 300) ) 

i error message in ssms:

msg 156, level 15, state 1, line 1 incorrect syntax near keyword 'select'. msg 102, level 15, state 1, line 1 incorrect syntax near ')'.

if perform select in insert may skip values part

insert mytable (id)  select id  sometable  seriesid not in (120, 130, 110, 300) 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -