This forum is currently locked. You can't register or post questions at this time. (read more)

Case statements in PL/SQL

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Guest

Case statements in PL/SQL

Postby Guest » Mon Nov 01, 2004 6:09 pm

hi,

Can I have select query with case statement in Package

Wheni run the sql query with case in normal sql editor its returning me results but when i try to add the query in Package and try to compile the [ackage its throwing error near case statement

Regards,
Smita

Guest

RE:Case statements in PL/SQL

Postby Guest » Mon Nov 01, 2004 6:09 pm

Pls see http://www.oracle-base.com/articles/9i/case-expressions-and-statements-9i.php

It clearly says "The CASE expression was first added to SQL in Oracle8i. Oracle9i extends its support to PL/SQL to allow CASE to be used as an expression or statement"


Guest

RE:Case statements in PL/SQL

Postby Guest » Mon Nov 01, 2004 6:09 pm

You can either rewrite your query to use decode or use dynamic sql. If you use dynamic sql, then it uses the sql engine where case was available in 8i, instead of the pl/sql engine, where case was not available.


Return to “Oracle SQL and PL/SQL Development”

Who is online

Users browsing this forum: No registered users and 0 guests

cron