SQLite substr strangeness

Pierre Sahores psahores at free.fr
Tue Sep 29 13:46:36 EDT 2009


Did you try in urlencoding/urldecoding the parts of your request  
containting multiple words separated by spaces ?

Best,

Le 29 sept. 09 à 18:37, Peter Haworth a écrit :

> Posted this on the forum recently but had no ideas.  Anyone else  
> come across this?
>
> Something weird going on with a SELECT statement that includes a  
> substr function.
>
> This statement yields the ubiquitous "SQL error or missing database"  
> rev error:
>
> SELECT AccountID,substr(AccountName,12) FROM AccountHdr WHERE  
> AccountType='Asset' AND substr(AccountName,1,11)='Receivable:' AND  
> Hidden =0 ORDER BY AccountName
>
> The exact same statement (copied and pasted) in the Firefox SQLite  
> Manager plug in works fine and produces the correct results.
>
> Trial and error shows that the following works:
>
> SELECT AccountID,AccountName FROM AccountHdr WHERE  
> AccountType='Asset' AND substr(AccountName,1,11)='Receivable:' AND  
> Hidden =0 ORDER BY AccountName
>
> So something about the substr function in the SELECT appears to be  
> the problem. I'm using revDataFromQuery to execute the SELECT.
>
> Any ideas?
>
> As an aside, why does rev not return specific SQLite error messages?
>
> Thanks,
> Pete
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

--
Pierre Sahores
mobile : (33) 6 03 95 77 70

www.woooooooords.com
www.sahores-conseil.com









More information about the use-livecode mailing list