Subject Re: Length of String < 10 in SQL Statement - how?
Author hi_feroz
Thanx Magnus..
it works fine;)

select BAR_CODE from LIB_BOOKS_MST
where substring(BAR_CODE from 10 for 1) = '';

displays those records where Barcode length < 10.

can u translate this - substring(BAR_CODE from 10 for 1) = '' in
plain english - how does it work? it starts from position 10, checks
a string at this position and returns it -> loops until position 1.
Is it?


--- In firebird-support@yahoogroups.com, Magnus Titho
<magnus.titho@k...> wrote:
> hi_feroz schrieb am 27.01.2005 09:08:
> >
> > hi huyz,
> > how to write select statement to fecth the records where the
length
> > of value of a string field is < 10?
>
> The dirty solution (no UDF needed):
>
> select Column from Table
> where substring(Column from 10 for 1) = ''
>
> :-)
>
>
>
> Magnus