增加删除数据

CondLoadData $SYSDB $eosmenu EOSMENU "menuid like '%LRN_Service_%'"
CondLoadData()
{
	if [ $# -ne 4 -a $# -ne 3 ];then
		echo "Error: condLoadData: parameter error."
		return 1
	fi
	
	dbName=$1
	dataFile=$2
	table=$3
	condition=$4
	
#	Log " --------------------------------------------"
	Log "Insert data into - $table   **START"
	if [ "x$condition" = "x" ];then
		dbaccess $dbName - - >> $dblogfile 2>&1 << EOF		
			load from $dataFile insert into $table;
EOF
	else
		dbaccess $dbName - - >> $dblogfile 2>&1 << EOF
			delete from $table where $condition;		
			load from $dataFile insert into $table;
EOF
	fi
	retCode=$?
	if [ $retCode -eq 0 ];then
		Log "Insert data into - $table   **Succeeded"
	else
		Log "Insert data into - $table   **Failed"
	fi
	
	ST=`expr $ST + $retCode`
	
	return $retCode
}

你可能感兴趣的:(删除数据)