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

Hi, I want some help using CA

Status
Not open for further replies.

mukund

Programmer
Mar 6, 2001
64
GB
Hi,
I want some help using CASE in the select statement.

select
ISgroup =
CASE p.GroupId
WHEN NULL THEN "NO"
ELSE "YES"
END
from POHead p

In this SQL statement I don't get the desired results.
The SQL does not work for NULL values in the GroupId field.

Anybody has a solution for this.

Regards,
Mukund.
 

Make a slight correction.

SELECT
ISgroup =
CASE
WHEN p.GroupId IS NULL THEN "NO"
ELSE "YES"
END
FROM POHead p
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top