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
 General SQL Server Forums
 New to SQL Server Programming
 select row to compair string use logical operator

Author  Topic 

amirs
Constraint Violating Yak Guru

260 Posts

Posted - 2009-04-29 : 01:25:16
hi
i have select a record use to comapir a string use logical operator(=>).
in string their is no space the record is correct but in string their space or numeric value their is not correct string

suppose
in table tab1 is
name address
a abc
b abc 2 plot 5
c xyz 3 plot 7
d abc
e vxcvcv
f gfg fgdfg

select name from tab1 where address =>'abc'the result is correct
but i have select following query
select name from tab1 where address =>'abc 2 plot 5'their is not correct result

thanks in advance

ashishashish
Constraint Violating Yak Guru

408 Posts

Posted - 2009-04-29 : 01:36:51
Why u use this =>
and what your expected result by this query ,,,
select name from tab1 where address =>'abc 2 plot 5'their is not correct result


You can also write this as

select name from urtable where address like '%abc 2 plot 5%'
Or just explain what you want exactly...and why u use this "=>"



iF theRe iS a wAy iN tHen theRe iS a wAy oUt..
Go to Top of Page

amirs
Constraint Violating Yak Guru

260 Posts

Posted - 2009-04-29 : 02:00:20
thanks to replay
select name from tab1 where address >='abc 2 plot 5'
i have select records to compair where condition
as well as select record to after where condition records
it is wrong only when in string numeric value
Go to Top of Page
   

- Advertisement -