Need help constructing SQL query with subquery

I need to create a view that will insert data into a table using the id from a record in another table...Here's my data setup:

WorkflowRules table
5                    |  Escalate
6                    |  Test

WorkflowActionLinks table
1                                     5
2                                     5

select * from workflowrules where wkrl_caption = 'escalate'

then use the WKRL_RULEID (record 5) to INSERT into individual records into the WorkflowActionLinks table-- the ACLI_ACTIONGROUPID and WKRL_RULEID are the tied keys in the relationship.  So, using one SQL statement per INSERT into the WorkflowActionLinks, how can I create an INSERT statement with a subquery using my SQL query above?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


did you mean something like this..

FROM WorkflowRules

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
saturationAuthor Commented:
Almost, but it uses the WKRL_RULEID from the other query as the ACLI_ACTIONGROUPID.
This query does you what you mentioned.. if you something different can you explain more details...
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

saturationAuthor Commented:
Well, the statements above are separate...I need to take use the ID from the first select statement and use that ID as the data forACLI_ACTIONGROUPID on the INSERTing into WorkflowActionLinks.  Is it possible?
can you explain what you want clearly?..
SharathData EngineerCommented:
Your requirement is not clear. As tigin44 mentioned, the query should work for you. If you want more details on what are all the ways to INSERT data, you can refer 
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.