MySQL Forums
Forum List  »  Microsoft SQL Server

Re: Calling stored procedures from other stored procedures. Possible?
Posted by: Roland Bouman
Date: June 16, 2006 04:32AM

I'm hearing two different things here - 1) joining tables 2) calling procedures.

To be clear on this - in MySQL, you cannot reuse the resultset returned from a stored procedure in the calling statement. I know you can in SQL Server, but you cant here. Period.

So, if you want to comine records from different tables, use join:

select *
from company c
inner join individual i
on c.companyid = i.companyid

If you want to call a stored procedure, use call:

call myproc();

Ok, now your requirements:

"If Individual is linked to company the Individual should be automatically be added to company record through Contact Stored procedure."

Correct me if im wrong, but i think that for a Individual to be "...linked to company.", the individual record would have a value in it;s companyid column that identifies a record in the company table, right? If that is so, why do you want to modify the company record? What do you mean by "..added to company record.."?

PLease provide (pseudo)code to illustrate your requirements.

Roland

Options: ReplyQuote


Subject
Written By
Posted
Re: Calling stored procedures from other stored procedures. Possible?
June 16, 2006 04:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.