Having has problems with alias

Ivan Smahin ivan_smahin at paradigmasoft.com
Tue Mar 31 11:23:53 CDT 2009


Hello Beatrix,

Tuesday, March 31, 2009, 7:08:19 PM, you wrote:

> Hello,

> got a problem with having in sql containing alias fields. With the  
> following SQL I get some interesting result

> SELECT Message.OriginatorFrom from Message GROUP BY  
> Message.OriginatorFrom HAVING OriginatorFrom LIKE '%B%'
> works and has correct result

> SELECT Message.OriginatorFrom from Message GROUP BY  
> Message.OriginatorFrom HAVING Message.OriginatorFrom LIKE '%B%'
> Kernel error: 0x51500. Identifier "Message.OriginatorFrom" is not found.

> SELECT Message.OriginatorFrom as 'From' from Message GROUP BY
> Message.OriginatorFrom HAVING Message.OriginatorFrom LIKE '%B%'
> Kernel error: 0x51500. Identifier "Message.OriginatorFrom" is not found.

HAVING clause is working on query-result. There is no such field
because result is temporary table.


> SELECT Message.OriginatorFrom as 'From' from Message GROUP BY  
> Message.OriginatorFrom HAVING 'From' LIKE '%B%'
> Works, but empty result

Strange, it should work. Please report it to the Mantis.

> The last form is the one I need. Variations 2 and 3 should also work  
> in my opinion. Using Valentina Studio latest beta on Mac OS 10.5.6. I
> need this fixed urgently.


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list