seanwelsh77
Posts: 2
|
Posted: 12/18/2007, 4:57 PM |
|
Hi,
I have a CodeCharge search form that does a query which populates a grid.
Our platform is ColdFusion 8 / MSSQL 2005.
What I am curious to understand is the behaviour of the 'contains' dropdown in the Table Parameter dialogue accessed from Visual Query Builder. Looking at the generated code it puts an N before the like string.
E.g. where x like N'%search_string%'
instead of plain
where x like '%search_string%'
The table has 1.6 million records and treating the search string as a Unicode takes 10 s whereas leaving the N out takes < 1s.
The datatype of the column being searched is a varchar(11) of collation SQL_Latin1_General_CP1_CI_AS (the database default).
Does anyone know of a way to kill the N generated by CodeCharge?
Regards,
Sean
|
|
|
seanwelsh77
Posts: 2
|
Posted: 12/18/2007, 9:11 PM |
|
Hi,
I was able to solve my own problem.
In essence I deleted the where clause in Visual Query Builder and followed the instructions in the Code Charge help doc "Dynamically Modify the WHERE Clause"
You add an event to the grid (Before Build Select) and write the like statement without the Unicode alteration.
Thanks,
Sean
|
|
|
|