Board index » delphi » SQL use of SUBSTRING() ?

SQL use of SUBSTRING() ?

Can someone help me to have the correct sintax to use the aggregate
SQL  function SUBSTRING().

I need to select records on the base of searching and locate a
substring in a field.

Unfortunately I am unable to find the correct sintax to be used for.

Thanks

 

Re:SQL use of SUBSTRING() ?


Quote
l...@iol.it (Manlio Laschena) wrote:
> Can someone help me to have the correct sintax to use the aggregate
> SQL  function SUBSTRING().

> I need to select records on the base of searching and locate a
> substring in a field.

> Unfortunately I am unable to find the correct sintax to be used for.

It's database specific, but in local SQL, here's the syntax for the
string functions:
        - upper(<astring>);
        - lower(<astring>);
        - substring(<astring> from <start> for <length>);
        - trim([both] <achar> from <astring>) -> trims both ends;
        - trim(leading <achar> from <astring>) -> trims left;
        - trim(trailing <achar> from <astring>) -> trims right.

Have fun!

Jasper

Other Threads