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

What's wrong with this derived field????

Status
Not open for further replies.

christimess

Programmer
May 26, 2004
33
0
0
US
Hi,
I am trying to create the following derived field:
SUM(DISTINCT CASE "PS_AL_CHK_HRS_ERN"."ROW_NBR" WHEN '1' THEN "PS_AL_CHK_HRS_ERN"."AL_HOURS" ELSE 0 END)
but it keeps giving me the error message "ORA-00932: inconsistent datatypes: expected NUMBER got CHAR"
It is an Oracle database.
Thanks!
 
You might try removing the quotes from '1' or add quotes to 0 for your compare.

David L. Black Consulting
 
I tried that but it did not work. I can't figure out what is wrong with it. I have delt with many derived fields like this, but I have never had this many problems with it before.
 
I think ROW_NBR is a numeric field. Just to humor me make '1' 1 only. But leave 0 the way it is

SUM(DISTINCT CASE "PS_AL_CHK_HRS_ERN"."ROW_NBR" WHEN 1 THEN "PS_AL_CHK_HRS_ERN"."AL_HOURS" ELSE 0 END)



CharlesCook.com
ADP - PeopleSoft - SAP
ReportSmith - Crystal Reports - SQR - Query - Access
Reporting - Interfaces - Data Mining
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top