[ic] How to join tables with the [query] tag

Javier Martin interchange-users@interchange.redhat.com
Thu Sep 20 13:01:00 2001


> > The problem comes when I try to join the tables 'transactions' and
> > 'orderline' by the field 'order_number'. This allows knowing on which
> > campaign was sold the product, etc. It says "Parse error near
> .affiliate".
> > The exact parameters of the [query] tag are:
> ...
> >         sql="
> >              select transactions.affiliate,
> >               transactions.campaign,
>
> Are you using an sql database?
>
> I tried a very basic "select [table].[column] from [table]" with a shop
> using Postgres and it worked fine. With a shop that uses the standard IC
> database, it generates that parse error! Sounds like either it's a bug in
> the parser or else it's not supported with that database type.

Yes, I'm using an SQL database (Postgres). I've tried the same sentence from
the isql prompt and the syntax is apparently correct. I've also tried the
[table] syntax with the brackets, but no luck. I'm sure this has to be a
nonsense, but I've already spent half a day with this... I'm really looking
forward to work it out!

Javier