Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ORA-00904 Invalid column name for SELECT COUNT(DISTINCT ...) with Oracle 9i and ADO

ORA-00904 Invalid column name for SELECT COUNT(DISTINCT ...) with Oracle 9i and ADO

From: Phil Jollans <nospam_at_messring.de>
Date: Tue, 13 May 2003 11:51:15 +0200
Message-ID: <b9qf57$kbblq$1@ID-178233.news.dfncis.de>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US