Hello,

I am running MySQL version 3.23.39 on a Mac running OS X 10.2.4

This query works without error:

Drop table if exists temp; 
create temporary table temp select @canread := "false", @canread := if(Institution_Id 
= "8","true","false"), @canread AS canread from persons; 
select * from temp;

This query works without error:

select @canread := "false", @canread := if(FIND_IN_SET("8", Institution_Id) > 
0,"true","false"), @canread AS canread from persons;

This query doesn't:

Drop table if exists temp; 
create temporary table temp select @canread := "false", @canread := 
if(FIND_IN_SET("8", Institution_Id) > 0,"true","false"), @canread AS canread from 
persons; 
select * from temp;

I get the error:

ERROR 1166: Incorrect column name '@canread := if(FIND_IN_SET("8", Institution_Id) > 
0,"true","false")'

Can anyone tell me why?  

Barbara Gelhard


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to