Re: [SQL] Complex Query - Data from 3 tables simultaneously

2005-10-28 Thread Amit_Wadhwa
SELECT a.*,b.*,c.*,c.issuedate-a.recd_date as age FROM shipments a LEFT JOIN materials b ON a.shipid = b.shipid;LEFT JOIN issuetable c ON b.material_id = c.material_id WHERE (a.recd_date between cast(' "+date1+" 00:00:00' as datetime) and cast(' "+date2 + ' ") 23:59:59' as datetime) Did the

[SQL] information_schema problem

2005-10-28 Thread Kyle Bateman
I'm trying to use information_schema.view_column_usage to determine the native table from which various view columns descend. This is so my interface can automatically generate the correct foreign key links from one view to another. But in the case where a view references two tables linked by a

Re: [SQL] combining records from a single table and presenting them as one record

2005-10-28 Thread Michael Fuhr
On Fri, Oct 28, 2005 at 11:47:12AM -0400, Abhishek wrote: > Using LIMIT 1 does return me a single record but please note that the table > can have multiple guids for which I need a unique record with all the digit > types combined. Using LIMIT 1 returns me always one record. :-( Have you looked at

Re: [SQL] Complex Query - Data from 3 tables simultaneously

2005-10-28 Thread Muralidharan Ramakrishnan
SELECT A.SID , A.RECDATE , B.MID , B.MBDATE , C.ISSDATE FROM TableA A LEFT OUTER JOIN TableB B ON   A.SID = B.SIDLEFT OUTER JOIN TableC C ON B.MID = C.MIDORDER BY A.SID[EMAIL PROTECTED] wrote: All,   Using Postgres 8.0 on Windows Server 2003 - 16GB Ram, 3Ghz X 2 Xeons Accessing through JDBC / J

Re: Fwd: Re: [SQL] Referencing

2005-10-28 Thread lucas
Quoting Daryl Richter <[EMAIL PROTECTED]>: It's hard to say without knowing more precisely what you are trying to model, but I think this push you in the right direction: -- This table takes the place of both SEND and BUY create table activity( id serial primary key, prod

Re: [SQL] combining records from a single table and presenting them as one record

2005-10-28 Thread Abhishek
Using LIMIT 1 does return me a single record but please note that the table can have multiple guids for which I need a unique record with all the digit types combined. Using LIMIT 1 returns me always one record. :-( On 10/27/05, boinger <[EMAIL PROTECTED]> wrote: On 10/27/05, Abhishek <[EMAIL PROT

Re: Fwd: Re: [SQL] Referencing

2005-10-28 Thread Daryl Richter
[EMAIL PROTECTED] wrote: Ok, But the problem is becouse the "buy" and "send" tables referencing with other father table, wich is different. I shoud not create a spent table to put the "buy" and "send" values becouse the entire database is more complex than it. look: create table output( id seria

Fwd: Re: [SQL] Referencing

2005-10-28 Thread lucas
Ok, But the problem is becouse the "buy" and "send" tables referencing with other father table, wich is different. I shoud not create a spent table to put the "buy" and "send" values becouse the entire database is more complex than it. look: create table output( id serial primary key, client integ

Re: [SQL] why vacuum

2005-10-28 Thread Andrew Sullivan
On Fri, Oct 28, 2005 at 01:09:43PM +0200, Mario Splivalo wrote: > I'll go trough my code, it's been a while since I touched it, I'll write > some documentation and I'll inform the comunity. Thnx for the pointouts. And thank _you_ for proposing to do this. If everyone contributes their discoveries

Re: [SQL] why vacuum

2005-10-28 Thread Mario Splivalo
On Thu, 2005-10-27 at 11:51 -0400, Andrew Sullivan wrote: > Well, AFAIK Oracle itself offers no replication, either. If you want > it, you have to buy a license for it. Which means it's an add-on. > Heck, most Linux distributions' kernels don't offer support for > network cards: they're an add-