Re: Wake up, 97 Query in 2000/03
From: Albert D. Kallal (PleaseNOOOsPAMMkallal_at_msn.com)
Date: 10/24/04
- Next message: Chris Mills: "Re: Wake up, 97 Query in 2000/03"
- Previous message: Allen Browne: "Re: Wake up, 97 Query in 2000/03"
- In reply to: Chris Mills: "Re: Wake up, 97 Query in 2000/03"
- Next in thread: Chris Mills: "Re: Wake up, 97 Query in 2000/03"
- Reply: Chris Mills: "Re: Wake up, 97 Query in 2000/03"
- Reply: Jamie Collins: "Re: Wake up, 97 Query in 2000/03"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 23 Oct 2004 23:16:23 -0600
"Chris Mills" <phad_nospam@cleardotnet.nz> wrote in message
news:OJES$FJuEHA.2948@TK2MSFTNGP15.phx.gbl...
> The only difference between A97 queries and giving no results on later
> Access,
> that I know of, is that it's sometimes now necessary to put
> WHERE Trim(<something>) = SOMETHING
> which would previously just have been
> WHERE <something> = SOMETHING
>
> I don't know if this is usual or not, but I got into the habit of doing it
> anyway from A2000 onwards. Since stored text fields are trimmed anyway,
> I'm
> not about to theorise.
Hum, I can't say I every needed to do the trim. And, you should know that
wrapping a field name like:
where trim([CompanyName] = 'My Cool company'
means that indexing can NOT be used! This will slow down your application by
VERY large amount. I would find out why that original query failed. (could
have been just one extra space or something!). Wrapping the field name in a
trim is not the best idea here.
Perhaps you imported some data from another source (like Excel...or perahps
some text file) that did not have the data in fields trimmed in the first
place. However, the solution to that is to run a update query with a trim
command to remove that extra stuff ONCE. This will eliminate the need for
the trim each time, and more important allow ms-access to using indexing.
So, you don't want to use any functions around fields unless you have to....
-- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada pleaseNOOSpamKallal@msn.com http://www.attcanada.net/~kallal.msn
- Next message: Chris Mills: "Re: Wake up, 97 Query in 2000/03"
- Previous message: Allen Browne: "Re: Wake up, 97 Query in 2000/03"
- In reply to: Chris Mills: "Re: Wake up, 97 Query in 2000/03"
- Next in thread: Chris Mills: "Re: Wake up, 97 Query in 2000/03"
- Reply: Chris Mills: "Re: Wake up, 97 Query in 2000/03"
- Reply: Jamie Collins: "Re: Wake up, 97 Query in 2000/03"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|