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)
 searching data

Author  Topic 

papershop
Starting Member

27 Posts

Posted - 2011-09-06 : 22:59:06
dear friend

i have 2 data ex: sacrosa (imported) and sacrosa (exported)

i want to search data sales of that sacrosa

i use this this sintax

select * from product sales where name = 'sacrosa (imported)'..
and the result is empty

if i use
select * from product sales where name like '%sacrosa (imported)%'..
the result is empty

so what should i do?


@papershop

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-06 : 23:05:53
that clearly suggests name value stored in table is not sacrosa (imported)
check this

select name from [product sales]

and see what it returns


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-09-06 : 23:10:42
also, does the ".." indicate that you have other criteria? Copy and paste the entire, actual statement you are trying to run.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -