Is the SQL command

Select a.field1,b.field2 

  from a outer b

  where exist (

    select c.field1,c.field2

      from c

      where a.field1=c.field1 

      group by c.field3,c.field4

    )

    and a.field3=b.field3

supported by DBMaker? (It can be executed in informix) ?

This SQL command will return a syntax error from DBMaker. DBMaker uses exists instead of exist. If exist is replaced by exists, executing the SQL command will return the exception: Error:non-aggregate column must be in the group-by list.

The question is subquery: select c.field1,c.field2 from c where.... group by c.field3,c.field4.

This select command executes group by group, but the project column is not the group by column, and the project column will not be aggregate. The syntax will be confused. You can execute your SQL command exactly by with the following statements:

dmSQL> select a.field1,b.field2

    2>   from a outer b

    3>   where exists (

    4>     select c.field3,c.field4

    5>       from c

    6>       where a.field1=c.field1

    7>       group by c.field3,c.field4

    8>   )

    9>   and a.field3=b.field3

Copyright 1999-2001 CASEMaker Inc. All rights reserved.
Comments or questions about our web site? Please write the webmaster.
Terms and Conditions | User Privacy Statement