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.
| Author |
Topic |
|
rinu.urs
Starting Member
4 Posts |
Posted - 2009-11-24 : 09:20:43
|
| hi all The table have lots of duplicate rows except for the last column skills The skills has diffrent values some rows 'Middle East' and the other rows 'Resident Engineer', 'planner' etcWhen the user enters the name and the skills set, he wants to see thouse who has all the skills set Table sampleName Address salary skillssamy d Dubai 1000 managersamy d Dubai 1000 Resident Engineersamy r Abu Dhabi 2000 managersamy r Abu Dhabi 2000 Softwarehere i want to retry records of which has the name "samy"and skills Resident Engineer and managerThere is lots of records with the name samy but i want to retry only the samy with the skills manager and resident EngineerPlease help |
|
|
vedjha
Posting Yak Master
228 Posts |
Posted - 2009-11-24 : 09:36:21
|
| select * from table where name='samy' and (skills='Resident Engineer' or skills='manager')http://kiransoftech.com |
 |
|
|
rinu.urs
Starting Member
4 Posts |
Posted - 2009-11-24 : 09:56:45
|
| hi thanks for the replayusing this query gets me all the "samy" which has either skills='Resident Engineer' or skills='manager'I want only the samy with skills 'Resident Engineer' AND skills='manager'AND cannot be used on one column |
 |
|
|
|
|
|