Gcobani Mkontwana

Gcobani Mkontwana

  • 565
  • 1.9k
  • 404.7k

Unambigious column name in sql server?

Aug 30 2021 3:29 PM

Hi Team 

I have a query that wants to get total of each record, but i am now getting error on one record. 'Unambigious column name(Transaction Code). How do i fix this issue on my sql query?

select
 count([Station Description]) total,
 [Transaction Code],
 [DateTime Passed]
 from [Tracking_Server_DB].[dbo].TS_Station as stn
 inner join [Tracking_Server_DB].[dbo].[Checkpoint Movement] as mv
 on stn.[Transaction Code] = mv.[Transaction Code]
 group by [Transaction Code],[DateTime Passed]
 order by [DateTime Passed] desc

 


Answers (1)