How to Skip a blank line in CSV file while loading through Fastload

Database

How to Skip a blank line in CSV file while loading through Fastload

Hi,

When I try to load a CSV file through Fastload, which has 1 blank line inbetween the otherrows, it fails, anyone knows how we can avoid failing this, i want to just skip this blank line and keep loading other good lines. if I remove this blank line, it loads fine.

The code it's using at the moment:

REM **********************************************************

REM ******************* L O A D I N G ************************

REM **********************************************************

SET FILE_NAME=NO_MORE_FILES

for %%A in ("%LOAD_FILE%") do if "!FILE_NAME!"=="NO_MORE_FILES" SET FILE_NAME=%%A

if "!FILE_NAME!"=="NO_MORE_FILES" goto LABEL_EXIT

SET FIRST_CHAR=%FILE_NAME:~0,1%

if ^%FIRST_CHAR%==^" SET FILE_NAME=%FILE_NAME:~1,-1%

FOR /F "usebackq delims==" %%i IN ('%FILE_NAME%') do SET FILE_SHORT=%%~nxi

echo Loading %FILE_NAME%  >> %FILEAUD%

echo LOGON %DATABASE%/%USER%,%PWD%; >> %FILECTL%

echo DROP TABLE %TEMP_DB%.load_abc_e1; >> %FILECTL%

echo DROP TABLE %TEMP_DB%.load_abc_e2; >> %FILECTL%

echo SET RECORD VARTEXT ","; >> %FILECTL%

echo RECORD 2; >> %FILECTL%

echo DEFINE >> %FILECTL%

echo   a1 (varchar(50)) >> %FILECTL%

echo , a2 (varchar(50)) >> %FILECTL%

echo file=%FILE_NAME%; >> %FILECTL%

echo SHOW; >> %FILECTL%

echo BEGIN LOADING %LOAD_DB%.load_In_Calls_Daily_Data ERRORFILES %TEMP_DB%.load_In_Calls_Daily_Da_e1, %TEMP_DB%.load_In_Calls_Daily_Da_e2; >> %FILECTL%

echo INSERT INTO %LOAD_DB%.load_In_Calls_Daily_Data>> %FILECTL%

echo ( a1>> %FILECTL%

echo , a2>> %FILECTL%

echo ) >> %FILECTL%

echo VALUES >> %FILECTL%

echo ( :a1 ( FORMAT 'DD/MM/YY') >> %FILECTL%

echo , :a2>> %FILECTL%

echo ); >> %FILECTL%

echo END LOADING; >> %FILECTL%

echo LOGOFF; >> %FILECTL%

fastload < %FILECTL% >> %FILEAUD%

SET ERRLEV=%errorlevel%

IF %ERRLEV% EQU 0 GOTO LABEL_OKAY

IF %ERRLEV% LEQ 4 GOTO LABEL_WARNING

:LABEL_FAIL

echo -3

IF %ERRLEV% EQU 8 echo Load Failed.  A user error occurred in the loader.

IF %ERRLEV% EQU 12 echo Load Failed.  A fatal error occurred in the loader.

IF %ERRLEV% EQU 16 echo Load Failed.  No message destination available from the loader.

type %FILEAUD% >&2

:ERR_EXIT

exit

:LABEL_WARNING

echo -1

echo Load Completed Normally, with warnings from the loader.

:LABEL_OKAY

could u please tell me where I can put a clause to tell SQL Loader that ignore the blank lines.

Thanks in advance.