RE: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-26 Thread Hal�sz S�ndor
2011/04/25 18:45 +, Larry McGhaw CREATE VIEW `myview2` AS SELECT a.*, IF(b.`Name` IS NULL, '', b.`Name`) AS `TypeName` FROM `mytable` a LEFT JOIN `types` b ON a.`Type` = b.`ID`; Well, for this construct IF(b.`Name` IS NULL, '', b.`Name`) there is a special function

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-26 Thread Daniel Kraft
On 04/26/11 05:32, Halász Sándor wrote: 2011/04/25 18:45 +, Larry McGhaw CREATE VIEW `myview2` AS SELECT a.*, IF(b.`Name` IS NULL, '', b.`Name`) AS `TypeName` FROM `mytable` a LEFT JOIN `types` b ON a.`Type` = b.`ID`; Well, for this construct IF(b.`Name` IS NULL,

RE: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-25 Thread Larry McGhaw
Cc: Daevid Vincent; mysql@lists.mysql.com Subject: Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body On 04/22/11 22:41, Larry McGhaw wrote: It does appear to be some type of bug to me. Hm... do you have an idea how to work around this bug then? Yours

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-25 Thread Daniel Kraft
Hi, On 04/25/11 20:45, Larry McGhaw wrote: My best advice is to not use a custom MySQL function in a view when the parameter to that function is a column or expression that has the potential to result in NULL because of being on the right side of a left outer join (or the left side of a right

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-24 Thread Daniel Kraft
- From: Daniel Kraft [mailto:d...@domob.eu] Sent: Friday, April 22, 2011 1:05 PM To: Daevid Vincent Cc: mysql@lists.mysql.com Subject: Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body Hi, thanks for the fast reply! On 04/22/11 21:39, Daevid Vincent

Re: WHERE does not work on calculated view field

2011-04-23 Thread ars k
Hi Daniel, Could you check the 'myview' once again? I think you thought to create the view as follows: CREATE VIEW `myview2` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS `TypeName`FROM `mytable` a LEFT JOIN `types` b ON *a.ID* *= b.`ID`*; Now your select queries will give results as

Re: WHERE does not work on calculated view field

2011-04-23 Thread Daniel Kraft
Hi, thanks for the answer! On 04/23/11 11:33, ars k wrote: Could you check the 'myview' once again? I think you thought to create the view as follows: CREATE VIEW `myview2` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS `TypeName`FROM `mytable` a LEFT JOIN `types` b ON *a.ID* *= b.`ID`*;

RE: WHERE does not work on calculated view field

2011-04-22 Thread Daevid Vincent
-Original Message- From: Daniel Kraft [mailto:d...@domob.eu] Sent: Friday, April 22, 2011 12:37 PM To: mysql@lists.mysql.com Subject: WHERE does not work on calculated view field Hi all, I'm by no means a (My)SQL expert and just getting started working with VIEWs and stored

Re: WHERE does not work on calculated view field

2011-04-22 Thread Daniel Kraft
Hi, thanks for the fast reply! On 04/22/11 21:39, Daevid Vincent wrote: DROP DATABASE `test`; CREATE DATABASE `test`; USE `test`; CREATE TABLE `mytable` (`ID` SERIAL, `Type` INTEGER UNSIGNED NULL, PRIMARY KEY (`ID`)); INSERT INTO `mytable` (`Type`) VALUES (NULL); CREATE TABLE

Re: WHERE does not work on calculated view field

2011-04-22 Thread Carsten Pedersen
On 22.04.2011 21:37, Daniel Kraft wrote: Hi all, I'm by no means a (My)SQL expert and just getting started working with VIEWs and stored procedures, and now I'm puzzled by this behaviour: DROP DATABASE `test`; CREATE DATABASE `test`; USE `test`; CREATE TABLE `mytable` (`ID` SERIAL, `Type`

Re: WHERE does not work on calculated view field

2011-04-22 Thread Daniel Kraft
Hi Carsten, On 04/22/11 22:11, Carsten Pedersen wrote: On 22.04.2011 21:37, Daniel Kraft wrote: DROP DATABASE `test`; CREATE DATABASE `test`; USE `test`; CREATE TABLE `mytable` (`ID` SERIAL, `Type` INTEGER UNSIGNED NULL, PRIMARY KEY (`ID`)); INSERT INTO `mytable` (`Type`) VALUES (NULL);

RE: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-22 Thread Larry McGhaw
@lists.mysql.com Subject: Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body Hi, thanks for the fast reply! On 04/22/11 21:39, Daevid Vincent wrote: DROP DATABASE `test`; CREATE DATABASE `test`; USE `test`; CREATE TABLE `mytable` (`ID` SERIAL, `Type

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-22 Thread Carsten Pedersen
On 22.04.2011 22:41, Larry McGhaw wrote: It does appear to be some type of bug to me. I agree. I was thrown by Daniels first and third comment, which I guess should read second and third I reproduced the behavior in 5.1.53-community on Windows. / Carsten -- MySQL General Mailing List For