General SQL wierdness
Posted in 2005
Topics: SQL Development & Query Writing, Platform-Specific Issues
How
come I can do this query:
select a.invoice
from invoice a inner join invoice b on a.invoice = b.invoice
But I cannot do this:
select a.invoice
from invoice a inner join (select charge.invoice from charge) b ona.invoice = b.invoice
I receive a syntax error.
Engine is 9.40.UC6 running on Red Hat ES 3.0
Thanks
Peter
That syntax is not supported by Informix like it is
with MS SQL. Try this instead
select a.invoice
from invoice a inner join table(multiset(selectcharge.invoice from charge)) b on a.invoice =
b.invoice
--- "Peter J Dia...."
<pdiazdeleon@infinityhealthcare.com> wrote:
> How come I can do this query:
>
> select a.invoice
> from invoice a inner join invoice b on a.invoice => b.invoice
>
> But I cannot do this:
>
> select a.invoice
> from invoice a inner join (select charge.invoice
> from charge) b on> a.invoice = b.invoice
>
> I receive a syntax error.
>
> Engine is 9.40.UC6 running on Red Hat ES 3.0
>
> Thanks
> Peter