Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2001
    Location
    New York
    Posts
    8

    Unanswered: like operator help

    Hi!
    Is there way to compare value against a column?
    Actually i have very big query that uses this kind of syntax.

    ex:sample query
    select job from jobtable where '10' = char(10)

    Thanks
    --Modigunta

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: like operator help

    Is this what you want to do ?

    C:\Documents and Settings\Sathyaram>db2 "select * from employee where '000340'=empno"

    EMPNO FIRSTNME MIDINIT LASTNAME WORKDEPT PHONENO HIREDATE JOB
    EDLEVEL SEX BIRTHDATE SALARY BONUS COMM
    ------ ------------ ------- --------------- -------- ------- ---------- --------
    ------- --- ---------- ----------- ----------- -----------
    000340 JASON R GOUNOT E21 5698 05/05/1947 FIELDREP
    16 M 05/17/1926 23840.00 500.00 1907.00

    1 record(s) selected.

    Cheers
    Sathyarasm



    Originally posted by modigunta
    Hi!
    Is there way to compare value against a column?
    Actually i have very big query that uses this kind of syntax.

    ex:sample query
    select job from jobtable where '10' = char(10)

    Thanks
    --Modigunta
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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