Problem: Error in WHERE clause. Unrecognized clause or element.

Hi All,
i have a replicat and tried to filter some rows:
This was my MAP-Statement in the param-file:
MAP GOMS3KT, TARGET goldengate.txlog,
COLMAP (
tsid = #IDTIMESTAMP(),
syskey = SYSKEY,
type = "KT",
trxtimestamp = #TRAILJULIANTS(),
acquirer = #ACQFILTER(acq-id-schema_1,acquirer-id_1,log-item-length_2),
origin = #ASSERTDEFAULT2(bezugssystem_1 ," " ,log-item-length_2),
issuer = #MANIPULATEISSUER(bezugssystem_1, ISS-ID-SCHEMA_1, ISSUER-ID_1, -1, log-item-length_2)
) where (bezugssystem_1 = "PSVL");
At runtime, i got this error:
2013-02-25 09:09:42 WARNING OGG-00869 No unique key is defined for table 'TXLOG'. All viable columns will be used to represent the
key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
...(bezugssystem_1 = "PSVL")...
^
Error in WHERE clause. Unrecognized clause or element.
The column 'bezugssystem_1' does exist, i mapped it before to a the oracle column 'origin'
What is wrong here ??
I i delete the where clause all works fine!
Edited by: Felix_GG on 26.02.2013 15:44
Edited by: Felix_GG on 26.02.2013 18:25

Of course, in the where clause should stand a '=' or what i wrote (but is not able to show) the signs for NOT EQUAL, a 'less than' followed by a 'greater then'

