Home » SQL & PL/SQL » SQL & PL/SQL » sql function
sql function [message #289477] Sat, 22 December 2007 04:11 Go to next message
meys
Messages: 5
Registered: October 2007
Junior Member

Hi All,

Is there any analytical function to do the below scenario in a simple way?

I have a table x with column -code with data's A, B, C, D
I want to get the sum of A and C and the sum of B and D through
select.



thanks in advance
Re: sql function [message #289478 is a reply to message #289477] Sat, 22 December 2007 04:14 Go to previous messageGo to next message
Michel Cadot
Messages: 64942
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why analytic? Just use sum and decode.

Regards
Michel

[Updated on: Sat, 22 December 2007 04:28]

Report message to a moderator

Re: sql function [message #289479 is a reply to message #289477] Sat, 22 December 2007 04:33 Go to previous messageGo to next message
pablolee
Messages: 2844
Registered: May 2007
Location: Scotland
Senior Member
You cannot perform a sum on text.
Re: sql function [message #289480 is a reply to message #289477] Sat, 22 December 2007 04:53 Go to previous messageGo to next message
meys
Messages: 5
Registered: October 2007
Junior Member

Michel,

Thanks. I handled it through case , query got messed due
to improper group by.I found the defect.



meys
Re: sql function [message #289483 is a reply to message #289480] Sat, 22 December 2007 05:26 Go to previous message
Michel Cadot
Messages: 64942
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Good, so now we don't know what was the problem and we don't know what is the solution.
Don't you think it would be helpful to post the whole thing?

Regards
Michel
Previous Topic: Sequence Name
Next Topic: Help with this SQL join
Goto Forum:
  


Current Time: Thu Jun 22 09:25:45 CDT 2017

Total time taken to generate the page: 0.07705 seconds