sql server - insert into select from sql query with both query and static values -


i trying perform insert query 1 specific column table plus 2 static values, trying this:

insert tablea(policyid, type, used) select id policies, 'a', 1  

but getting error near 'a' per ssmse. idea how can tackle task? in advance, laziale

you'll need put these static values in select clause:

insert tablea(policyid, type, used) select id, 'a', 1 policies 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

html - Accumulated Depreciation of Assets on php -

#1062 - Duplicate entry '' for key 'unique_id' When Trying to add UNIQUE KEY (MySQL) -