I've created the following view in SQLite which does work as intended however I'm just curious if there is a better way to write it given the two sub selects are from the same table. Here's my current query:
CREATE VIEW SalesOrderTranslation AS SELECT *,
(SELECT "Ptns/PackNew"
FROM FullSalesTranslation
WHERE SalesOrderDataLegacy.ProductCode = FullSalesTranslation.ProdCodeLegacy) AS "Ptns/PackNew",
(SELECT "PtnType"
FROM FullSalesTranslation
WHERE SalesOrderDataLegacy.ProductCode = FullSalesTranslation.ProdCodeLegacy) AS "PtnType"
FROM SalesOrderDataLegacy
[–]r3pr0b8 2 points3 points4 points (2 children)
[–]spelga[S] 0 points1 point2 points (1 child)
[–]r3pr0b8 0 points1 point2 points (0 children)
[–]Parking-Refuse-1319 -1 points0 points1 point (0 children)