Gcobani Mkontwana

Gcobani Mkontwana

  • 1k
  • 1.4k
  • 156.3k

How to use inner join to get more records in sql server?

Aug 26 2021 12:13 AM

Hi Team

I am using join to query record lists, results do populate on one record(Transaction Code only and need others like DateTime Passed. I cant amend my query to get more where clause on one query and need some help. Meaning is there a way in sql query where clause can be used to get more results? However my DateTime Passed record is not showing and need some help as well.

// sql query // sql query

select
     [Station Description]
     [Transaction Code]
 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]
 where stn.[Station Description] IN ('T0011', 'M250', 'T0011')
 order by [DateTime Passed] desc

 


Answers (4)