Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2006
    Posts
    83

    Thumbs down Unanswered: Oracle equivalent of SQL Server's IN function

    In SQL Server 'IN' function is used to determine whether a specified value matches any value in a subquery or a list.

    Refer below link for IN function in SQL Server.

    http://http://msdn2.microsoft.com/en.../ms177682.aspx

    I have a condition in sql server like

    if @rak = IN('s','r','f')

    this condition will check whether the LHS is equals to any one argument of the IN function in RHS.

    Please tell me the equivalent of this in Oracle .

  2. #2
    Join Date
    Nov 2002
    Posts
    272
    IN is not a function, it's an operator; you need to lose the '=' sign:
    if @rak IN ('s','r','f')

    It's been a while since I worked with Oracle, but I'm pretty sure this works.

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the equivalent of IN in oracle is IN

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by krReddy
    I have a condition in sql server like

    if @rak = IN('s','r','f')
    You do?
    Does it work?
    George
    Home | Blog

  5. #5
    Join Date
    Oct 2006
    Posts
    83
    Thank u , i got it

  6. #6
    Join Date
    Dec 2003
    Posts
    1,074
    INSTR()
    REGEXP_LIKE()
    REGEXP_INSTR()

    --=cf

Posting Permissions

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