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: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
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: 2882
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: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
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: Tue Feb 11 03:47:07 CST 2025