On Fri, 22 Feb 2008 20:02:19 -0500
Drew Jensen <[EMAIL PROTECTED]> dijo:

> Drew Jensen wrote:
> > Never tried this with SQLite ( and never say anyting works I have 
> > never tried )- but in most SQl dialects and with most Base  - you need 
> > to precede the wild card character with an escape character - and you 
> > define the escape character right in the command.
> >
> > So to find all instances where a column contains an * you could use
> >
> > LIKE '*\**' escape '\'
> >
> > Here I have defined the escape character to be \
> >
> FYI - I double checked the use of escape coding is covered in the help 
> file so F1 is your friend here, and they show the use of curly brackets, 
> which IIRC you may need to use for the ODBC connection youa re using.

Thanks for the additional information. I haven't needed that particular
funcitonality, but I have saved your reply. However, I have another
problem that I hope someone can help with.

In my database I have a number of test questions which I have coded for
more than one exam. Using * before and after gets them all merged, but
for one exam I cannot get the sort to work. The records are being
selected at random. This query was copied and pasted from another that
does work, and after copying and pasting was edited to change the
select criteria from LIKE '*LFb???*' to LIKE '*LFc???*'. In other
words, the only change was from "b" to "c" in the search criteria.
Nothing else was changed, including the sort specs. Yet the original
"b" query sorts correctly and the "c" query gives random sort order.

I don't know why the first one works, but I think in order to get the
second one to work I need to figure out how to sort on the results of
the sort criteria. This is not easy to figure out because none of the
fields has any way to sort the records correctly. What I am getting at
is the order of the field on which the select is made. Remember, the
select criteria starts with *, so some records have stuff in front of
the select string and others do not. For example, here is what is in
the field "xxx" on which the select is performed for a few
representative records a, b and c:

a       LFc-016
b       LQ1a-015, LFc-014
c       LQ1b-018, LFc-017

It should be sorting it in order b, a, c (14-16-17). Instead it is
sorting it a, b, c. That is because the sort is being performed on the
entire contents of the field, not on the portion of the field on which
the select is performed.

The select query design shows:

Field           mainbank.*      xxx
Alias
Table   mainbank        mainbank
Sort                                    ascending
Visible x
Function
Criterion                               LIKE '*LFc-???*'

I've poked at this for a couple hours without success. 

There are three exams - LFa, LFb and LFc. First, I created LFa and it
worked (after figuring out how to use wildcards - thanks Barbara). Then
I copied and pasted this twice, once for LFb and again for LFc. I
edited LFb and changed the "a" to "b", and then I edited LFc and
changed "a" to "c". LFa continues to work, LFb works fine also, but LFc
sorts in random order.

Any suggestions welcome.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to