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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Informix syntax query

Status
Not open for further replies.

lizzarrd

MIS
Joined
Dec 3, 2007
Messages
3
Location
GB
Hi All,

Am very new to infomrix and was wondering if anyone could tell me what is wrong (syntax-wise) with the following query:
========================================
Select
DATE(transac_date) as Date,
, COUNT(*)
From
tb_transaction
Where
company_sn = 101
Group by
DATE(transac_date)
========================================

If I remove the DATE() function the query runs fine, but with the function it produces a syntax error message.

Any help here is greatly appreciated!!

L
 
Where is the syntax error ? the SELECT clause or the GROUP BY ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
It seems that the error is in the Group by Clause.

 
Use this clause:
GROUP BY 1

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top