Written by

Question Lee Cascio · Jan 6, 2021

Nothing returned when running SQL query in SQL tool for a single column DISTINCT or GROUP BY?

Since I'm just starting to use this aspect of IRIS I can't tell if this is a bug or some kind of nuance.  If I run a single column query like this, I get results:

However if I try to retrieve using a DISTINCT or GROUP BY, I get no results:

And again except with a GROUP BY, with no results:

If I add in some other columns I still get no results HOWEVER, if I add in a date column, I now get results:

 

What am I missing here?  Is this by design and if so, what governs whether a return set is returned or not?  I did purge my query cache in case something was happening there but it did not fix this.

Product version: IRIS 2020.1

Comments

Warlin Garcia · Jan 8, 2021

Can you show the query plan? Usually this issue "shows" when indices are out of sync. Maybe try rebuilding indices.

0
Lee Cascio · Jan 12, 2021

This was indeed the issue, indexes needed to be rebuilt.

0