Skip navigation links

MySQL Forums :: PHP :: Paasing Table name to Query from another Table in stored procedure


Advanced Search

Paasing Table name to Query from another Table in stored procedure
Posted by: Manthan Tripathi ()
Date: January 26, 2013 07:38AM

Hi,
My application structure is like this,
I have 3 companies and each company has different table.
like for company1's data table name is table1, for company2's data table2.

So i made a table to map company id to its table name.
Now i want to have my table name in Stored procedure And traverse through the result of the executed query.

My problem is:
Cursor can't have dynamic queries.

And I want to do this for several times in stored procedure. And my database tables are large enough.
So i can't use temporary tables or views.
If it is any other way please suggest it.

Options: ReplyQuote


Subject Written By Posted
Paasing Table name to Query from another Table in stored procedure Manthan Tripathi 01/26/2013 07:38AM
Re: Paasing Table name to Query from another Table in stored procedure Barry Galbraith 01/27/2013 06:10PM
Re: Paasing Table name to Query from another Table in stored procedure Manthan Tripathi 01/27/2013 11:50PM
Re: Paasing Table name to Query from another Table in stored procedure Barry Galbraith 01/28/2013 12:16AM
Re: Paasing Table name to Query from another Table in stored procedure Manthan Tripathi 01/28/2013 04:59AM
Re: Paasing Table name to Query from another Table in stored procedure Barry Galbraith 01/28/2013 02:45PM
Re: Paasing Table name to Query from another Table in stored procedure Rick James 01/27/2013 10:04PM
Re: Paasing Table name to Query from another Table in stored procedure Manthan Tripathi 01/27/2013 11:53PM


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.