Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Problem with complex outer join expression



"Chris Velevitch" <chris(dot)velevitch(at)gmail(dot)com> writes:
> select dummy_records.sequence_nr,timesheets.weekending,timesheets.timesheet_id
> from dummy_records
>      ,left outer join timesheets
>             on (timesheets.weekending = ('2006-04-09' + (integer
> dummy_records.sequence_nr-1)*7)))
> where dummy_records.sequence_nr between 1 and (date '2006-04-23' -
> date '2006-04-09')/7+1;

>      ERROR:  syntax error at or near "(" at character 155

> What am I doing wrong here?

The comma before LEFT OUTER JOIN is incorrect, and the keyword "integer"
is being used inappropriately.  I think you've miscounted your
parentheses too.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group