Home » SQL & PL/SQL » SQL & PL/SQL » Need Output in Singel Row
Need Output in Singel Row [message #419602] Mon, 24 August 2009 08:02 Go to next message
fakru.y
Messages: 34
Registered: May 2007
Member
Hi All
Attached query returning results in three columns.
I want to return the results in Single row.How we can do that.
Any suggestions greatly appreciated.

Thanks in advance
Fakru.Y
  • Attachment: Query.JPG
    (Size: 30.47KB, Downloaded 84 times)
Re: Need Output in Singel Row [message #419607 is a reply to message #419602] Mon, 24 August 2009 08:13 Go to previous messageGo to next message
bonker
Messages: 402
Registered: July 2005
Senior Member
Quote:
Any suggestions greatly appreciated.


you need to use max and group by in your query.
Re: Need Output in Single Row [message #419610 is a reply to message #419602] Mon, 24 August 2009 08:20 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
use sum and group by.

By
Vamsi
PS: always paste your query. Not as jpg.
Didn't see bonker's update. That should also be fine.

[Updated on: Mon, 24 August 2009 08:49]

Report message to a moderator

Re: Need Output in Singel Row [message #419878 is a reply to message #419602] Tue, 25 August 2009 19:53 Go to previous messageGo to next message
atxray
Messages: 41
Registered: August 2009
Location: qatar
Member

hello..
if u have more than one product have the same code so i think (as my knowledge) the result when u typing
select product_code from table where product_code = XXX;
will at least one row ..

Regards
Re: Need Output in Singel Row [message #419881 is a reply to message #419878] Tue, 25 August 2009 21:44 Go to previous message
Olivia
Messages: 519
Registered: June 2008
Senior Member
Go ahead as Vamsi or Bonker suggested. You can filter for a product using product_id as a predicate.
Thanks
Oli
Previous Topic: Problem with compiling function (merged 3)
Next Topic: curly analytics question
Goto Forum:
  


Current Time: Sat Dec 10 18:24:24 CST 2016

Total time taken to generate the page: 0.09714 seconds