Need help constructing SQL query with subquery
Posted on 2008-11-07
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:
WKRL_RULEID | WKRL_CAPTION
5 | Escalate
6 | Test
ACLI_ACTIONLINKID | ACLI_ACTIONGROUPID
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?