Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    62

    Question Unanswered: SQL Loader question: How to use two WHEN clauses for a single table

    Hi,

    I want to use two WHEN conditions for a single table. When I tried the following, I got an error.

    LOAD DATA
    APPEND
    INTO TABLE FF_LFACS_LIVING_UNIT
    WHEN (WIRE_CNTR_CD <> 't')
    WHEN (LIVING_UNIT_ID <> 'c')

    FIELDS TERMINATED BY '|'
    .....
    ....

    I want to exclude the rows with WIRE_CNTR_CD = 't'
    and rows with LIVING_UNIT_ID = 'c'

    The error I got was

    SQL*Loader: Release 9.2.0.7.0 - Production on Thu Jan 11 16:59:22 2007

    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

    SQL*Loader-350: Syntax error at line 8.
    Expecting "(", found keyword when.
    WHEN (LIVING_UNIT_ID <> 'c')
    ^


    I do not know if the following solves my problem:

    WHEN (WIRE_CNTR_CD <> 't') AND (LIVING_UNIT_ID <> 'c')

    If I code like above, does the SQL Loader check for each condition in separate rows ?

    Any help is really appreciated.

    -Bheem

  2. #2
    Join Date
    May 2002
    Posts
    62
    The following worked.

    WHEN (WIRE_CNTR_CD <> 't') AND (LIVING_UNIT_ID <> 'c')

    -Bheem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •