[ic] How to join tables with the [query] tag
Javier Martin
interchange-users@interchange.redhat.com
Thu Sep 20 13:27:01 2001
> > > Query was:
> > > select transactions.affiliate,
> > > transactions.campaign,
> > > transactions.order_date,
> > > transactions.order_number,
> > > orderline.order_number,
> > > orderline.sku,
> > > orderline.subtotal
> > > from transactions, orderline
> > > WHERE
> > > transactions.order_number = orderline.order_number and
> > > orderline.sku = 00dc9066f52ad31184eb0080c70ea797
>
> Here are quotes missing. Use:
>
> orderline.sku = '00dc9066f52ad31184eb0080c70ea797'
That's it, also Jonathan pointed this out. Thank both you, it works ok now.
I was confused by the fact that the parser signaled the syntax error near
'transactions.affiliate', which is actually so far from the error :)
> I would use:
>
> select T.affiliate, ..., O.order_number, ...
> from transactions T, orderline O
> where ...
>
> What database you are using ?
Postgres.
Javier