Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2011
    Posts
    7

    Unanswered: Getting Error In Extract function

    While translating the below query i am getting an error ":Fatal Error F0241: Invalid column / alias year in Select / Where clause" . It works fine when i give the inputs in the where clause and run it in the SQL developer.


    SELECT count(*)
    INTO
    :2.MO_OUT_PFFGReGRep.TRANS_COUNT
    FROM MOVEMENT
    WHERE extract(year from :1.MO_INP_FATC1601.QZ_DT) = extract(year from MVMNT_GEN_DT)
    AND to_char(:1.MO_INP_FATC1601.QZ_DT, 'Q') = to_char(MVMNT_GEN_DT, 'Q')
    AND ACNT_POS_ID = :1.MO_INP_FATC1601.ACNT_POS_ID
    AND ACNT_POS_TYP = :1.MO_INP_FATC1601.ACNT_POS_TYP
    AND SUB_ACNT_ID = :1.MO_INP_FATC1601.SUB_ACNT_ID
    AND OU_ID = :1.MO_INP_FATC1601.OU_ID

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Doesn't look like an Oracle error message (they have ORA-xxxxx code).

    INTO clause suggests that it is PL/SQL. Where do you get that error? What tool do you use?

    What is the input? How come it works OK in SQL Developer and not ... in another tool?

    What Oracle database versions are involved?

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    is TRACS involved?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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