Thanks, Shawn, I'll try the USE batabasename.tablename in a stored
procedure and see if that works.
Section 20.1 of the MySQL manual specifically refers to using USE within a
stored procedure.
Again, thanks for the reply.
rdo
At 09:44 AM 8/2/2004 -0400, SGreen@stripped wrote:
>You do know that your *client* is not executing this procedure, the
>*server* is. To the server, the procedure physically resides in a
>database and if you need to reference tables in another database, I would
>just use the full "databasename.tablename" method of identification. You
>are basically asking the server to change its execution environment, its
>context, to another database (even if you are giving it the name of the
>database it is already running in). Would this be so that you could avoid
>using the fully qualified table name to reference tables later on in the
>SP?
>
>I don't know if this is an error in allowing the USE statement within SPs
>or if it is an error in the SP engine to maintain the original table's
>context after a context switch. I suspect it to be the first more than the
>second.
>
>Shawn Green
>Database Administrator
>Unimin Corporation - Spruce Pine