Quantcast
Viewing all articles
Browse latest Browse all 3724

PREPARE stmt syntax error ''' (no replies)

Hello,

I need help clearing a syntax error on a my PREPARE stmt line. Here is my full scrip:

SET @TS = DATE_FORMAT(NOW(),'%Y_%M_%D');

SET @FOLDER = 'c:/logs/test/sta07_';

SET @EXT = '.csv';

SELECT @myCommand =CONCAT("SELECT * FROM test.station07 INTO OUTFILE'",@FOLDER,@TS,@EXT,"' FIELDS ENCLOSED BY '\"' TERMINATED BY '\n' ESCAPED BY '\\'");

PREPARE stm2 FROM @myCommand;

EXECUTE stm2;

I'm getting a syntax error on PREPARE stmt2 FROM @myCommand; near '''. I'm not sure what it means and I have wrong on this syntaxt. The previous lines don't have any errors when I run the scrip. I'm only having errors on the PREPARE stmt2 FROM @myCommand line.

Can anyone help me clear this up?

Thanks!

Jose

Viewing all articles
Browse latest Browse all 3724

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>