The following general statements are "AFAIK", your mileage will likely vary 
between DB platforms, and I'm sure a DBA or two in the crowd could pipe in and 
correct/clarify where I'm wrong but as far as I remember from DB class:

*If* your column is defined in the DB schema as a date/time data type, using 
date comparison functions on date fields will be more efficient in just about 
any database. Really, I think most anything is more efficient than 'LIKE' which 
usually results in a table scan if I'm not mistaken (full text indexing and 
such aside). Also if the column is defined as a datetime data type then using 
'LIKE' against it also results in the DB having to first internally convert 
each and every row value to a string in order to do the string comparison, 
reducing efficiency even more. Please chime in and correct me if I'm wrong or 
misguided on that.

So, if I'm right on all that, using between in a SQL query against a date field 
should always perform better than like. Thoughts, comments?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Chiverton
Sent: Thursday, November 16, 2006 11:37 AM
To: [email protected]
Subject: Re: [Reactor for CF] Problem with isLike and DateTime fields (mysql5)

On Wednesday 15 November 2006 20:04, Derek P. wrote:
> Or something of that nature. I used the where.isLike() statement and loaded
> the value 2006-11 (because is like will wrap %'s around them) and I get
> this error:

Wouldn't .isBetwen() be better ?

-- 
Tom Chiverton
Helping to globally expedite B2B developments

****************************************************

This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.6/535 - Release Date: 11/15/2006 3:47 
PM
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.6/535 - Release Date: 11/15/2006 3:47 
PM
 


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to