Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Aggregation in SQL queries from VB to Action Request System

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Anyone got any ideas on how to use aggregate functions in SQL like COUNT, SUM and AVERAGE to query Action Request System tables from VB or MS Query?

I'm using VB 6.0 ADODB and can successful retrieve records but cannot use aggregation in the SELECT statement. For example (MS Query):

SELECT Count(XX_HelpDesk."Ticket No.") 'Countresult'
FROM XX_HelpDesk XX_HelpDesk
WHERE (XX_HelpDesk.Product='ORACLE')

returns error:
Expected lexical element not found <identifier>
 
Your syntax looks ok. The fact that you have quotes around the column with spaces is a good thing.

Have you tried aggregating on a different column...one that has a name with no spaces, just in case that's the problem?

If so, maybe your ODBC driver is outdated?
Thomas V. Flaherty Jr.
Birch Hill Technology Group, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top