[dba-Tech] MySQL Syntax: Fresh eyes needed

Tina Norris Fields tinanfields at torchlake.com
Sat Mar 16 08:34:21 CDT 2013


Hi Arthur,

Is it because there are no single quotes around Company in argument B of 
the IF statement?

T


Tina Norris Fields
tinanfields-at-torchlake-dot-com
231-322-2787

On 3/16/2013 8:35 AM, Arthur Fuller wrote:
> I've been staring at this expression too long and my eyes are beginning to
> cross:
> <,mysql>
> SELECT
> IF(ISNULL(customers.`Last Name`),customers.Company,CONCAT(customers.'First
> Name',' ', customers.'Last Name')) as 'File As:'
> from `customers`
> </mysql>
>
> Syntax error. The Concat() part works fine in isolation so the problem is
> not there
>
> TIA,
> Arthur
> _______________________________________________
> dba-Tech mailing list
> dba-Tech at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-tech
> Website: http://www.databaseadvisors.com
>



More information about the dba-Tech mailing list