Skip navigation links

MySQL Forums :: General :: SELECT .. INTO OUTFILE not possible with stored procedure parameters?


Advanced Search

Re: SELECT .. INTO OUTFILE not possible with stored procedure parameters?
Posted by: Klas Karlsson ()
Date: June 02, 2006 05:04AM

Edit:
Now got an answer from support on how to use preared statements like this:

CREATE PROCEDURE export_dynamic(IN file_name char(64))
BEGIN
set @myvar = concat('SELECT * INTO OUTFILE ',"'",file_name,"'",' FROM Table1') ;
PREPARE stmt1 FROM @myvar;
EXECUTE stmt1;
Deallocate prepare stmt1;
END;

Which works ! :)
Thnaks for the input anyway...
/K

Options: ReplyQuote


Subject Written By Posted
SELECT .. INTO OUTFILE not possible with stored procedure parameters? Klas Karlsson 05/18/2006 09:13AM
Re: SELECT .. INTO OUTFILE not possible with stored procedure parameters? Peter Brawley 05/18/2006 09:54AM
Re: SELECT .. INTO OUTFILE not possible with stored procedure parameters? Klas Karlsson 05/19/2006 12:07AM
Re: SELECT .. INTO OUTFILE not possible with stored procedure parameters? Peter Brawley 05/19/2006 09:53AM
Re: SELECT .. INTO OUTFILE not possible with stored procedure parameters? Klas Karlsson 06/02/2006 12:55AM
Re: SELECT .. INTO OUTFILE not possible with stored procedure parameters? Klas Karlsson 06/02/2006 05:04AM


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.