473,320 Members | 2,189 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Base a query on a query.

Hi,

I have created a stored procedure in mysql. It bassically calculates scores for people in a competition. So on day one they might get 4, day two 5 etc etc.

I now want to sum the calculated score field that the stored procedure computes but have no idea how to do it.

I am very familiar with Access and new at MYSQL. In Access I create a computedailyscores query and then do another query that sums the computerdailyscore field.

How would I do this in mysql?

Cheers
Sep 3 '07 #1
4 1258
r035198x
13,262 8TB
Hi,

I have created a stored procedure in mysql. It bassically calculates scores for people in a competition. So on day one they might get 4, day two 5 etc etc.

I now want to sum the calculated score field that the stored procedure computes but have no idea how to do it.

I am very familiar with Access and new at MYSQL. In Access I create a computedailyscores query and then do another query that sums the computerdailyscore field.

How would I do this in mysql?

Cheers
Does your stored procedure take the date as a parameter?

You can use the same approach you used in Access as well.
Sep 3 '07 #2
Does your stored procedure take the date as a parameter?

You can use the same approach you used in Access as well.
Thnaks for the quick response.

There is no date in the stored procedure as yet, there maybe in the future though. Does this matter?

In access I would just reference the query in the from statement like

Select fields
From QueryName

When I do this in MYSQL query browser I just get an error saying the table doesn't exist. I just can't seem to find how to reference the stored procedure.
Sep 3 '07 #3
r035198x
13,262 8TB
Thnaks for the quick response.

There is no date in the stored procedure as yet, there maybe in the future though. Does this matter?

In access I would just reference the query in the from statement like

Select fields
From QueryName

When I do this in MYSQL query browser I just get an error saying the table doesn't exist. I just can't seem to find how to reference the stored procedure.
Do you mean procedure or view then? In MYSQL you can select from a view.
Sep 3 '07 #4
I have currently done it as a procedure.
Sep 3 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: tirath | last post by:
Hi all, I have a templated class that derives from a non-templated abstract class. How do I then cast a base class pointer to a <templated> derived class pointer in a generalised fashion? ...
1
by: Rhett | last post by:
Hello,EveryBody! I'm troubled by a design problem, Hoping that you'll save me out! The Situation is: We have two project of code A and B.A is our reusable code base, B is for specified for...
6
by: Paul | last post by:
In real life situation, do we ever come across a situation where we would need two base objects in an object. A snippet is worth 1000 words (: so... class Base { }; class Derived1:public Base...
4
by: John Baker | last post by:
Hi: I have two tables, a setup table (TblSetup) and a purchase order table (tblPO). When i construct a query with ONLY the tblPO shown, and a type in parameter for the PO number, I an update...
1
by: NomoreSpam4Me | last post by:
Hi there, this is my situation: I have a query base on table. But every week i get a new table and i dont want to have to go in my query and maje the change. Is there a way i can have a pop up...
7
by: David Bear | last post by:
I have a dictionary that contains a row of data intended for a data base. The dictionary keys are the field names. The values are the values to be inserted. I am looking for a good pythonic...
14
by: Dave Booker | last post by:
It looks like the language is trying to prevent me from doing this sort of thing. Nevertheless, the following compiles, and I'd like to know why it doesn't work the way it should: public class...
0
by: anvidc | last post by:
Hi everyone.. How to filter table1 base on an query from a table2 which is no join. Here is some picture for you to understand my question: Table 1 UserID -> Unique ID No. Name Company
2
by: Michael Bray | last post by:
With the recent release of EF I've decided to dig into it a bit more than I did before... the question I'm specifically interested in, but haven't been able to find a resource to answer it is......
6
by: Bhawna | last post by:
I am into c++ code maintenance for last 3-4 years but recently I am put into design phase of a new project. Being a small comapany I dont have enough guidance from seniors. Currently I am into a...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.