Hi,

I have a sql task not related to VBA but I have trouble to solve it.

SELECT Tab1.VERS_ID, Tab2.PRM, Tab1.Partner_ID 
FROM TABEL.Tab1
LEFT JOIN TABEL.Tab2
ON (Tab1.PARTNER_ID = Tab2.PARTNER_ID
AND Tab1.VERS_ID = Tab2.VERS_ID)

Here I want to COUNT PRM WHERE VERS.ID =23 <> PRM WHERE VERSION.ID=24

How to implement this?