Similar Messages

  • DATAMOVER: Error: Syntax error in where clause for PSOPRDEFN

    SET LOG C:\PSUSER_HRM.log;
    SET input F:\psoprdefn.dat;
    IMPORT psoprdefn where OPRId = 'PS';
    when i execute this command after importing .dat file from my database i get error:
    Error: Syntax error in where clause for PSOPRDEFN
    any suggestions pls help....
    Thanks
    aravind
    Edited by: 967641 on Nov 20, 2012 11:39 AM
    Edited by: 967641 on Nov 20, 2012 11:40 AM

    That is correct.
    Datamover tries to insert data in PSOPRDEFN and rows exist with these keys.
    To avoid this you can add the following statement in your script:
    SET UPDATE_DUPS;
    This will update the values other than the keys if a row already exists in the database with the keys in the dat file.
    I can advice you to buy the new book of Jim Marion, PeopleSoft PeopleTools Data Management and Upgrade Handbook
    http://www.amazon.com/PeopleSoft-PeopleTools-Management-Upgrade-Handbook/dp/0071787925/ref=sr_1_1?ie=UTF8&qid=1353575734&sr=8-1&keywords=jim+j+marion
    It has an entire chapter on how to use datamover.
    Hakan

  • The to_date() error in where clause of proc code

    In a proc code, firstly I use "SELECT to_char(f_date_1, 'DDMONYY') into :char_date FROM TBL_1;" to get the value of f_date_1.
    Then I use "SELECT ID FROM TBL_2 WHERE f_date_2 = :char_date;" to get the value of ID according char_date.
    In table, the type of f_date_1 and f_date_2 is DATE.
    char_date is "char char_date[10]".
    My question is:
    1. If I use WHERE f_date_2 = to_date(:char_date, 'DDMONYY'), it will prompt: "-1861, ORA-01861: literal does not match format string".
    2. If I use WHERE f_date_2 = :char_date, it will work well.
    Since the type of f_date_2 is DATE and the type of char_date is CHAR, why does to_date(:char_date, 'DDMONYY') have problems?
    Thanks.

    I was not able to duplicate the error you got, but I did spot something that may be affecting your results:
    *Set up test table using HR.EMPLOYEES*
    create table TEST_DATE as
    select employee_id, last_name, hire_date
    from employees
    var char_date char(10)
    begin
    select to_char(hire_date,'DDMONYY') into :char_date
    from test_date
    where rownum = 1;
    end;
    *case 1*
    select *
    from test_date
    where hire_date = to_date(:char_date,'DDMONYY')
    *case 2*
    select *
    from test_date
    where hire_date = :char_date --> this assumes a implicit char to date conversionWhile I got case 2 to work, it assumes that the database is configured to recognize the character mask as a valid string format. If you tried running that query on a different database, this query may fail as well.
    To verify why case 1 may not have worked, do a quick check:
    select :char_date from dualIt is possible that you may have applied a different character mask between your first query:
    >
    SELECT to_char(f_date_1, 'DDMONYY') into :char_date FROM TBL_1;
    >
    and the WHERE clause of your second query:
    >
    WHERE f_date_2 = to_date(:char_date, 'DDMONYY')
    >
    RP

  • Beginner: Getting syntax error on WHERE clause in SELECT

    I'm very new to php and mySQL.  Am using DW master/detail to generate to basic code I need.  One thing I need to do is modify a select statement in the master to include a WHERE clause to limit the selection to a particular value in one field.
    I'm getting a syntax error with the WHERE clause I'm adding to the map select statement.
    This is the portion of the error message showing the error location:
    'WHERE Group='Community' LIMIT 0, 10'
    The php that generated the select is:
    $query_maps = "SELECT * FROM tblmaps ORDER BY tblmaps.DispSeq";
    $query_limit_maps = sprintf("%s WHERE Group='%s' LIMIT %d, %d", $query_maps, $selectGroup, $startRow_maps, $maxRows_maps);
    This approach to creating the select statement is from the code generated for the master page.  It adds the LIMIT clause.  All I did was add the "WHERE Group='%s' and the $selectGroup variable which comes from earlier code.  You can see that the $selectGroup variable is equal to the "Community: group.
    I've scanned the web to see what syntax error I might be making but haven't found anything that explains it.
    The full resolved select statement is:
    SELECT * FROM tblmaps ORDER BY tblmaps.DispSeq WHERE Group='Community' LIMIT 0,10
    What am I not seeing?
    Tom

    Thanks.  Make sense but changing that didn't help.
    Here's the error message I'm getting:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Group='Community' ORDER BY tblmaps.DispSeq LIMIT 0, 10' at line 1
    The full select (from a debugging ECHO I inserted) is:
    SELECT * FROM tblmaps WHERE Group='Community' ORDER BY tblmaps.DispSeq LIMIT 0, 10
    Note that when I take the WHERE clause out, there is no syntax error.

  • Syntax error in WHERE clause

    Hi all,
    see the code.
    data: itab type cdhdr occurs 0,
            wa type cdhdr.
    data: begin of itab1 occurs 0,
             lifnr like lfa1-lifnr,
              ktokk like lfa1-ktokk,
            end of itab1.
    select * from cdhdr into table itab.
    select lifnr ktokk from lfa1 into table itab1
        for all entries in itab
          where lifnr = itab-objectid.
    when i go for Syntax check i am getting Error like  " when using the addition for all entries in itab " the fields  LIFNR and ITAB-OBJECTID  must have the same type and lengh.
    so, i have done the following correction in WHERE clause.
    select lifnr ktokk from lfa1 into table itab1
        for all entries in itab
          where lifnr = itab-objectid(10).
    But this time i am geting warning in German language.
    my correction is correct or not ?
    Pls guide me ..
    Thanks
    Krupali.

    select lifnr ktokk from lfa1 into table itab1
    for all entries in itab
    where lifnr = itab-objectid(10).
    But this time i am geting warning in German language.
    my correction is correct or not ?
    Answer is your correction is not correct.
    we cannot use offset with for all entries.
    you can do this way first take the itab-objectid(10) in some other field like temp than fire for all entries on temp.
    like below.
    select lifnr ktokk from lfa1 into table itab1
    for all entries in itab
    where lifnr = itab-temp."<-- see here
    Amit.
    Edited by: Amit Gujargoud on Aug 26, 2008 8:00 AM

  • Problem in Dynamic Where clause..

    Hello All,
    I have a requirement in which i have to do a select statement where (Field1 = 'X') and (Field2 = 'A' or Field2 = 'B').
    But if i write it directly,
    select * from Ztable into table itab where Field1 = 'X' and Field2 = 'A' or Field2 = 'B'.
    Then I am not getting the expected result.
    instead i need something which tells the where clause to do OR operation first and then AND operation..
    Any ideas ??
    Thanks in advance.
    Tatvagna Shah.

    Hi,
    Please try this.
    select *
    from Ztable
    into table itab
    where Field1 = 'X' and ( Field2 = 'A' or Field2 = 'B' ).
    Regards,
    Ferry Lianto

  • Merge query error in Where clause

    Following error is coming when i execute the merge query. Anything wrong with this? I am using Oracle 9.2.0.1.
    Query:
    MERGE
         INTO incompletekalls ic
         USING live_small ls
         ON ((ls.callid = ic.callid) AND
         (ls.sdate = ic.sdate) AND
         (ls.stime = ic.stime))
    WHEN MATCHED THEN
         UPDATE
         SET     ic.adate = ls.adate,
              ic.atime = ls.atime,
              ic.edate = ls.edate,
              ic.etime = ls.etime
         WHERE
              ls.sdate = '16-Apr-09' AND ls.stime >= '09:00:00' AND ls.stime <= '11:00:00' AND ((ls.adate IS NULL) OR
              (ls.edate IS NULL))
    WHEN NOT MATCHED THEN
         INSERT (ic.callid,ic.cg,ic.cd,ic.re,ic.opc,ic.dpc,ic.sdate,ic.stime,ic.adate,ic.atime,ic.edate,ic.etime)
         VALUES (ls.callid,ls.cg,ls.cd,ls.re,ls.opc,ls.dpc,ls.sdate,ls.stime,ls.adate,ls.atime,ls.edate,ls.etime)
         WHERE ls.sdate >= '16-Apr-09' AND ls.stime >= '09:00:00' AND ls.stime <= '11:00:00'
    Error:
    SQL> /
    WHERE
    ERROR at line 13:
    ORA-00905: missing keyword

    Hi,
    From looking at the documented examples
    http://www.oracle.com/pls/db92/db92.drilldown?levelnum=2&toplevel=a96540&method=FULL&chapters=0&book=&wildcards=1&preference=&expand_all=&verb=&word=MERGE#a96540
    and on http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5318183934935
    I think that you cannot use the WHERE in your MERGE like that on 9i...
    Something else I want to warn you for:
    It's a bad idea to store your date and time separated as strings! You'll run into troubles sooner or later, for 100%...
    Use a single DATE column instead, in which you store both the date and time components..

  • SELECT LIST throws error for WHERE CLAUSE

    Hi All
    I am struck with, what looking like a trivial error, but I don't know how to settle it down. I am new to Apex (3.1). I am experimenting with. I have Oracle 10g running on Windows.
    I have a dropdown item in one of my pages (SELECT list). I am trying to display few items there dynamically (depends on the user who logged in). I set it as SELECT LIST and entered the following query in "List of Values".
    select enrolled_course display_value, course_id return_value
    from COMP_LIST
    where stu_id = :APP_USER
    order by 1I got the following error.
    1 error has occurred
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.Then, I tried the step by step instruction from "Oracle® Application Express - Advanced Tutorials -Release 3.1.2 -E10497-02". Using creating list of values creation as seperately. That too, I got the same error.
    I am doing it wrong I suppose. Please correct me. Thanks in advance
    With Regards
    Guru
    Edited by: guru paran on Oct 16, 2008 5:12 PM

    Thanks Andy
    When I hardcoded, it worked.
    select enrolled_course display_value, course_id return_value
    from COMP_LIST
    --where-- --emp_id-- = --100--
    where stu_id = 100
    order by 1
    {code}
    :APP_USER is not working then, Now, I should be using v('APP_USER')? When I tried v('APP_USER'), I got the same error back! The COMP_LIST is a view. Is there some problem with the view then?
    But again, I am able to select from it without WHERE (now with hardcoded value also)....
    Edited by: guru paran on Oct 16, 2008 6:26 PM
    Added [code] tags
    Edited by: guru paran on Oct 16, 2008 6:42 PM
    It is STU_ID and not EMP_ID
    Edited by: guru paran on Oct 16, 2008 6:43 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • PreparedStatement.setDate(int, Date) problem in WHERE clause

    Hello all,
    First and foremost, thanks for the help. It is really appreciated.
    I am having the toughest time tracking down a problem with how I am handling date setting with my PreparedStatement. The kicker is that I am only having problems with the where clause date sets.
    The date is pulled out of the database, put into a string, modified, put back into a date, and then used to query via SQL.
    Data selected this way:
    "SELECT * FROM table_name"
    Data updated this way:
    "UPDATE table_name SET name = ? WHERE pk_id = ? AND pk_date = ?"
    The java.sql.Date object I use to PreparedStatement.setDate(int, Date) is exact to seconds. It works great if it is not in the where clause (eg Inserts work, Updates work without where clause) which leads me to believe there is truncation of data somewhere between setDate(int, Date) and the native SQL in Oracle 9i.
    Is that a correct assumption? How do I solve this?
    Thanks,
    John

    My assumption was correct. If a java.sql.DATE is pulled from a Oracle 9i database it may have more data in it than is allowed for in java.sql.Date. java.sql.Timestamp, on the other hand, does retain all data in the field.
    The correct code looks something like this
    prepStmt.setTimestamp(Timestamp.valueOf(timeString));
    cheers,
    John

  • How to set the where clause of a value set on the basis of a form field

    I am using a DFF(Descriptive FlexField), which needs to display the value of a certain column(say columnA) on the basis of the value of another column(say columnB).
    So i have created a value set which points to the table which has both these columns, and the DFF uses this value set. However, the problem is that I have not put any where clause in the value set, because of which i cannot handle the exact fetch returns more than one rows error.
    The query has to be as follows:
    select ColumnA from tbl where ColumnB = [ a form value ];
    What I want to know is how can i get the value of a certain field of a certain block of the form in the above query.
    Edited by: 981615 on Jan 14, 2013 12:48 AM
    Edited by: 981615 on Jan 14, 2013 12:48 AM

    Just have a look over these two statements if it solves your problem
    one time where clause
    Set_Block_Property('BLOCK_NAME',ONETIME_WHERE,your form item);
    dynamic where clause
    set_block_property('BLOCK_NAME'default_where, your form itme)
    you can where clause at run time from any procedure or some triggers

  • VPD - How to make the where clause a correlated query

    Hi,
    My VPD function has the following where clause:
    where_clause:= ' project_id in (select object_id from pa_project_classes p'||
    ' where p.class_category='||''''||l_cat||''''||
    ' and p.CLASS_CODE='||''''||l_class||''''||
    ' and p.OBJECT_TYPE=''PA_PROJECTS'''||
    The problem is that the subquery is not using the unique key defined on the table pa_project_classes. What I need is something as follows:
    where_clause:= ' project_id in (select object_id from pa_project_classes p'||
    ' where p.class_category='||''''||l_cat||''''||
    ' and p.CLASS_CODE='||''''||l_class||''''||
    ' and p.OBJECT_TYPE=''PA_PROJECTS'''||
    ' and p.object_id=mainquery.project_id ||
    The problem is that since the table pa_project_classes also has a column project_id, I have to prefix the column name by the alias of the main query like 'mainquery.project_id'. However this seems impossible as main query is not unknown .
    I would be grateful if you could suggest any workaround or solution.
    Thanks

    Just have a look over these two statements if it solves your problem
    one time where clause
    Set_Block_Property('BLOCK_NAME',ONETIME_WHERE,your form item);
    dynamic where clause
    set_block_property('BLOCK_NAME'default_where, your form itme)
    you can where clause at run time from any procedure or some triggers

  • Where Clause in Table Lookups for Data Load

    Hello,
    In Shared Components I created in Data Load Table. In this Data Load Table I added a Table Lookup. On the page to edit the Table Lookup, there is a field called Where Clause. I tried to add a Where Clause to my Table Lookup in this field but it seems that it has no effect on the Data Load process.
    Does someone know how to use this Where Clause field?
    Thanks,
    Seb

    Hi,
    I'm having the same problem with the where clause being ignored in the table lookup, is this a bug and if so is there a work around?
    Thanks in advance

  • Passing where clause of cursor

    my requirement is that i want to declare a cursor but the problem is that where clause of sql statement of cursor is dynamically generated according to user clicks........ e. g. number of conditions in where clause may change.....
    so..... how can i declare the cursor...how do i pass where clause to any procedure if i write procedure or function......

    u can use for-loop cursors like this,
    for v_rec in 'select * from emp where' || ur_conditions ||'
    see oracle documentation for further help and examples

  • Additional where-clause for LOV in 9i needs table-alias

    We have upgraded from 6.0 to 9i. All our Forms had been generated for 100% using Headstart. Now we try to generate them all again and encounter a problem with the list of values. It appears that the Additional restriction in the List of Values Properties always needs the table-alias to work properly when references are made to an item in the form.
    For example:
    We have item ORG_CODE in block ORG and have a lov showing all others organisations. The default-where coded in 6.0 looked like this:
    org_code <> :org.org_code
    In 6.0 this worked perfectly. However, in 9i the where-clause is being translated into
    :org.org_code <> :org.org_code
    Offcourse the lov now always gives the message that it contains no entries!
    We have found a solution for this problem - rewrite the where-clause to
    lov_alias.org_code <> :org.org_code
    However, this solution means that we have to check tens, hundreds of lov's, because we never used to put an alias in the where-clause.
    Because of this problem 95% of our Forms can not be generated anymore.
    Anyone has a easy solution for this problem?

    I mean:
    select * from T-A, T-B
    where T-A.id = T-B.id (+)
    and T-B.number (+) = 570
    to get the null record you'll have to do:
    select * from T-A, T-B
    where T-A.id = T-B.id (+)
    and nvl(T-B.number,0) (+) not in (0,570)
    or
    select * from T-A, T-B
    where T-A.id = T-B.id (+)
    and (T-B.number (+) <> 570
    or T-B.number (+) is null)
    hope that works (untested)
    null

  • No tree displayed with WHERE clause (data issue?)

    I tried this on the apex.oracle.com workspace after it didnt run in our setup, and I ran into the same issue.
    I cant get the tree to display when I add a WHERE clause to the query.
    I know this isnt a problem with the WHERE clause, and has something to do with the data.
    If I just delete the data I dont want from the table (data_type <> 'S'), it WORKS, even with the WHERE clause.
    I have checked running the SQL, and the root element is returned.
    When I look at the HTML source of the page, I can see the js object created, though it seems to be constructed incorrectly.
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    "DATA_TEXT" as title,
    null as icon,
    "ID" as value,
    null as tooltip,
    null as link
    from "#OWNER#"."T_ROOT_CAUSE_TEMPLATE"
    where (data_type='S' or id=346)
    start with id=346
    connect by prior "ID" = "PARENT"
    order siblings by "DATA_SEQUENCE"

    Just in case if you didn't know it, you can use WITH factoring clause when creating a tree. It makes it possible to create as many "tables" as you need, while the final hierarchical query (that is responsible for the way the tree looks like) is a simple one. This (+WITH+) approach is convenient as you can avoid repeating inline views and/or subqueries.
    For example, your query might have looked like this:
    with s_type as
      (select * from t_template
       where data_type = 'S'
          or id = 346
    select
      case when connect_by_isleaf = 1 then 0
           when level = 1 then 1
           else -1
      end as status,
      level,
      data_text as title,
      null as icon,
      id as value,
      null as tooltip,
      null as link
    from
      s_type
    start with id=346
    connect by prior id = parent
    order siblings by data_sequence

Maybe you are looking for

  • How can I insert data from a cfloop?

    I have a query that outputs into a cfloop. What I need it to do is insert into an access database when the changes have been made. I have looked at several tutorials but they all offer different solutions than what I am looking for. My cflloop is: <c

  • Portal users who have logged in during a specified time interval ?

    Hi, I need to know all the users who have logged in to the portal during a specific interval of time e.g during the last 10 days. Is there any provision to write code using UME api ? Any help would be highly appreciated and rewarded. Thanks & Regards

  • Replace dynamic proxies and reflection with invokedynamic

    I have an application that extensively uses reflection and dynamic proxies. It was built on Java 6. Now, I rebuilt it on Java 7, and I am thinking of replacing all reflection and proxies with new invokedynamic. Can anybody tell me if it's worth the t

  • Force user to enter text if checks YES check box

    I have created a form with YES and NO check boxes.  If user checks YES, they need to provide written reason.  Is there a way to "force" user to enter text into text box if they check the YES check box? Thanks, Toyro

  • Parallel Execution in ODI

    Hi I want to club my 10 scenario's into one package and execute them async. I did it using ODIStartSen and ODIWaitforSession but i am not able to track wic interface failed and which all succeed. Can you please let me know how to handle this in ODI?