Código:
Me sale el siguiente error nose si lo esta haciendo bien tal vez el mysql no acepte una variable como ruta... /* esto me devuelve la fecha de ayer sin los guiones */ mysql>set @fecha=curdate()-1; /*armo la ruta del archivo */ mysql>set @archivo=concat('F:\\WORKFLOW_',@fecha,'.txt'); /* y esto es lo q no me corre sale error */ mysql>load data infile @archivo into table tdp.wf_atis fields terminated by '|' enclosed by '\"' lines terminted by '\r\n' ignore 1 lines;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@ruta into table tup.wf_atis fields terminated by '|' enclosed by '\"' lines ter' at line 1
Otra forma en la cual pense hacerlo fue creando la sentencia en un string... pero despues como ejecuto ese string hay alguna forma??? ya busque x casi todo el manual y no he encontrado naa.... espero su gentil apoyo
Salu2,
--------------------------
K-SuMa
Prefiero sacrificar un poco de sueño a sacrificar mis sueños