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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 select query varchar condition not working
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Aged Yak Warrior

567 Posts

Posted - 02/27/2014 :  18:18:59  Show Profile  Reply with Quote
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.

In (Som, Ni, Yak)

17689 Posts

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

Time is always against us

Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 03/01/2014 :  11:45:40  Show Profile  Reply with Quote
or you collation may be case sensitive

SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000