Quantcast
Channel: Questions in topic: "calculated column"
Viewing all articles
Browse latest Browse all 11

Is it possible to compute a value in a view (Part_Final) and also use that calculated value to pull in the part description, in the same view statement?

$
0
0

This is what I'm attempting to do...

CREATE OR ALTER VIEW Parts_View

AS SELECT [Part]

, [Part_Corrected]

, CASE WHEN Part_Corrected IS NOT NULL

THEN Part_Corrected

ELSE Part

END AS Part_Final

, (SELECT Part_Desc FROM Part_Table

WHERE Part_Final = Part_Record) AS Part_Final_Desc

FROM Orders_Table


Viewing all articles
Browse latest Browse all 11

Trending Articles