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

having issue with mysql command

Status
Not open for further replies.

AnnetteB1305

Technical User
Aug 17, 2011
166
GB
Hello,

I have tested this in Navicat and working fine but it is throwing an error when putting this into a command in crystal reports. It is saying there is an error in the sql syntax. If I take out this section
set @rownum=0;
Select
@rownum := @rownum +1 as ranknum,
then fine but I need a rownumber to show a rank. Any help would be greatly appreciated

Thanks,

Annette
 
Apologies realised I've missed the error

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