Home » SQL & PL/SQL » SQL & PL/SQL » Select Function
Select Function [message #37558] Thu, 14 February 2002 01:21 Go to next message
Anita
Messages: 21
Registered: March 2000
Junior Member
Basically the problem is where one of the fields in a select statement is tied to a criteria.
e.g.
SELECT
Name, Surname, Address, Country
FROM
Customer_File

The Country field is to return a null if equal to 'Malta', otherwise it should return the text in the field.
Re: Select Function [message #37561 is a reply to message #37558] Thu, 14 February 2002 02:24 Go to previous message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
SELECT
Name, Surname, Address, decode(Country,'Malta',null,country)
FROM
Customer_File
Previous Topic: Re: ORA-00937: not a single-group group function
Next Topic: indexes
Goto Forum:
  


Current Time: Fri Apr 19 02:50:33 CDT 2024