What I want is to get from the same vista
or consulta
two fields of the same column but with different value, this means that I must recover two different values within a same column, one value is old or obsolete and the other value is the current or new one and they must be in the view to access the obsolete one that was updated with a new one.
Current Code:
select p.numParte,f.alterno from DBEMPDEV.dbo.tMaestroPartes p
inner join DBSIADANA.dbo.tAlterno f on p.idNParte = f.idNParte;
The above code brings me the numero de parte
and my alterno
, only that the alternate is a id
and what I want to come out in that consulta
are my two numbers of parts. What I would like to know is how with the ID that I get from an alternate, I can get the current part number within the same field of my table.
This is how I currently get the record, the alternate that is an id must be replaced by a part number, it should only be substituted in the query not permanently.