Re: [SQL] RETURN SET OF DATA WITH CURSOR

2005-12-15 Thread grupos
Rodrigo Carvalhaes Richard Huxton wrote: grupos wrote: Hi ! I am making one plpgsql function and I need to return of setof data using a cursor. The problem is that my function is returning only the first row and column of the query. This query have more than 80 columns and 1.000 rows. Enyone

[SQL] RETURN SET OF DATA WITH CURSOR

2005-12-15 Thread grupos
Hi ! I am making one plpgsql function and I need to return of setof data using a cursor. The problem is that my function is returning only the first row and column of the query. This query have more than 80 columns and 1.000 rows. Enyone have any tip to give me? Here the fuction... CREATE

[SQL] Array in plpgsql with composite type

2005-06-20 Thread grupos
Hi Guys! I need to make an array with composite type (varchar, float8) to get data from a table (description and price) BUT I am having no success... I searched a lot on the internet without success. On the PostgreSQL manual there is no information how to handle array with plpgsql with compos

Re: [SQL] SELECT with sum on groups ORDERING by the subtotals

2005-06-17 Thread grupos
Hi Greg, Thanks for your reply. Yes, same group of code... Perfect solution, simple and efficient. Thank you very much!!! Cheers, Rodrigo Carvalhaes Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I need an subtotal for all the products with the same group and

Re: [SQL] SELECT with sum on groups ORDERING by the subtotals

2005-06-16 Thread grupos
Hi Gnanavel, Thanks for your promptly answer. Yes, your solution solves this problem BUT the point is that I don't wanna a solution that works only if the codes are in desc order. For example, if the codes are on the order above: INSERT INTO test (code, description, quant, price, total) VALUE

Re: [SQL] PostgreSQL and Delphi 6

2005-06-16 Thread grupos
min?!) until it's finish. ok? How did you say you avoided this ? Adrian Din, Om Computer & SoftWare Bucuresti, Romania On Thu, 16 Jun 2005 10:29:38 -0300, grupos <[EMAIL PROTECTED]> wrote: Hi Adrian, You're right. What we did was include one "refresh" butt

Re: [SQL] PostgreSQL and Delphi 6

2005-06-16 Thread grupos
ay 1 min !? ) - for curiosity how do you deal with this posible problem ? Adrian Din, Om Computer & Software, Bucuresti, Romania On Thu, 16 Jun 2005 09:54:21 -0300, grupos <[EMAIL PROTECTED]> wrote: Hi J! We use here vitavoom from Steve Howe (www.vitavoom.com). It's a very good an

Re: [SQL] SELECT with sum on groups ORDERING by the subtotals

2005-06-16 Thread grupos
Hi ! This is not possible because the query will have a time interval and the subtotal will change due the intervals passed to the query... To get the subtotal I already know how to do it (see below) but the problem is get the correct output, ordering by the bigger totals agrouped by product c

Re: [SQL] PostgreSQL and Delphi 6

2005-06-16 Thread grupos
Hi J! We use here vitavoom from Steve Howe (www.vitavoom.com). It's a very good and native alternative. It's paid but not expensive and you will have a very good and qualified technical supporte. Regards, Rodrigo Carvalhaes Postgres Admin wrote: I have a client who wants to use Delphi as

[SQL] SELECT with sum on groups ORDERING by the subtotals

2005-06-15 Thread grupos
Hi Guys! I need to make a complex query. I am thinking to use plpgsql BUT I am confused how I can solve this. What I have: CREATE TABLE test ( code varchar(15), description varchar(60), group varchar(10), quant float8, price float8, total float8 ) WITHOUT OIDS; INSERT INTO test (code, d