Re: [SQL] SQL help (Informix outer to EnterpriseDB outer)

2006-04-17 Thread kevin
I could probably work this out for you but I have no time today. However, as a 'plan b' maybe try this... 1- create a temp table based on all tables & conditions in the query except for the outer table (i.e. user, ascpDef, address, invention, and user) 2- do an outer join on the above temp table

[SQL] SQL help (Informix outer to EnterpriseDB outer)

2006-04-17 Thread gurkan
Hi all, I have been working on converting our Informix DB to PostgreSQL. There are some differences with SQL syntax. I have done many outer conversion so far, but all has either one outer or simple one. But this one I do not know how to do it. I have searched but could not find similar to what I n

Re: [SQL] SQL help (Informix outer to EnterpriseDB outer)

2006-04-12 Thread kevin . kempter
On Wednesday 12 April 2006 12:49, [EMAIL PROTECTED] wrote: > Hi all, > I have been working on converting our Informix DB to PostgreSQL. There are > some differences with SQL syntax. > > I have done many outer conversion so far, but all has either one outer or > simple > one. But this one I do not k

[SQL] SQL help (Informix outer to EnterpriseDB outer)

2006-04-12 Thread gurkan
Hi all, I have been working on converting our Informix DB to PostgreSQL. There are some differences with SQL syntax. I have done many outer conversion so far, but all has either one outer or simple one. But this one I do not know how to do it. I have searched but could not find similar to what I n

[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

Re: [SQL] SQL Help

2003-05-31 Thread Franco Bruno Borghesi
If your concern is speed, the thing here is that you will have as many records as there are in "mytable", most of them (I think) with NULLs for alias1, alias2, alias3 and alias4. This way, there is no condition to filter any record, so postgreSQL will do a sequential scan over the whole table. If

Re: [SQL] SQL Help

2003-05-31 Thread Josh Berkus
CF, > select > (case when column1 = column2 then column3 end) as alias1, > (case when column1 = column2 then column4 end) as alias2, > (case when column1 = column2 then column5 end) as alias3, > (case when column6 = column7 then column8 end) as alias4 > from > mytable Given the informat

Re: [SQL] SQL Help

2003-05-31 Thread Bruno Wolff III
On Fri, May 30, 2003 at 08:47:03 -0700, C F <[EMAIL PROTECTED]> wrote: > Hello, > I already tried this same basic question with no response maybe I was too > wordy. So here it is simplified what's the best way to write this query? I'm > open to using stored procedures, but even then

[SQL] SQL Help

2003-05-31 Thread C F
Hello, I already tried this same basic question with no response  maybe I was too wordy.  So here it is simplified what's the best way to write this query?  I'm open to using stored procedures, but even then I don't know how I would conditionally populate a resultset (refcursor).  Notice th

Re: [SQL] SQL Help

2001-01-29 Thread Mark A. Summers
I am loser -- I didn't realize there was analyze option on vacuum -- I created another index on Publisher code -- Now it smokes thanks Mark Summers "Stephan Szabo" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Fri, 26 Jan 2001, Mark A. Summers wrote: >

Re: [SQL] SQL Help

2001-01-26 Thread Stephan Szabo
On Fri, 26 Jan 2001, Mark A. Summers wrote: > I am having trouble with the following query taking forever: > - > SELECT * FROM ret108108_00, product > WHERE ret108108_00."isbn" = product."Item1" > > AND product."SuperCategory" = '1' > AND product."PublisherCode" = 'ZON' > ORDER BY ret10

[SQL] SQL Help

2001-01-26 Thread Mark A. Summers
I am having trouble with the following query taking forever: - SELECT * FROM ret108108_00, product WHERE ret108108_00."isbn" = product."Item1" AND product."SuperCategory" = '1' AND product."PublisherCode" = 'ZON' ORDER BY ret108108_00.qty DESC LIMIT 100 The problem is the second AND