Combine Like and In Operator in sql-2005
-
i want to combine like and in operator in sql query... any one help me.................
modified on Monday, August 4, 2008 7:01 AM
-
i want to combine like and in operator in sql query... any one help me.................
modified on Monday, August 4, 2008 7:01 AM
-
Whats difficult? Show us your code and someone will point out your error.
Bob Ashfield Consultants Ltd
suppose u have a table with employee details.. there is a column address. which consist city name too. now i want to search employee detail which live in city1 or city2 or city3 now here also a problem ' how many cities user want to search . this is not decide.. now sir , the ball is in your court... face the problem.. good luck...
-
suppose u have a table with employee details.. there is a column address. which consist city name too. now i want to search employee detail which live in city1 or city2 or city3 now here also a problem ' how many cities user want to search . this is not decide.. now sir , the ball is in your court... face the problem.. good luck...
Firstly, you asked how to combine like and in - thats not what you are asking really. As I said, its easy enough. This is the sort of 'problem' faced daily, and there are several ways of doing it.
Anudeep Jaiswal wrote:
now sir , the ball is in your court... face the problem..
No, the ball is in YOUR court. Post your attempt and I will point out your errors, but I will not write your code for you - its you being paid to do it, not me.
Bob Ashfield Consultants Ltd
-
suppose u have a table with employee details.. there is a column address. which consist city name too. now i want to search employee detail which live in city1 or city2 or city3 now here also a problem ' how many cities user want to search . this is not decide.. now sir , the ball is in your court... face the problem.. good luck...
Anudeep Jaiswal wrote:
now sir , the ball is in your court... face the problem..
A little courtesy might go a long way in getting answers to your questions on CP ;)
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
-
i want to combine like and in operator in sql query... any one help me.................
modified on Monday, August 4, 2008 7:01 AM
Avoid IN; use JOIN.