Convert SQL query into LINQ query in VB

匆匆过客 提交于 2019-12-25 01:38:22

问题


I would like to know how to convert the SQL query listed below into a LINQ query in VB:

SELECT * FROM
    (SELECT SUM(t.Amt) Tax, g.GenQuoteDetails_Id, g.lastTkdt, g.QuoteDt, g.BaseFareCurrency, g.BaseFareAmt, g.BaseDecPos, g.LowestorNUCFare, g.EquivCurrency, g.EquivAmt, g.EquivDecPos,g.TotCurrency,g.TotAmt,g.TotDecPos,fareinfo_id FROM GenQuoteDetails g
     INNER JOIN TaxData t ON t.TaxDataAry_Id = g.GenQuoteDetails_Id
     GROUP BY  g.GenQuoteDetails_Id, g.lastTkdt, g.QuoteDt, g.BaseFareCurrency, g.BaseFareAmt, g.BaseDecPos, g.LowestorNUCFare, g.EquivCurrency, g.EquivAmt, g.EquivDecPos, g.TotCurrency, g.TotAmt, g.TotDecPos, fareinfo_id) a
INNER JOIN
    (SELECT p.PenFeeAry_Id, r.RsvnRules_Id, p.TkNonRef, fareinfo_id
     FROM PenFee p, RsvnRules R
     WHERE p.PenFeeAry_Id = r.RsvnRules_Id
     GROUP BY p.PenFeeAry_Id, r.RsvnRules_Id, p.TkNonRef,fareinfo_id) b
ON a.fareinfo_id = b.fareinfo_id

来源:https://stackoverflow.com/questions/16580740/convert-sql-query-into-linq-query-in-vb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!