[SQL] MAX() of 0 records.

2000-07-06 Thread Paul McGarry
Hello, I wish to perform the following query in a plsql function upon an update/insert/delete trigger: UPDATE entry_stats SET entry_maxprice=MAX(item_price) FROM item WHERE item.item_entry_id=NEW.item_entry_id AND item.item_live = 't'; However there will be situations where there are no re

Re: [SQL] confused by select.

2000-07-06 Thread Brett W. McCoy
On Thu, 6 Jul 2000, Jan Wieck wrote: > IMHO the correct suggestion. Just want to underline it. > > A list of purchases is usually a subset of another relation. > Remember, RDBMS means RELATIONAL Database Management System! > So if you setup your tables with a relational angle

[SQL] maximum TEXT length?

2000-07-06 Thread Dnesbitt
> The user documentation states that the TEXT data type is variable length, > however there appears to be some maximum limit. Is the maximum TEXT > length published anywhere? > > Regards, > //Dave

Re: [SQL] confused by select.

2000-07-06 Thread Jan Wieck
Brett W. McCoy wrote: > On Thu, 6 Jul 2000, John wrote: > > > I would like to get the id's where the customer has purchased an item of a > > specific type. > > > > Problem A: most people order more than one item at a time. > > So the 'items' field is a colon delimitted text field containing t

Re: [SQL] Re: [GENERAL] lztext and compression ratios...

2000-07-06 Thread Jan Wieck
Tom Lane wrote: > [EMAIL PROTECTED] (Jan Wieck) writes: > >> As long as you brought it up: how sure are you that the method you've > >> used is not subject to any patents? > > > Now that you ask for it: I'm not sure. Could be. > > >> If you can show that this method uses no ideas not found in

Re: [SQL] confused by select.

2000-07-06 Thread Richard
John wrote: > > Hello. I'm trying to do a select here that i have looked at from many > angles and cannot find a solution too. My main problem, (i believe) is > that it is trying to create a many to many relationship. I would be > grateful if anyone knew a way around this. > I believe that y

Re: [SQL] confused by select.

2000-07-06 Thread Brett W. McCoy
On Thu, 6 Jul 2000, John wrote: > I would like to get the id's where the customer has purchased an item of a > specific type. > > Problem A: most people order more than one item at a time. > So the 'items' field is a colon delimitted text field containing the >skus of the purchased item

[SQL] confused by select.

2000-07-06 Thread John
Hello. I'm trying to do a select here that i have looked at from many angles and cannot find a solution too. My main problem, (i believe) is that it is trying to create a many to many relationship. I would be grateful if anyone knew a way around this. Here's my predicamint. I have a database f

Re: [SQL] Running queries from scripts.

2000-07-06 Thread DalTech - Continuing Technical Education
> It works for me, for example, this way: > athens% psql -d template1 -c "select datname from pg_database" Thanks, I feel a little sheepish at not trying it with quotes around the query, but the manuals don't mention that you have to enclose the query in quotes when you use the -c option. -Chris

Re: [SQL] Running queries from scripts.

2000-07-06 Thread Margarita Barvinok
Hi, It works for me, for example, this way: athens% psql -d template1 -c "select datname from pg_database" datname --- template1 postgres biology test (4 rows) Hope this helps, -Rita On Thu, 6 Jul 2000, DalTech - Continuing Technical Education wrote: > I was wondering if any

[SQL] Running queries from scripts.

2000-07-06 Thread DalTech - Continuing Technical Education
I was wondering if anyone could help me out with the syntax of running queries from a unix script.   psql -c select 'I am a dummy' -d dbname  - never seems to work.  I've tried variations on the command line, but to no success.   Does the -c option work?   Cheers, Christopher Currie _

[SQL] Re: [GENERAL] lztext and compression ratios...

2000-07-06 Thread Tom Lane
[EMAIL PROTECTED] (Jan Wieck) writes: >> As long as you brought it up: how sure are you that the method you've >> used is not subject to any patents? > Now that you ask for it: I'm not sure. Could be. >> If you can show that this method uses no ideas not found in zlib, >> then I'll feel reas

[SQL] hierar questions

2000-07-06 Thread Andrey
Good day! Does any one know how I can create hierar request to db. May be, it possible through self extracted function.   Best regards Andrey

[SQL] Help! PLPGSQL and PGSQL - does not support more than 8 arguments for a function?

2000-07-06 Thread Grigori Soloviov
Hi. I just came accross the big trouble. " ERROR: Procedures cannot take more than 8 arguments" Really?!? Does anybody know what to do to make it take 9 and more argments Grigori [EMAIL PROTECTED]

[SQL] Re: [GENERAL] lztext and compression ratios...

2000-07-06 Thread Jan Wieck
Tom Lane wrote: > [EMAIL PROTECTED] (Jan Wieck) writes: > > One thing to keep in mind is that the LZ algorithm you're > > thinking of must be distributable under the terms of the BSD > > license. If it's copyrighted or patented by any third party, > > not agreeing to these te