[SQL] join syntax

2003-06-17 Thread Jodi Kanter
Title: One of my colleagues has created a database where he has the same field name in two tables and uses this field to link his tables rather than some arbitrary value. For example, he has used "exp_id" in two tables. When writing his joins he uses a syntax tha

Re: [SQL] join syntax

2003-06-17 Thread scott.marlowe
On Tue, 17 Jun 2003, Jodi Kanter wrote: > One of my colleagues has created a database where he has the same field > name in two tables and uses this field to link his tables rather than > some arbitrary value. For example, he has used "exp_id" in two tables. > When writing his joins he uses a s

Re: [SQL] join syntax

2003-06-17 Thread Josh Berkus
Jodi, > One of my colleagues has created a database where he has the same field > name in two tables and uses this field to link his tables rather than > some arbitrary value. For example, he has used "exp_id" in two tables. > When writing his joins he uses a syntax that says something like JOI

Re: [SQL] JOIN syntax

2000-06-25 Thread Thomas Lockhart
> Looking at SQL92, it seems that I ought to be able to do this: > SELECT * FROM invoice INNER JOIN > (SELECT * FROM invoice_line WHERE lineno > 1) > ON invoice.invno = invoice_line.invno; > ERROR: parser: parse error at or near "(" Wrong syntax (for Postgres anyway). We don't yet have subsele

[SQL] JOIN syntax

2000-06-25 Thread Oliver Elphick
Looking at SQL92, it seems that I ought to be able to do this: SELECT * FROM invoice INNER JOIN (SELECT * FROM invoice_line WHERE lineno > 1) ON invoice.invno = invoice_line.invno; ERROR: parser: parse error at or near "(" (I know it can be successfully expressed in a more complex WHERE clause