753
社区成员
发帖
与我相关
我的任务
分享
@echo off
set path=D:\
set ls_dbn=%~n1
set ls_server=%COMPUTERNAME%;
::连接字符串databasename=%ls_dbn%;server=%ls_server%;
set ls_connstr=userid=dba;password=sql;databasefile=%1;
set ls_left=dbisqlc12 -c %ls_connstr% -q
::设置分隔符和字符集
set ls_end=DELIMITED BY ','ENCODING 'UTF-8'
::echo 启动引擎并打开数据库...
::dbisqlc12 -q "START ENGINE as '%ls_server%' STARTLINE 'dbeng12 -c 8m'"
::dbisqlc12 -q "start database %1 as %ls_dbn% on '%ls_server%' AUTOSTOP OFF"
echo 启动引擎并连接到数据库...
dbisqlc12 -c %ls_connstr%AutoStop=OFF; -q "select 1"
echo delete from SALE_BARCODE...
%ls_left% "delete from SALE_BARCODE"
::%ls_left% "LOAD TABLE SALE_BARCODE(BC_BARCODE1,BC_CLOTHNO,BC_COLOR,BC_SIZE,BC_UPDATETIME,BC_UPDATEMAN) FROM %2 %ls_end% "
::echo LOAD TABLE SALE_CLOTH
%ls_left% "LOAD TABLE SALE_CLOTH(CT_ID,CT_STYLEID,CT_NAME,CT_SIZETYPE,CT_PRICE,CT_QH,CT_UPDATETIME,CT_UPDATEMAN) FROM %3 %ls_end% "
::停止数据库
::dbstop12 -y %ls_dbn%
::dbisqlc12 -q "stop database %ls_dbn% on '%ls_server%' "
::dbisqlc12 -q "stop ENGINE '%ls_server%' "
dbstop12 -c %ls_connstr%