MySQL Forums
Forum List  »  MySQL Workbench

how to implement variable into string
Posted by: Krzysztof Ramotowski
Date: July 16, 2008 06:10AM

Hello,
I'm curious if it's possible to put variable into string in stored procedure code.

I'm trying to select into file, and what i need is to name this file like variable is named, below example:

SET @a = config_name;
SELECT * INTO OUTFILE '/home/reports/security_[HERE @a]'
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
FROM CONFIGURATION_INFO;

so result i expect should look like this. if cofnig_name = conf1
then saved file name is: security_conf1

Can anybody help me, I was trying to find information, but only thing I found is how to do it using different language, for example in PHP.
Thank you in advance.

Options: ReplyQuote


Subject
Views
Written By
Posted
how to implement variable into string
6289
July 16, 2008 06:10AM


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.