Re: Stored Queries? was: Can anyone figure out this MySQL query?

From: <do-not_at_spam.me>
Date: Wed, 30 Aug 2000 14:32:34 GMT
Message-ID: <39ad1983.94500594_at_news.arnes.si>


Hi Theo;

In regards to the last solution requiring 3 queries, is it possible to do this in MySQL 3.22.32 ? I had a look at the online documentation and it only mentioned that stored procedures where not possible yet. Also I looked through MySQL by Paul DuBois, but there was only a small bit on redirecting commands stored in a flat file to the mysql program from the command line.
I suppose the other way might be to use temporary tables. Which method did you have in mind?

Best Regards
  Chris

On Wed, 30 Aug 2000 09:52:48 GMT, peterbroers_at_rhbcml.leidenuniv.nl (Theo Peterbroers) wrote:

>QueryCustomers
>SELECT *
>FROM Invoices
>WHERE CustomerNo IN (1,2,3, ..... n)
>
>QueryHotels
>SELECT HotelNo, count (*)
>FROM QueryCustomers
>GROUP BY HotelNo
>HAVING count (*) > 5
>
>QueryInvoices
>SELECT *
>FROM QueryCustomers as c, QueryHotels as h
>WHERE h.HotelNo = c.HotelNo
>
>
>
Received on Wed Aug 30 2000 - 16:32:34 CEST

Original text of this message