Open
Description
Jesus Otero created an issue — 20th December 2010, 14:34:16:
Like Restrictions over char columns for SQL 2005 (other versions probably the same) the query returns no results. I opened a SQL Profile and see the query generated:
SELECT count(*) as y0_ FROM RM00101 this_ WHERE this_.CUSTNAME like @p1; ',N'@p0 int,@p1 char(8000)',@p0=20,@p1='A% <...>'Clearly the issue is due SQL fetch the fixed length column with spaces.
Changing the query above to the one below will fix the issue:
SELECT count(*) as y0_ FROM RM00101 this_ WHERE this_.CUSTNAME like @p1; ',N'@p0 int,@p1 varchar(8000)',@p0=20,@p1='A%'
Fabio Maulo added a comment — 21st December 2010, 4:41:39:
NH create queries depending on mappings/parameterSetting-on-query
We don't know neither you mappings nor the code to run the query.