Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> ORA-00904 Invalid column name for SELECT COUNT(DISTINCT ...) with Oracle 9i and ADO
Our application uses a select statement in the form
SELECT COUNT ( DISTINCT <column> ) FROM <table>
on an Oracle database.
We are accessing the database using ADO and the Oracle OLEDB driver OraOledb (not MsdaOra).
This query works fine with the Oracle 8.1.7 client software, but returns an error with the Oracle 9i client software. It does not appear to matter whether the server is 8i or 9i.
The query works fine from SQL-Plus Worksheet, but fails in our application. It also fails using a simple ADO based query tool (QTADO) using the oledb provider OraOledb.
The error is Invalid Column Name ORA-00904.
The error does not occur with SELECT COUNT, or with SELECT DISTINCT, but always occurs when they are combined.
Any help would be appreciated,
Phil Received on Tue May 13 2003 - 04:51:15 CDT
![]() |
![]() |