Re: [SQL] Please help with a query..

2006-04-17 Thread Bruno Wolff III
On Tue, Apr 11, 2006 at 02:34:22 -0700, Timo Tuomi <[EMAIL PROTECTED]> wrote: > > I'd need to get the time interval X-Y-Z on each date but I cannot rely > on the date (can't make any joins based on the date part of > timestamps). Instead I'd need to find out X-Y and Y-Z pairs with a > minimal "s

[SQL] Truncate and Foreign Key References question

2006-04-17 Thread Gregory S. Williamson
This is in postgres 8.1: PostgreSQL 8.1.1 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) I've got a table in one schema (work.client_collect_rates) which has an FK constraint with a table, content.collections_l (definitions shown below). There's a

Re: [SQL] Special meaning of NL string

2006-04-17 Thread Vellinga, Fred
Title: RE: [SQL] Special meaning of NL string Tom, Thanks for your answer. The problem is indeed related to the statistics. The isssue now seems to find out why the statistics are 'incorrect' every day. My gues is the following: we run every night the command VACUUM ANALYZE. This command re

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

[SQL] Please help with a query..

2006-04-17 Thread Timo Tuomi
I'm stucked.. Say a car travels from X to Y then from Y to Z (and then from Z back to X but that's not relevant here). In the table below are the timestamps for each point in various dates. The complete trip X-Y-Z-X is in the table but each leg on a separate row. I'd need to get the time interva