Results 1 to 2 of 2

Thread: clike

  1. #1
    Join Date
    Aug 2003
    Location
    Vicenza(I)
    Posts
    21

    Unanswered: clike

    hello
    in mysql exist the operator clike that there is similar of like but there isn't key-sensitive. In oracle there is a similar operator?

    And there is an operator similar of the function iif of access?

    Thak you Elisa

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: clike

    Originally posted by trilly
    hello
    in mysql exist the operator clike that there is similar of like but there isn't key-sensitive. In oracle there is a similar operator?

    And there is an operator similar of the function iif of access?

    Thak you Elisa
    Do you mean case-sensitive? No, in Oracle you would have to use UPPER or LOWER to force case, e.g.

    WHERE UPPER(name) LIKE 'SMITH%'

    What does IIF do? I'd guess it is probably something like Oracle's DECODE:

    SELECT DECODE(status,1,'new',2,'old','unknown') FROM mytable;

    This means:
    Check value of mytable.status;
    If it is 1 then return 'new'
    If it is 2 then return 'old'
    For any other values return 'unknown'

    (Note: DECODE is not limited to 3 return values as in my example)

Posting Permissions

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