Created
March 6, 2014 22:51
-
-
Save hsiboy/9401494 to your computer and use it in GitHub Desktop.
import data into mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
IF EXIST load.sql echo. > load.sql | |
for /f %%a IN ('dir /b *_iewpg.txt') do ( | |
echo %%a | |
echo load data LOCAL infile '%%a' into table iewpg fields terminated by '\t' lines terminated by '\n'; >>load.sql | |
) | |
for /f %%a IN ('dir /b *_iewtr.txt') do ( | |
echo %%a | |
echo load data LOCAL infile '%%a' into table iewtr fields terminated by '\t' lines terminated by '\n'; >>load.sql | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment