Home » Developer & Programmer » Reports & Discoverer » Calculation based on a field containing data
Calculation based on a field containing data [message #218865] Sun, 11 February 2007 12:48 Go to next message
dabozarth
Messages: 4
Registered: January 2007
Junior Member
I am attempting to create a calculation that inserts data into a new field only if another field contains any type of data (alpha or numeric). For example: If field 1 contains alpha or numeric data then insert the number 5 into the new field created. If the field 1 contains no data then do not insert anything into the newly created field.

I have attempted to use the decode function but have not had much luck. Any suggestions on the syntax for my formula would be appreciated.

Thanks!
Re: Calculation based on a field containing data [message #218871 is a reply to message #218865] Sun, 11 February 2007 15:41 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This is a Reports Builder or Discoverer question? Or did you miss the forum?

Whichever it is, perhaps you might simply
IF field IS NULL THEN
   NULL;  -- i.e. don't do anything
ELSE
   new_field := 5;
END;
Re: Calculation based on a field containing data [message #218875 is a reply to message #218871] Sun, 11 February 2007 17:45 Go to previous message
dabozarth
Messages: 4
Registered: January 2007
Junior Member
Thanks for the reply. I ended up using a case statement. I should of thought of this before I posted the message. That was kind of a dumb question.
Previous Topic: How can i do this
Next Topic: Discoverer Viewer parameters in Ebusiness Suite
Goto Forum:
  


Current Time: Sat Dec 10 14:53:31 CST 2016

Total time taken to generate the page: 0.07351 seconds