JOINS based on two possible ids?

  • Then use this

    SELECT      t2.*

    FROM        @table1 AS t1

    INNER JOIN  @table2 AS t2 ON t2.PMI + t2.SMI IN (t1.PMI, t1.SMI)

    It is as simple as it gets.

     


    N 56°04'39.16"
    E 12°55'05.25"

  • I gave this a try and it worked like a charm. Much better performance wise. Thanks Peter and everyone else for the effort!

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply