Subject Re: [firebird-support] Returning Partial field Value
Author Paul Vinkenoog
Hello Mark,

> How do I return a partial field value in sql in InterBase? (...)
> SELECT Mid([SomeField],1,5) AS Expr1
> FROM SomeTable;
> if returns the first 5 characters, starting from the beginning of
> the value, how do I do the same with InterBase?

Just to add to what others already told you about the substr() UDF:

In Firebird (not in IB afaik) ib_udf also has a function substrlen,
which you call like this:

substrlen( string, startpos, count )

with count the number of characters you want returned, and startpos
1-based (like in substr).

Paul Vinkenoog