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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 select top most record which is in inner join of t

Author  Topic 

blast
Starting Member

9 Posts

Posted - 2006-12-18 : 15:41:30
Hi

thanks dude for helping me in my previous issues...please help me
my problem is

Select 1.Ax,1.Ay,2.Bz, 2.Bsym
From maintable
Inner join A 1 on maintable.id = 1.id
Inner join B 2 on maintable.mid = 2.sid
Where
2.Bsym =’Urgency’

1.Ax 1.Ay 2.BZ 2.Bsym
12 san 1 Urgency
12 ran 1 Urgency
12 san 2 Urgency
12 ran 2 Urgency
------------
13 san 3 Urgency
13 ran 3 Urgency
13 kan 3 Urgency
13 san 5 Urgency
13 ran 5 Urgency
13 kan 5 Urgency

--there are 2 records here from main table A and joining table B im trying to join all the issues of same problem from A table along with the urgency they belong to from table B
….but the table B has been allowed to be changed by the user (so the urgency has been changed for the same problem from 1 o 2)
Now wht happens is from the above query it pulls two times of the same problem 12 of urgency 1 and then again repeats the issue with urgency 2

Please help me in this issue
   

- Advertisement -