
Untitled
By: a guest on
Aug 5th, 2012 | syntax:
None | size: 1.03 KB | hits: 8 | expires: Never
Try to insert a record into a table with select and join
Insert into seda_owner.seda_lookup(table_name,description,sequence,value)
Select 'DEFAULT_CATE_CHG_ITEMS_DOCS','Software Requirements Specification', '1',
(select **value** from seda_owner.seda_document a
join seda_owner.seda_lookup b
on b.value = a.guid and description = 'Software Requirements Specification');
Insert into seda_owner.seda_lookup(table_name,description,sequence,value)
Select 'DEFAULT_CATE_CHG_ITEMS_DOCS','Software Requirements Specification', '1',
(select **value** from seda_owner.seda_document a
inner join seda_owner.seda_lookup b
on b.value = a.guid and description = 'Software Requirements Specification')
from dual;
Insert into seda_owner.seda_lookup(table_name,description,sequence,value)
Select 'DEFAULT_CATE_CHG_ITEMS_DOCS','Software Requirements Specification',
'1', **value**
from seda_owner.seda_document a
inner join seda_owner.seda_lookup b
on b.value = a.guid and description = 'Software Requirements Specification'