Home » Developer & Programmer » JDeveloper, Java & XML » Combine Fields
Combine Fields [message #477381] Thu, 30 September 2010 07:42 Go to next message
rki1966
Messages: 8
Registered: July 2010
Location: Dallas, TX
Junior Member
I am trying to figure out how to combine the two fields into 1 and sum the profits.

Field1 = Sector1
Field2 = Sector2
Field3 = Secotr1PNL
Field4 = Sector2PNL
Field5 = Currency
Field6 = Region


I want to sum Sector1PNL and Sector2PNL based on Sector1 and Sector2. I want 1 row for each sector.

Example:

Sector1 = CA
Sector2 = CA
Sector1PNL = 500
Sector2 PNL =600

Sector1 = FN
Sector2 = HC
Sector1PNL = 5700
Sector2 PNL =2600

Sector1 = HC
Sector2 = NULL
Sector1PNL = 200
Sector2 PNL = 0


Results:

Sector PNL
CA 1100
FN 5700
HC 2800




Re: Combine Fields [message #477412 is a reply to message #477381] Thu, 30 September 2010 08:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I am trying to figure out how to combine the two fields into 1 and sum the profits

Two fields of what?
Post an example we can run that is post the input and the final output you want from this input.
Also always post your Oracle version, with 4 decimals.

Regards
Michel
Re: Combine Fields [message #477420 is a reply to message #477412] Thu, 30 September 2010 09:48 Go to previous messageGo to next message
rki1966
Messages: 8
Registered: July 2010
Location: Dallas, TX
Junior Member
The example is in the original post.
Re: Combine Fields [message #477421 is a reply to message #477420] Thu, 30 September 2010 09:50 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I cannot do anything with what you posted.
If you don't want to post what I asked, stay with your problem, I don't care.

Regards
Michel
Re: Combine Fields [message #477423 is a reply to message #477421] Thu, 30 September 2010 10:01 Go to previous messageGo to next message
rki1966
Messages: 8
Registered: July 2010
Location: Dallas, TX
Junior Member
I asked an expert and they showed me how to do it
Re: Combine Fields [message #477434 is a reply to message #477423] Thu, 30 September 2010 11:32 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Good!
Do you wish/expect we answer you next time?

Regards
Michel
Previous Topic: XSL template
Next Topic: error in simple hello world
Goto Forum:
  


Current Time: Thu Mar 28 19:17:06 CDT 2024