I have a SQLLDR file that is working for right now. But I need to add another line to the file that either ignores a specific kind of record or does not load the trailing records. Is there a way to put in some type of ignore statement so that it knows not to insert that row?
The last line will be something similar to this:
Quote: | 20 rows selected.,NXX,BN1,,,,,YES ,,,,,,,,,,,,,
|
Here is the SQLLDR ctl file:
LOAD DATA (Skip 5)
INFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_CCI_Phone.csv'
BADFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_CCI_Phone.bad'
DISCARDFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_CCI_Phone.dsc'
INFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_CCI_Phone_EBR_Date_I.csv'
BADFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_CCI_Phone_EBR_Date_I.bad'
DISCARDFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_CCI_Phone_EBR_Date_I.dsc'
INFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_CCI_Phone_New_Contacts_I.csv'
BADFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_CCI_Phone_New_Contacts_I.bad'
DISCARDFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_CCI_Phone_New_Contacts_I.dsc'
INFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_RCI_Phone.csv'
BADFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_RCI_Phone.bad'
DISCARDFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_RCI_Phone.dsc'
INFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_RCI_Phone_EBR_Date_I.csv'
BADFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_RCI_Phone_EBR_Date_I.bad'
DISCARDFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_RCI_Phone_EBR_Date_I.dsc'
INFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_RCI_Phone_New_Contacts_I.csv'
BADFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_RCI_Phone_New_Contacts_I.bad'
DISCARDFILE '/siebgvsdas1.rccl.com/app/siebel/siebgvsd/logs/opt_out_from_ftp/Siebel_CVP_RCI_Phone_New_Contacts_I.dsc'
INTO TABLE "RCCL_OPT_OUT_TMP"
INSERT
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(CHAN_ADDR
,
EBR_DATE
,
BRA
,
CHANN
,
SRC_ID
,
EBR_SOURCE
,
EBR_TYPE
,
CALLABLE_FLAG
,
ROYAL_FLAG
,
CELEBRITY_FLAG
,
STATE_FLAG
,
CANADA_DMA_TPS_FLAG
,
USA_DMA_TPS_FLAG
,
NATIONAL_FLAG
,
EBR_EXPIRE_DATE DATE 'MM-DD-YYYY'
,
DUPLICATE_NUMBER_FLA
,
TIER_C_LONG_DISTANCE
,
WIRELESS_FLAG
,
WIRELESS_N_PORT
,
NPA_NXX_FLAG
,
BAD_NUMBER
)
This is how the file looks:
4132223017,05/02/2006,RCI,Phone,1-2RT1RW ,New_CVP_Contact,Inquiry,No,,,,,,,,,,WIR,WIR,,
9184233705,05/02/2006,RCI,Phone,1-2RT1UB ,New_CVP_Contact,Inquiry,No,,,SDNC,,,NDNC,07/31/2006,,,,,,
2259250948,05/02/2006,RCI,Phone,1-2RT1TJ ,New_CVP_Contact,Inquiry,YES ,,,,,,,,,,,,,
9098643601,05/03/2006,RCI,Phone,1-2RT5VX ,New_CVP_Contact,Inquiry,No,,,,,,NDNC,06/02/2006,,,,,,
20 rows selected.,NXX,BN1,,,,,YES ,,,,,,,,,,,,, THIS IS THE LINE THAT I DO NOT WANT TO LOAD
|