i am trying to add a select in an insert statement but one of my parameters is not part of the select and i d'ont know how to handle this. would you mind helping me please, thanks
what i want to achieve is :
- inserting data into my table installs_workflows(install_id,action_id,order)
- the first col (install_id) is fixed (already defined value i have in my code)
- i want to gather the data for the two last columns in another select
i wanted to do something like this but i'm not sure it will work
insert into installs_workflows(install_id,action_id,order)
values("myIDhere", (select action,order from installs_actions where ostype=0))
let me know if you don't understand what i'm trying to achieve, thanks.
(in fact, for each result found in the SELECT statement, i want to insert them in the table installs_workflows with a specific install_id (that is the same)
thanks again
ps : or can i add a dmmy value in the select maybe ? this way i could do something like :
insert into installs_workflows(install_id,action_id,order)
select "MyID",action,order from installs_actions where ostype=0