question

TariqKhan1982 avatar image
TariqKhan1982 asked

MS ACCESS query need to convert in Sql Server 2008R2

Following is MS ACCESS query need to convert in Sql Server 2008R2 SELECT STAT_position.ReportDate AS [Position Date] ,First(smf.IssuerName) AS FirstOfIssuerName ,Sum(STAT_position.Units) AS SumOfUnits ,IIf(Sum(STAT_position.Units) = 0, 0, Sum((STAT_position.Units) * (smf.Coupon / 100)) / Sum(STAT_position.Units)) AS Coupon ,Sum(STAT_position.MarketValueGAAP) AS [SumOfPAM MV] ,First(smf.GLGroupName) AS FirstOfGLGroupName First(smf.NAICDesignation) AS FirstOfNAICDesignation FROM STAT_position ,smf WHERE STAT_position.SecurityID = smf.SecurityID GROUP BY STAT_position.ReportDate ,smf.RepDate ,STAT_position.Cusip ,STAT_position.Portfolio ,STAT_position.Basis HAVING ( ( (First(smf.GLGroupName)) <> "Futures (90)" AND (First(smf.GLGroupName)) <> "Options (95)") ) ORDER BY STAT_position.Cusip ,STAT_position.Portfolio;
sqlservermicrosoft-access
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.