Subject Re: Equivalent of VFP6 LEFT() in FB
Author kaczy27
--- In firebird-support@yahoogroups.com, Namit Nathwani
<namitnathwani@h...> wrote:
> Hi all
>
> I have this FB table containing a BLOB (Text) field. For a remote
views
> select statement I have written this in VFP6 as below:
>
> SELECT MCUSTOMSOFFICE.*, LEFT(MCUSTOMSOFFICE.mAddress, 44) AS
cShortAddress ;
> FROM MCUSTOMSOFFICE MCUSTOMSOFFICE ;
> ORDER BY MCUSTOMSOFFICE.CNAME
>
> The LEFT() does not seem to be recognized by FB/ODBC, what is the
> equivalent of LEFT()
for varchar fields you can use
SUBSTRING(value FROM startpos [FOR length])

I don't know how this will work with blobs, but I'd try casting it
first
SUBSTRING(CAST(value) as VARCHAR(100)) FROM startpos [FOR length])


> Please advise.

HTH
>
> Regards
> Bhavbhuti
CUIN Kaczy