Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

QueryExpression or Linq for the SQL

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I would like to convert this SQL to QueryExpression or LINQ. Can someone help with this.

SELECT billedchg, cMaster.name as cpt_code, cCode.name, pricing_factor
        FROM cMaster
        JOIN fSchedule on cMaster.feeschedule_id = fSchedule.id
        JOIN CarFSchedule ON CarFSchedule.feeschedule_id = fSchedule.id
        JOIN Car on Car.id = CarFSchedule.carrier_id
        JOIN cCode ON cMaster.cpt_id = cCode.id AND cMaster.name = cCode.name
        WHERE ISNULL(cMaster.deleted,0) <> 1
        AND '?' between cMaster.effective_date AND ISNULL(cMaster.expire_date, '9000-01-01')
        AND Car.id = '?' AND cCode.name in ({$codeString})
        AND cMaster.support <> 'no'
        order by billedchg desc

Thanks in advance,

Pranav

*This post is locked for comments

  • Pawar Pravin  Profile Picture
    Pawar Pravin 5,231 on at
    RE: QueryExpression or Linq for the SQL

    Hi Pranav,

    Please refer below url for reference:

    code.msdn.microsoft.com/Convert-CRM2011-Linq-into-93a163ee

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans