Nested methods
jda
jda at his.com
Sun Jul 17 19:06:01 CDT 2005
>jda wrote:
>>I thought perhaps the SELECT CASE statement might do what I'm
>>looking for. Here's a query that looks like it should work, but
>>returns nothing. Any ideas?
>>
>>SELECT CASE WHEN
>> LOCATE('The ',title)=1 THEN RIGHT(title, LENGTH(title) - LENGTH('The '))
>>ELSE
>> WHEN LOCATE('An ',title)=1 THEN RIGHT(title, LENGTH(title) -
>>LENGTH('An '))
>>ELSE
>> WHEN LOCATE('A ',title)=1 THEN RIGHT(title, LENGTH(title) - LENGTH('A '))
>>ELSE
>> title
>>
>
>I guess you have some exception from parser -right?
Actually, I didn't get an exception. But when I checked the result
returned, it was empty.
>
>Anycase you should use much more simple statement:
>
> SELECT
> CASE
> WHEN ... THEN ...
> WHEN ... THEN ...
> WHEN ... THEN ...
> ...
> ELSE title
> END
>
Thanks, Ivan, I'll try it!
Jon
More information about the Valentina
mailing list