Bob Haroche wrote:
>
> Even though the value of "directory" stored in the DB is
> "MyDirectory", the query works with the variable passed as
> "mydirectory". No problem, but I'm wondering if this is going to break
> if I try it some day on another DB like MS SQL.

I would probably insert the data in upper case, then compare using the
CF UCASE() function..

ie, WHERE DIRECTORY='#UCASE(CurrentDirectory)#'

Just make sure that you don't need the case of the directory name in
other situations.. ie when creating product links.  If you do, then
you'd also have to store the direct name in actual case as well as upper
case.

Alternatively, if you're going to a case-sensitve database, you CAN have
functional indexes in some, like oracle...

WHERE upper(DIRECTORY) = '#UCASE(DIRECTORY)#'

That will actually use an index in oracle if you've specified an index
including the upper() function.  I recently learned how to do that but
have since forgotten and am too lazy to look at my code where I'm doing
it :)

  - Rick
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to