MySQL Forums
Forum List  »  Stored Procedures

equivalent for 'compute' in sql server
Posted by: ujvala ujvala
Date: November 04, 2005 06:16AM

hi everyone,

is there any other alt in mysql for the compute in sql server?
it means, for the following query,

CREATE PROCEDURE `pubs_dbo`.`reptq1` ()
select pub_id, title_id, price, pubdate
from `pubs_dbo`.`titles`
where price is NOT NULL
order by pub_id
COMPUTE avg(price) BY pub_id
COMPUTE avg(price)

i had modified it as:

CREATE PROCEDURE `pubs_dbo`.`reptq1` ()
select avg(price),pub_id, title_id, price, pubdate
from `pubs_dbo`.`titles`
where price is NOT NULL
group by pub_id
order by pub_id

but after migration, when i checked the results in sql server and mysql, it does not matched.

is there any other alternative for my problem.

anyone help me?

thanx in advance.

UJVALA

Options: ReplyQuote


Subject
Views
Written By
Posted
equivalent for 'compute' in sql server
5380
November 04, 2005 06:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.