Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sybase ASE 15.5 select 1 in group by

Hi,

I've writen a query like

select 1

from table x

join table y on x.id = y.id

group by y.col1, x.col2, x.col3

now I would expect Sybase to return 1 row containing 1 field containing the value 1 for each group. Insteed only one row is returned containing 1 field with the value 1.

Is this expected in Sybase?

If I change the select to contain the actual grouped columns then I get 22000+ results...

select y.col1, x.col2, x.col3

from table x

join table y on x.id = y.id

group by y.col1, x.col2, x.col3

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question