[V4RB] - CONCAT in WHERE-clause

Erik Scholtz anomar at elitecoderz.net
Sun Jul 3 14:02:21 CDT 2005


Ruslan Zasukhin wrote:
>>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 )"


Yes that's true: here comes the whole story:
I made this method (as you gave it here but without index, since Vstudio 
crashes every time I'm trying to use the Index-Option for a method) and 
tried the query as you discribed (on the methodfield). Vstudio did not 
gave a result, instead Vstudio crashed.

So I run the following query on the "SQL Editor" in the Vstudio ("SELECT 
SUBSTR(phone,1,LOCATE('/',phone)-1) FROM usersdata"), where I expected 
to get a result from the database (all area-codes).

Instead of getting the area-codes (the trailing numbers in front of the 
/), I got empty rows for each entry. So the query itself has no result 
and that's the reason why the method also does not work, I think.


Erik



More information about the Valentina mailing list