Subject | Re: [firebird-support] FB/IB equivalent of LEFT(string, count) |
---|---|
Author | moscow@cix.co.uk |
Post date | 2003-12-13T12:37Z |
Thanks for the reply, Helen - see below:
----------Original Message---------
be used that seems to be in conflict with other SQL usage. However, in
SQLServer, Access, FoxPro (prior to MS), the use of:
SELECT field1, field2 FROM Table
WHERE LEFT(field3,3) = 'foo'
has always worked in the past - but apparently not in FB1.5.
so has:
SELECT LEFT(field1,3) AS foobar
FROM Table
I'm in the process of converting a ColdFusion web app from using Access
mdbs to FB1.5, hence the problem.
Cheers
Terry
----------Original Message---------
> At 11:18 AM 13/12/2003 +0000, you wrote:I realise it's a reserved word, that much I knew. It is where/how it can
> >I'm new to FB, and my old SQL knowledge seems to have deserted me here.
> >
> >Using 'LEFT(field_name, count)' in a WHERE clause of a query gets me a
> >'TOKEN unknown' error.
> >
> >I thought this was standard SQL, but evidently FireBird has other
> ideas.
>
> Standard SQL for what? The LEFT keyword in SQL is reserved. It's used
> in LEFT OUTER JOIN.
be used that seems to be in conflict with other SQL usage. However, in
SQLServer, Access, FoxPro (prior to MS), the use of:
SELECT field1, field2 FROM Table
WHERE LEFT(field3,3) = 'foo'
has always worked in the past - but apparently not in FB1.5.
so has:
SELECT LEFT(field1,3) AS foobar
FROM Table
I'm in the process of converting a ColdFusion web app from using Access
mdbs to FB1.5, hence the problem.
>As either of the cases above!
>
> >Can someone tell me the equivalent, please?
>
> What does this function need to do?
Cheers
Terry