Last active
May 1, 2020 14:52
-
-
Save Konctantin/d071a0504c1d5af7a0bc99231d152867 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use kcmod | |
go | |
select ISTK.Nom_Vag, | |
case | |
when ISTK.PoluchOKPO>0 | |
then coalesce( | |
(select top 1 '' from dbo.nsDoroga) | |
, 'ОКПО грузополучателя - '+cast(ISTK.PoluchOKPO as varchar(123)) | |
, '' | |
) | |
end as GruzPol | |
from dbo.nvVagPrivatAT | |
join dbo.VagonISTK ISTK on ISTK.Nom_Vag = nvVagPrivatAT.Nom_Vag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment