@echo off

if not exist import md import

gsqlcmd exec cashbook "SELECT * FROM s01.cashbook"  cashbook.csv /echo

gsqlcmd make-fmt                cashbook.csv    import\cashbook.fmt             /echo

gsqlcmd make-ini                cashbook.csv    import\cashbook.ini             /echo

gsqlcmd make-create             cashbook.csv    import\cashbook.create.sql      /echo   /table=s01.cashbook /fmt=import\cashbook.fmt /mssql

gsqlcmd make-bulk               cashbook.csv    import\cashbook.select.bulk.sql /echo                       /fmt=import\cashbook.fmt

gsqlcmd make-bulk               cashbook.csv    import\cashbook.insert.bulk.sql /echo   /table=s01.cashbook /fmt=import\cashbook.fmt

gsqlcmd make-ace                cashbook.csv    import\cashbook.select.ace.sql  /echo                       /fmt=import\cashbook.fmt

gsqlcmd make-ace                cashbook.csv    import\cashbook.insert.ace.sql  /echo   /table=s01.cashbook /fmt=import\cashbook.fmt

gsqlcmd make /insert cashbook   cashbook.csv    import\cashbook.insert.sql      /echo   /table=s01.cashbook /fmt=import\cashbook.fmt /insertIdentity

gsqlcmd make /merge  cashbook   cashbook.csv    import\cashbook.merge.sql       /echo   /table=s01.cashbook /fmt=import\cashbook.fmt

gsqlcmd make /update cashbook   cashbook.csv    import\cashbook.update.sql      /echo   /table=s01.cashbook /fmt=import\cashbook.fmt

gsqlcmd make /delete cashbook   cashbook.csv    import\cashbook.delete.sql      /echo   /table=s01.cashbook /fmt=import\cashbook.fmt

start import

@pause
