Case Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Arul 2305
    New Member
    • Nov 2011
    • 1

    Case Query

    Dear Friends,

    Hope you are doing well.

    I have one question.Here I have the some columns.

    Like this:

    LOAD DATA
    INFILE FACT_PERFORM.cs v
    INTO TABLE FACT_PERF
    APPEND
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (spec_id,
    milk_fat,
    milk_fat_max,
    milk_fat_avg,
    milk_fat_min,
    milk_lact,
    milk_lact_max,
    milk_lact_avg,
    milk_lact_min,
    food_amt,
    spec_wt,
    spec_ht
    )


    Here I have to use the CASE Structure.

    Case 1:Append

    If the record is already exit means we need to display the record is already exit ..If the record is not there means we need to update the records.

    Case 2:replace.



    Question:
    Here I need to Append the records when

    I need a query for this urgent.
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    I'm not sure if anyone understand your question?
    You put here some sqlldr control file and you want what?
    Do you want to achive what MERGE does with this sqlldr file?

    Comment

    Working...