Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using 'AND' and 'OR' in decode statement 1

Status
Not open for further replies.

laurenbattaglia

Technical User
May 3, 2002
28
US
Can you use 'AND' and 'OR' operators in a decode statement and if so, what is the syntax?

Thanks, Lauren
 
What do you mean by a decode statement?

I'm not aware of Microsoft SQL Server having any decode statement.

-SQLBill
 
I am not sure if I am in the right forum or not. I am using Info SQL Designer and I am trying to do an if statement that checks if condition 1 and condition 2 are true. I have been using a decode statement, but I am unsure how to do this while testing more than one condition.
Any help you could provide would be great.

Lauren
 
DECODE statment is used in Oracle statement. I think you should post your query in Oracle forum.

This is the link to Oracle 8i forum forum186



Sunil
 
DECODE is similar to
CASE

look up "CASE" in the select syntax.

Sintaxis
Función CASE sencilla:

CASE input_expression
WHEN when_expression THEN result_expression
[ ...n ]
[
ELSE else_result_expression
]
END


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top