[SQL] Test

2000-08-28 Thread Stuart Foster

Please ignore.


Thanks



[SQL] Viewing a function

2000-08-29 Thread Stuart Foster

How can a view a function after it's created ?
I've created a SQL function that I need to review and possibly change. What
is the best way to go about this.


TIA




RE: [SQL] How can I select all of the tables with field name 'area'?

2000-09-11 Thread Stuart Foster

You should be able to query the system table that holds that column names.
Not sure which it is tho.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of G. Anthony Reina
Sent: Monday, September 11, 2000 4:38 PM
To: [EMAIL PROTECTED]
Subject: [SQL] How can I select all of the tables with field name
'area'?


I have a database with several tables. I'd like to pull out a list of
names for the tables that contain the field (class) name 'area'.

Can this be done?

-Tony






[SQL] Where to get benchmark testing

2000-09-15 Thread Stuart Foster

I'm not sure this is the right list for this but maybe someone could point
me in the right direction.

We are getting some DB servers to test performance. I was wondering if
anyone knows where we can get a test script of sorts that would allow us to
check performance on each of the servers.

TIA




RE: [SQL] sum of agreggates in one SELECT?

2000-09-19 Thread Stuart Foster

Could it be that the first query is using max which will only return the max
for b.lot and b.price..

so maybe.

select sum(max(b.lot))as quantity, max(b.price) as price from bid b, person
p where b.auction_id = 84 and p.id = b.person_id ;

Just a thought.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Louis-David Mitterrand
Sent: Tuesday, September 19, 2000 3:59 AM
To: [EMAIL PROTECTED]
Subject: [SQL] sum of agreggates in one SELECT?


Hello,

I have the following query/result:

auction=# select max(b.lot) as quantity,max(b.price) as price,p.login from
bid b, person p where b.auction_id = 84 and p.id = b.person_id group by
p.login order by max(price);
 quantity | price |   login
--+---+---
1 |  5000 | papy
   12 |  5750 | cunctator
8 |  6000 | vindex
(3 rows)

Now I would like to sum() all results from the quantity column and
return it with one SELECT statement. Is that possible?

I am trying:

auction=# select sum(b.lot) from bid b, person p where b.auction_id = 84 and
p.id = b.person_id ;
 sum
-
  52
(1 row)

But this is wrong because it sums all quantities. I don't know how to
apply a valid WHERE clause in that case.

Thanks in advance for any help, cheers,


--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org