Loader with triggers (or not) [message #72126] |
Fri, 14 March 2003 03:08 |
arseni
Messages: 8 Registered: March 2003
|
Junior Member |
|
|
I want to import a text file with Loader and filter some records before insert:
1.- How can skip records with conditions using only the loader?
or
2.-If I want to filter the information with triggers how can I skip records using both triggers and loader?
|
|
|
Re: Loader with triggers (or not) [message #72129 is a reply to message #72126] |
Mon, 17 March 2003 01:26 |
amit zhankar
Messages: 31 Registered: March 2003
|
Member |
|
|
U can filter reocrds using this example :
LOAD DATA
INFILE 'mydata.dat' BADFILE 'mydata.bad' DISCARDFILE 'mydata.dis'
APPEND
INTO TABLE my_selective_table
WHEN (01) <> 'H' and (01) <> 'T' and (30:37) = '19991217'
(
region CONSTANT '31',
service_key POSITION(01:11) INTEGER EXTERNAL,
call_b_no POSITION(12:29) CHAR
)
Regards,
Amit Zhankar
|
|
|
Re: Loader with triggers (or not) [message #72131 is a reply to message #72126] |
Mon, 17 March 2003 03:22 |
arseni
Messages: 8 Registered: March 2003
|
Junior Member |
|
|
Thanks, Amit,but I don't explain my problem so well. I have to make some complex filter (e.g. when (... and ... and ...) OR (... and ... and ...) AND (... or ... and ...) )
Can I use both, AND and OR, in a When clause?
Can I use different logical filter groups or complex filter (as you can see in the e.g.) in the same When clause?
Thanks.
|
|
|