Re: [SQL] help me...

2003-11-09 Thread Christopher Browne
The world rejoiced as [EMAIL PROTECTED] (ron_tabada) wrote: > Hello everyone, Good day! Could anyone help me translate this query > in Microsoft Access to Postgresql. I'm having a difficulty. Pls... > > Query1: > SELECT items.description, Sum(supplieditems.qty) AS SumOfqty > FROM items INNER JOIN s

Re: [SQL] transaction processing after error in statement

2003-11-09 Thread Stephan Szabo
On Fri, 7 Nov 2003 [EMAIL PROTECTED] wrote: > Whenever an error occurs within the transaction, PostgreSQL puts the > whole transaction in an *ABORT* state, so that there is no difference at > all between COMMITing or ROLLBACKing it. Even commands successfully > carried out before the error ocurred

Re: [SQL] transaction management in plpgsql functions

2003-11-09 Thread Chester Kustarz
http://www.postgresql.org/docs/7.2/interactive/plpgsql-structure.html "It is important not to confuse the use of BEGIN/END for grouping statements in PL/pgSQL with the database commands for transaction control. PL/pgSQL's BEGIN/END are only for grouping; they do not start or end a transaction. F

Re: [SQL] help me...

2003-11-09 Thread Yasir Malik
Hi, I'm usually wrong, but you can create a view for Query1 and Query2. That is do create view Query1 [your query for query1]; create view Query2 [your query for query2]; Then what you are doing should work. Are views offered in Access? Regards, Yasir On Sat, 8 Nov 2003, [iso-8859-1] ron_tabada

Re: [SQL] transaction management in plpgsql functions

2003-11-09 Thread Christopher Browne
After takin a swig o' Arrakan spice grog, Cris Carampa <[EMAIL PROTECTED]> belched out...: > It seems that transaction management statements (begin work...commit > work) are not allowed into plpgsql functions. Is it true? If true, > what happens if I put a DML statement into a function? Is it > au

Re: [SQL] [HACKERS] Schema boggle...

2003-11-09 Thread Chris Bowlby
Hi Marc, I was actually leaning towards schema's as a method to partition the data out when I was beginning to plan AMS 2, your suggestions of schema's confirmed this as a good approach for what we were looking for so I started to code the initial layout for the Schema in April/May, but at the

[SQL] SQL Help

2003-11-09 Thread luisblock
PLS, help, I am trying to JOIN two tables together with the LEFT OUTER JOIN statement, but with a twist: 1. table 1 id and table 2 projectid are the join field 2. Table 1 has de detail info for several ocurrences in table 2. For each id in table 1 (project detail), there are many entries of pr

[SQL] transaction management in plpgsql functions

2003-11-09 Thread Cris Carampa
It seems that transaction management statements (begin work...commit work) are not allowed into plpgsql functions. Is it true? If true, what happens if I put a DML statement into a function? Is it automatically commited every time the function executes? Is there no way to rollback the changes?

Re: [SQL] DateDiff in PostgreSQL

2003-11-09 Thread Yasir Malik
Hi, You can use the age() function to find the difference between dates, and use the extract() function to get the years, months, days, etc. Yasir On Fri, 7 Nov 2003, George A.J wrote: > Date: Fri, 7 Nov 2003 05:34:09 -0800 (PST) > From: George A.J <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Su

[SQL] Getting the row_count value outside of a function

2003-11-09 Thread enio
I can get the row_count value inside of a function, but I can“t get it outside of a function. How can I do this? Regards, Enio ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining colum

[SQL] help me...

2003-11-09 Thread ron_tabada
Hello everyone, Good day! Could anyone help me translate this query in Microsoft Access to Postgresql. I'm having a difficulty. Pls... Query1:SELECT items.description, Sum(supplieditems.qty) AS SumOfqtyFROM items INNER JOIN supplieditems ON items.itemno = supplieditems.itemnoGROUP BY items.descript

[SQL] transaction processing after error in statement

2003-11-09 Thread holger
Dear PostgreSQL Gurus, I have been using PostgreSQL for quite a while and always relied on its handling of transaction and concurrency. But recently I discovered a behaviour that deviates quite a lot from how I understand transactions and how things are handled by other databases: HP Allbase, Orac