×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

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

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

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

(OP)
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!

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

You might try removing the quotes from '1' or add quotes to 0 for your compare.  

David L. Black Consulting

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

(OP)
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.

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

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close