Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004

    Unanswered: sql query from Oracle to DB2

    I'm a beginner in DB2 and for my company I have to write a sql statement. The statement is already working in Oracle but it doens't work with DB2. Does somebody know how to make this query work?
    (sleutel of key is for example "VAR_TST" and xdata.sleutel = also "VAR_TST")
    select *
    from xdata
    where sleutel = '",sleutel of key,"'
    and exists(
    select * from xdata w
    where w.sleutel > 0
    and w.extra like '%-' || xdata.sleutel || '-%'

    In Oracle is:
    sleutel = VARCHAR2
    extra = VARCHAR2
    Last edited by TheLastHero; 10-27-04 at 06:54.

  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    If, as you say,
    sleutel = VARCHAR2
    then how can you do this:
    where w.sleutel > 0

  3. #3
    Join Date
    Oct 2004
    <quote> where w.sleutel > 0 </quote>

    It already works and this was one of the problems, but this does work in Oracle.


Posting Permissions

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