helppppppppppppp..................

Posted by Rimjhim4 under Sql Server on 3/31/2012 | Points: 10 | Views : 852 | Status : [Member] | Replies : 3
can we use left and like at same time in where condition in sql




Responses

Posted by: Hmanjarawala on: 3/31/2012 [Member] Bronze | Points: 25

Up
0
Down
Describe your question briefly.....

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Rimjhim4, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nuwan on: 4/1/2012 [Member] Starter | Points: 25

Up
0
Down
Yes, you can do it using And Operation

Ex:- WHERE (LEFT(columname, 2) = 'Fieldname') AND (columname LIKE 'Fieldname%')


Rathnayake

Rimjhim4, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 4/1/2012 [Member] Silver | Points: 25

Up
0
Down
Hi,
Try this in northwind database.
select * from Products where LEFT(productname,2) like 'An'


Thanks,
Sanjay

Rimjhim4, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response