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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional where clause

Status
Not open for further replies.

swhitt

MIS
Aug 27, 2003
28
US
I have created a view to return values that are similar and I need to add an if then else condition in the where clause of the view. Is it possible to add a pl/sql procedure to a view? If not, what's the best way to do this?
 
Yes, you may use user-defined function (untill some limit, of course), but you may also use either DECODE or CASE sql constructs.

Regards, Dima
 
Thanks for your response. Could you elaborate just a bit more please?
 
SWhitt,

Dima and I usually agree on things, but I'll take a chance here that we can provide a solution to meet your needs if you are willing to post "SQL pseudo-code" of what you are trying to do (that is, post code that would do what you want to do if it was syntactically legal.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 18:42 (25Feb04) UTC (aka "GMT" and "Zulu"), 11:42 (25Feb04) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top