Now i have change Port_ID=1 from 1 to 2
Then it makes more sense.
SELECT b.Cat_ID, b.Cat_name, a.Cat_name AS Port_Name
FROM #Concategory a
JOIN #Concategory b ON b.Port_ID = a.Cat_ID
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
i want to join column within table ,below is data
Create table #Concategory (Cat_ID int,Cat_name varchar(50),Port_ID int,Acc_type varchar(50))
insert into #Concategory values (1,'Akhter','','Port')
insert into #Concategory values (2,'Karchi','','Port')
insert into #Concategory values (3,'Pakistan',1,'Location')
insert into #Concategory values (4,'Iran',2,'Location')
![193636-image.png][1]
Now i have change Port_ID=1 from 1 to 2
Then it makes more sense.
SELECT b.Cat_ID, b.Cat_name, a.Cat_name AS Port_Name
FROM #Concategory a
JOIN #Concategory b ON b.Port_ID = a.Cat_ID