Substring

Mark Schonewille m.schonewille at economy-x-talk.com
Fri Dec 12 19:26:13 CST 2014


Thanks Ivan,

Substr is what I ended up using. LEFT SUBSTR and RIGHT together let me 
do what I need.

The interactive help is probably the autocomplete menu that appears all 
the time. How do I turn this off? If I select something from the 
autocomplete menu, I don't get any sample arguments, which makes it 
difficult to figure out how to use a function.

Do you know if there is also some off-line SQL syntax reference 
available for Valentina?

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

Munten verzamelen op Facebook
https://www.facebook.com/groups/numismatiek.nl/

On 12/11/2014 15:52, Ivan Smahin wrote:
>
> On Dec 11, 2014, at 12:52, Mark Schonewille <m.schonewille at economy-x-talk.com> wrote:
>
>> Hi,
>>
>> I would like to get part of a string from a database field. The syntax I'd like to use is
>>
>> SELECT SUBSTRING(xstring,5,2) AS ystring FROM xtable
>>
>> This should get characters 5 and 6 from field xstring renamed as ystring. Is this valid Valentina SQL syntax? If not, what would be a good alternative?
>
> SELECT SUBSTR('Valentina',6,4)
> => 'tina'
>
> SELECT SUBSTR('Valentina',2)
> => 'alentina'
>
> SELECT SUBSTRING('Valentina' FROM 6 FOR 4)
> => 'tina'
>
> SELECT SUBSTRING('Valentina' FROM 2)
> => 'alentina'
>
> http://www.valentina-db.com/docs/dokuwiki/v5/doku.php?id=valentina:vcomponents:vsql:reference:expr:funcs_string&s[]=substr#substr_str_pos_len
>
> Also you can find an interactive help right in the Valentina Studio.
>


More information about the Valentina mailing list