Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 select query varchar condition not working

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2014-02-27 : 18:18:59
I am trying to use the below query, not sure why it is not working. I do have a row with that title.


select * from TABLE_PM where PMTitle ='CONSULTA DIARIA SUPERFINANCIERA 01/01/2009 30/12/2009';


If i do the following i can see the result my PMTitle has exact same string as above but why is it not working. something to do with slashes?
select * from TABLE_PM where projid =396;

Thank you very much for the helpful info.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-02-27 : 19:35:44
you probably have some unprintable characters in the PMTitle. use ascii() to inspect that


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-03-01 : 11:45:40
or you collation may be case sensitive

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -