I have this loader control file.
LOAD DATA
REPLACE
INTO TABLE TEST
WHEN TEST_CD != 'A' AND TEST_CD = 'B' AND TEST_TYPE_CD = 15
Currently its loading data when TEST_CD = 'B' AND TEST_TYPE_CD = 15 but now I want to modify it so that when TEST_CD = 'B' as well as test_type_cd = 15 too.. I dont want to load all Test_type_cd when its 15.. i want to load only when it satisfies both condition.. Just keeping the braces around it is going to work.. Plz some one let me know how can I modify this..
I am thinking everyone is confused with what I need.. I want first condition to satisfy as well as 2nd and 3rd condition as 1 condition not to act seperately.. For example if test_cd is not equal A than load the data but 2nd and 3rd condition should act as one piece..when test_cd = B and test_type_cd i开发者_C百科s 15 than load the data.. i dont want test_type_cd to apply for any other test_cd other than B.. I have 5 of those test_cd A B C D E.. i want only B to apply test_type_cd = 15..
Try
LOAD DATA
REPLACE
INTO TABLE TEST
WHEN TEST_CD = 'B' AND TEST_TYPE_CD = 15 -- load everything that is b and 15
INTO TABLE TEST
WHEN TEST_CD != 'A' AND TEST_CD != B -- load everything that is not a and not b (because it is loaded above)
So, you want it to load in when EITHER condition is true, not necessarily BOTH conditions?
WHEN TEST_CD != 'A' AND (TEST_CD = 'B' OR TEST_TYPE_CD = 15)
may satisfy the fractured English of your initial question.
精彩评论