Re: [SQL] please help with converting a view in oracle into postgresql readably code

2002-10-04 Thread Tom Lane
"Matthew Geddert" <[EMAIL PROTECTED]> writes: > create or replace view events_orders_states > as > select o.*, > o_states.order_state > from events_orders o, > (select > order_id, > decode (floor(avg (decode (reg_state, >'canceled', 0, >'waiting', 1, >

[SQL] please help with converting a view in oracle into postgresql readably code

2002-10-04 Thread Matthew Geddert
Hello, I am trying to convert an application to postgresql, and am having a bear of a time converting the following view (from oracle). What it does, just in case you aren't very familiar with oracle syntax, is group the average reg_state from the events_registrations table after having converted

Re: PROBLEM SOLVED RE: [SQL] please help with converting a view in oracle into postgresql readably code

2002-10-02 Thread Roberto Mello
On Tue, Oct 01, 2002 at 11:55:14PM -0700, mgeddert wrote: > Robert, > > Thanks for the help, I kept on playing with what you gave me, and after > removing one () pair and adding the ENDs to the CASE WHENs it works! > Thank you so much for the help, I have been very frustrated with this > for a nu

Re: [SQL] please help with converting a view in oracle into postgresql readably code

2002-10-01 Thread Roberto Mello
On Tue, Oct 01, 2002 at 10:41:17PM -0700, mgeddert wrote: > create or replace view events_orders_states as select o.*, o_states.order_state from events_orders o, ( SELECT order_id, CASE ( floor (avg (

[SQL] please help with converting a view in oracle into postgresql readably code

2002-10-01 Thread mgeddert
Hello, I am trying to convert an application to postgresql, and am having a bear of a time converting the following view (from oracle). What it does, just in case you aren't very familiar with oracle syntax, is group the average reg_state from the events_registrations table after having converted