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 |
|
vikramacharya
Starting Member
3 Posts |
Posted - 2011-12-14 : 00:26:48
|
| Hi Currently i am working on sql server 2005i have a table with 10 column like "company" ,"status" ,"company1", "Status1" and so on .. i want to select the "respected" company with status "selected" by searching in all the columns of company and status.. can i do it in efficient manner without much load on querysomething like select *from Tablewhere 'selected' in (HRStatus,HRStatus2,HRStatus3,HRStatus4,HRStatus1) and 'IBM' in (SentTo,SentTo2,SentTo3,SentTo4,SentTo1)thanks in advance |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
sunnyleoneo
Starting Member
19 Posts |
Posted - 2011-12-14 : 01:59:59
|
| please post your table structure also. This will help us to identify whether there is some problem with table structure or not. and we can suggest you proper solution. |
 |
|
|
vikramacharya
Starting Member
3 Posts |
Posted - 2011-12-14 : 02:09:17
|
| Srno as primary KeyCid (for identification of employee)Name,Date,HRStatus,HRStatus1,HRStatus2,HRStatus3,HRStatus4,SentTo,SentTo1,SentTo2,SentTo3,SentTo4,Remark,Remark1,SentTo's are company names and HRStatus's are the status of the employeesi want to retreive the records with matching company's name with the corresponding HRStatusi want to show this in single row |
 |
|
|
|
|
|
|
|