A Microsoft platform for building enterprise-level data integration and data transformations solutions.
Please refer to the tsql method:
CREATE TABLE #test(Customer_Currency char(15),Local_Currency char(15),
Effective_Date date,Exchange_Rate decimal(4,2))
INSERT INTO #test VALUES('AUD','INR','2011-03-29',45.85),
('AUD','INR','2011-03-28',45.91),
('AUD','INR','2011-03-26',45.50),
('AUD','INR','2011-03-25',45.39)
SELECT * FROM #test
SELECT Local_Currency as Customer_Currency,Customer_Currency as Local_Currency,
Effective_Date,CAST(1/Exchange_Rate AS DECIMAL(4,3))
FROM #test
UNION ALL
SELECT * FROM #test
Output:
If you have any question, please feel free to let me know.
Regards
Echo
If the answer is helpful, please click "Accept Answer" and upvote it.