MySQL Forums
Forum List  »  InnoDB

Re: dynamic outfile name
Posted by: David Harris
Date: August 19, 2007 11:31AM

Sorry, the prepare statement is still returning a syntax error. I've tried using double quotes, escape slashes and even no quotes without luck. What am I missing?

---------
SELECT @sync:=concat(CURDATE(),CURTIME());

SET @marcFile = CONCAT('c:/scripts/marcUpdate', @sync,'.txt');


PREPARE stmt_name FROM concat("SELECT * INTO OUTFILE", @marcFile, "FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM marcupdate");

EXECUTE stmt_name;

DEALLOCATE PREPARE stmt_name;
--------------------------

Options: ReplyQuote


Subject
Views
Written By
Posted
9819
August 12, 2007 06:29PM
3191
August 13, 2007 05:24AM
3101
August 13, 2007 10:05PM
2992
August 14, 2007 02:16AM
Re: dynamic outfile name
3464
August 19, 2007 11:31AM
3288
August 19, 2007 06:46PM
3126
February 13, 2008 02:49PM
2495
February 14, 2008 04:45PM
2508
February 15, 2008 02:26PM
2444
February 20, 2008 04:12AM


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.