SQL Language (MOSC)

MOSC Banner

SQL with no results returns a count of 1

edited Apr 19, 2019 12:57PM in SQL Language (MOSC) 9 commentsAnswered

hi

before I go completely mad, can anyone think of a scenario where, using SQL plus against 12.1.0.2 on W7,  select * from an SQL statement correctly returns no rows but select count(*) from the same SQL statement against the same data returns a count of 1

In essence the main sql returns a result of

LOGGER_TELEM_CHANNEL_ID READER_INTERFACE_ID MIN_DATE            MAX_DATE            TS_VALUE_FROM_STD

----------------------- ------------------- ------------------- ------------------- -------------------

                      1                   1 01/10/2014 00:42:00 01/10/2014 00:44:00 01/10/2014 00:30:00

to which is appended a condition of

where t6.ts_value_from_std between t6.min_date and t6.max_date

as in

select * from ( <main sql >)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center