Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 845

PB Newbie - StoredProc within a StoredProc

$
0
0

Hi PB Gurus!

 

 

A newbie needs help again.

 

Scenario:

 

I have three tables.

 

table1 contains emp_id and dept_id and table2 contains dept_id and dept_name and table3 is empty.

 

Now, what I need to do is, insert to table3, the emp_id and dept_id from table1 and also dept_name from table2.

 

I'm thinking to create a SP1 to get the dept_name from table2 and have it matched in dept_id in table1

 

and execute another SP2 within the SP1 to insert the emp_id, dept_id and dept_name to table3.

 

How can I achieve this?

 

 

 

 

TIA,


Viewing all articles
Browse latest Browse all 845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>