Monthly Archives: February 2013

Subquery Inner Join with Date Manipulation

SELECT     SUM(COST_15 * RUNTTL_15) AS EXTFROM         dbo.Transaction_History AS THINNER JOIN (SELECT     PRTNUM_15 AS PART, STKID_15 AS STK, CAST(MAX(CAST(CONVERT(DATE, TNXDTE_15, 120) AS CHAR(10)) + ‘ ‘ + LEFT(TNXTIM_15, 2) + ‘:’ + SUBSTRING(TNXTIM_15,                       3, 2) + ‘:’ + RIGHT(TNXTIM_15, 2)) AS … Continue reading

Posted in Uncategorized | Leave a comment