Try SELECT SUBSTRING(AnimalName, 1, 1)

MySQL wants the "(" to immediately follow the function i.e. no spaces.

-----Original Message-----
From: Sue Cram [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 03, 2005 9:28 AM
To: mysql@lists.mysql.com
Subject: Syntax Failures with SELECT SUBSTRING - Help!

Neither my developer nor I can figure out this one!  The package I'm using
is "Animal Shelter Manager" and is written in SQL.  Every other installation
of the product can use the SELECT SUBSTRING command except mine!  I use the
following code:

SELECT SUBSTRING (AnimalName, 1, 1)
FROM Animal

and I get "Syntax error or access violation near "(AnimalName, 1,1) FROM
Animal" at Line 1."   I can use the following with no error, so I know it
has to be in the SUBSTRING option:

SELECT AnimalName
FROM Animal

I also get a syntax error when I use an "IF" statement.  I get the same
error on my home computer (PC) and the PC's at our shelter office.  I also
get a message at startup that says:  "mmtask.exe Unable to locate component.
Application has failed to start because mmvcp70.dll was not found.
Reinstalling application may fix problem."  

Don't know if this is related to the substring error or not.   I have
reinstalled my application and it doesn't help.  I think I"m using the
current release of SQL but don't know how to check for sure.  As you can
probably tell, I'm new to SQL.  Can anyone help me with this problem?  

Thanks,
Sue in Sequim WA



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to