diff --git a/LoadCSVData.pl b/LoadCSVData.pl index 1753544..1cd12f2 100644 --- a/LoadCSVData.pl +++ b/LoadCSVData.pl @@ -77,11 +77,15 @@ sub writeOutSql { print SQLOUT @sql; @sql = (); print SQLOUT "/* unlock table */\nUNLOCK TABLES;\n"; - print SQLOUT "/* call stored procedure to copy in " - . $db_sp - . "*/\ncall " - . $db_sp - . ".CopyAndFill('$tn');\n"; + + if ( $table eq 'RAWDATA' ) { + print SQLOUT "/* call stored procedure to copy in " + . $db_sp + . "*/\ncall " + . $db_sp + . ".CopyAndFill('$tn');\n"; + } + close SQLOUT or die( getTimeStamp("log") . " - pid $$ >> Error in closing file " @@ -332,6 +336,7 @@ if ( $db_name ne 'asega' ) { $db_sp = $db_name; getUdbPwd(); $db_lar = $db_name; + $table = "RAWDATACOR"; } else { $db_name = 'ase_mums';