Re: [SQL] JOIN results of refcursor functions

2008-12-01 Thread Pavel Stehule
> > Then I've tried: > > CREATE FUNCTION foo(insklid int, out sklid int, out elid INT) RETURNS SETOF > record AS $$ > BEGIN >RETURN QUERY SELECT sklid,elid FROM skladkol; >RETURN; > END; > $$ LANGUAGE plpgsql; know bug :( - your variable names are in collision with column names. You have t

[SQL] DIVISION with Group By

2008-12-01 Thread hdhgdh mjhff
Hai all, I am new to SQL coding. I need some help in writing SQL In my task i have to calculate division of two sub queries. each sub query has its own group by clause. Here with i have Paste my table information and my SQL. /* tdos table */ CREATE TABLE tdos ( dosid integer NOT NULL DEFAULT

Re: [SQL] JOIN results of refcursor functions

2008-12-01 Thread Milan Oparnica
Alvaro Herrera wrote: Milan Oparnica escribió: I've searched documentation (8.3) and didn't find a way to use OUT variables in same manner as SETOF (RETURN NEXT doesn't create a record type result). Can you please give an example of how to return select fld1, fld2 from table through OUT

Re: [SQL] [HACKERS] Reg: Nested query

2008-12-01 Thread Alvaro Herrera
Hi, It's poor manners to crosspost questions to such a huge number of lists, particularly when there is one among them that perfectly suits your question. Vignesh Raaj escribió: > Can anyone please help in getting a solution... > I have two table, 1 contains all details of a person with person id

Re: [SQL] wired behaviour

2008-12-01 Thread Steve Crawford
Shane Ambler wrote: Lutz Steinborn wrote: Jepp, thats it. I've supposed this but can't believe it. So NULL is something out of this dimension :-) NULL refers to an unknown value - it cannot be said to equal or not equal anything other than NULL ... Not exactly. Null does not equal null.

[SQL] how to update 400 000 register not at the same time?

2008-12-01 Thread John Dizaro
I Have um very big table with primary key and all i nead. When i update same register from this table it comes sj=low. Can i Update all my 400 000 register not at the same time? By steps? Thanks -- John Evan Dizaro Software - Fone: (41) -0303 Fone: (41) 9243-3240 Rua: Alferes Poli Curit