[V4RB] - CONCAT in WHERE-clause

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jul 3 13:58:15 CDT 2005


On 7/3/05 1:38 PM, "Erik Scholtz" <anomar at elitecoderz.net> wrote:

>> I recommend you to use Table Method for this task
>>     because main advantage -- you can build index for it.
>> 
>> So make new method field in table with formula, and mark it indexed.
>> 
>> Then do search as
>> 
>>     where fldMEthod = '03022256489'
> 
> Hi Ruslan,
> 
> 
> thanks for your advise - but I still have a problem: The method doesn't
> work, since the following select-statement also does not work:
> 
> SELECT SUBSTR(phone,1,LOCATE('/',phone)-1) FROM usersdata

Wait, in the method cannot be SELECT
 
Formula must be

 "CONCAT( LPAD( phone, LOCATE( '/', phone ) - 1, '' ),
          SUBSTRING( phone, LOCATE('/',phone) + 1 )"


> I tried this query in the VStudio, but it returns an result-page with
> empty rows for each row in the table. It seems, that Valentina can not
> execute the LOCATE-statement; I get a nice result, when replacing this
> statement with an integer-value (which just doesn't work for me). Or did
> I understand something wrong again?


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list