Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Went back to using mdb-export with "-I mysql" because the default CSV #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions createdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ $MYSQLCONN <sr22.sql
echo adding tables to $MYSQLDB
for table in $TABLES
do
echo adding $table
mdb-export -H $SR22 $table > $table.sql
mysqlimport -L -u $MYSQLUSER --password=$MYSQLPASS --fields-terminated-by="," --fields-enclosed-by="\"" $MYSQLDB $table.sql
rm $table.sql
echo adding $table
mdb-export -I mysql $SR22 $table | sed '1i BEGIN;' | sed '$ a COMMIT;' | $MYSQLCONN
done

echo done
2 changes: 1 addition & 1 deletion sr22.sql
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ CREATE TABLE ABBREV
Beta_Carot DOUBLE,
Beta_Crypt DOUBLE,
Lycopene DOUBLE,
Lut_Zea DOUBLE, -- this was Lut+Zea
`Lut+Zea` DOUBLE, -- this was Lut+Zea
Vit_E DOUBLE,
Vit_D_mcg DOUBLE,
ViVit_D_IU DOUBLE,
Expand Down