|
Home > Archive > Programming with dBASE > October 2005 > Left() - sql function
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Left() - sql function
|
|
| Mark Wood 2005-10-27, 7:28 am |
| Hi all,
I was hoping that one of the "SQL in dBase" experts could offer some
guidance. I am trying to create a filter on two fields, but dBase is
reporting the following error "Database Engine Error: Operation not
applicable." I note from the help files on, topic: filter, that only basic
SQL operators appear to be supported; I thought I would seek confirmation
that it would never work before i give up and implement this via canGetRow
or setRange or a calculated field.
// Filter out unwanted records. note left() is the SQL function
rowPlanning.filter := [version = '00000' and left(partNo,10) <>
'SHOPTICKET']
Thanks
Mark
| |
| Ivar B. Jessen 2005-10-27, 7:28 am |
| On Thu, 27 Oct 2005 09:50:18 +0100, "Mark Wood"
< mark@pioneeroiltools
.com.nospam> wrote:
>I was hoping that one of the "SQL in dBase" experts could offer some
>guidance. I am trying to create a filter on two fields, but dBase is
>reporting the following error "Database Engine Error: Operation not
>applicable." I note from the help files on, topic: filter, that only basic
>SQL operators appear to be supported; I thought I would seek confirmation
>that it would never work before i give up and implement this via canGetRow
>or setRange or a calculated field.
>
>// Filter out unwanted records. note left() is the SQL function
>rowPlanning.filter := [version = '00000' and left(partNo,10) <>
>'SHOPTICKET']
>
Don't use a filter. Try this, (untested)
q.sql = [SELECT * from <MyTable> WHERE version = '00000' and
SUBSTRING(UPPER(part
No) FROM 1 FOR 10) <> 'SHOPTICKET']
Ivar B. Jessen
| |
| Mark Wood 2005-10-27, 7:28 am |
| "Ivar B. Jessen" <bergishagen@it.notthis.dk> wrote in message
news:sb81m1tqttceatq
srqbstqr62392p26bsc@
4ax.com...
& #91;snip]
> Don't use a filter. Try this, (untested)
>
> q.sql = [SELECT * from <MyTable> WHERE version = '00000' and
> SUBSTRING(UPPER(part
No) FROM 1 FOR 10) <> 'SHOPTICKET']
>
>
> Ivar B. Jessen
Thanks Ivar, good tip SUBSTRING worked where sql left didn't.
Pity that it doesn't work in filter though, think i'll post to the wishlist
ng
Cheers
Mark
| |
| Ivar B. Jessen 2005-10-27, 7:28 am |
| On Thu, 27 Oct 2005 11:56:39 +0100, "Mark Wood"
< mark@pioneeroiltools
.com.nospam> wrote:
>
>Thanks Ivar, good tip SUBSTRING worked where sql left didn't.
Thanks for the success report.
Ivar B. Jessen
| |
| Rick Gearardo 2005-10-27, 9:23 am |
| No functions work in a filter. They do work in rowset.canGetRow
Rick
> // Filter out unwanted records. note left() is the SQL function
> rowPlanning.filter := [version = '00000' and left(partNo,10) <>
> 'SHOPTICKET']
|
|
|
|
|