Home » SQL & PL/SQL » SQL & PL/SQL » CREATE VIEW (Oracle 10g)
CREATE VIEW [message #345222] Tue, 02 September 2008 11:29 Go to next message
prashanthgs
Messages: 89
Registered: May 2005
Location: chennai
Member
Hi,

I want to create a view.

Is that possible to use IF-THEN condition or CASE statement within the view?

Pls provide a solution.

Thanks and Regards,
Prashanth.g.s.
Re: CREATE VIEW [message #345226 is a reply to message #345222] Tue, 02 September 2008 11:59 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, it is possible.

Regards
Michel
Re: CREATE VIEW [message #345249 is a reply to message #345226] Tue, 02 September 2008 13:50 Go to previous messageGo to next message
prashanthgs
Messages: 89
Registered: May 2005
Location: chennai
Member
So Can I assume that while creating the view itself I can mention IF THEN condition?
Re: CREATE VIEW [message #345256 is a reply to message #345249] Tue, 02 September 2008 14:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes using CASE.

Regards
Michel
Re: CREATE VIEW [message #345257 is a reply to message #345249] Tue, 02 September 2008 14:21 Go to previous messageGo to next message
joicejohn
Messages: 327
Registered: March 2008
Location: India
Senior Member
I have never heard about using IF THEN ELSE condition apart from in PL/SQL. You can use Case statements though in View Creation.

Anyways, better wait for a Senior's opinion.... Smile

Regards,
Jo
Re: CREATE VIEW [message #345265 is a reply to message #345257] Tue, 02 September 2008 14:34 Go to previous message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
CASE is IF THEN ELSE.

Regards
Michel
Previous Topic: Get the value by dept
Next Topic: How to interesting select *
Goto Forum:
  


Current Time: Fri Dec 02 16:34:51 CST 2016

Total time taken to generate the page: 0.13707 seconds