SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

cplusplus
Aged Yak Warrior

532 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.

khtan
In (Som, Ni, Yak)

Singapore
17437 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


KH
Time is always against us

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

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

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.05 seconds. Powered By: Snitz Forums 2000