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

MYSQL not working in crystal command

Status
Not open for further replies.

AnnetteB1305

Technical User
Aug 17, 2011
166
GB
Hello,

I have a mysql statement that works fine in my query programme (Navicat) however when I try and put this in a command in crystal it is throwing an error

The statement is
set @rownum=0
Select @rownum := @rownum +1 as ranknum, cust_name, count(distinct callref) as rank from opencall where logdate like '%/08/2011%'
and companyname="McDonald's Nederland" group by cust_name order by rank desc

Any help would be appreciated

Annette
 
Apologies The error message is:-

Failed to retrieve data from database. details 42000 [MYSQL] [ODBC 3.51 Driver] [mysqld-4.0.16] You have an error in your SQL syntax. Check the manual that corresponds with your MYSQL server version for the right syntax to use near 'Select @rownum :=@rownum +1 as ranknum,cust_name, count(dist [Database Vendor Code:1064 ]

Thanks,
Annette
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top