I am currently exporting some data with mysqldump and --where param i.e:
mysqldump -u root databasename tablename --where="datefield > '2003-10-29 00:00:00' AND show=1" > dumpresult.sql
.
When i execute the command in cmd works perfect (exports structure and data) but if i put it in a batch file (.bat) only exports structure WITHOUT data.
Somebody knows what can be happening here?
i tried to changing .bat to .cmd, executed as administrator, etc.
CodePudding user response:
I already solved the issue. When using batch file (.bat) some symbols (%) that preceed some word are interpreted as enviroment variables so i must to put double %% percent symbol. This does not ocurr when use de complete command directly in CMD.