none
SQL Query To Linq RRS feed

  • Question

  • Please Convert this sql query to Linq

    ******************************

     

     

    SELECT DISTINCT deoChild.ChildID,
    deoChild.LastName + ', ' + deoChild.FirstName as [ChildName],
    deoChild.DOB, deoChild.OSISID,
    COALESCE(deoChild.Add1, '') + COALESCE(', ' + deoChild.Add2, '') + COALESCE(', ' + deoChild.City, '') + COALESCE(', ' + deoChild.State, '') + COALESCE(' ' + deoChild.Zip, '') as [ChildAddress],
    doeSer.ServiceID, doeSer.SchoolID,
    doeSer.DistrictNum, doeSer.RegionNum,
    doeSer.SchoolNum, doeSer.SchoolName,
    doeSer.SchoolYear, doeSer.ProgramDesc,
    doeSer.SvcSiteName, doeSer.SvcGroupName,
    doeSer.SvcTypeID, doeSer.SvcName, doeSer.SvcCode,
    doeSer.AgencyBegin, doeSer.AgencyEnd, doeSer.Terminated,
    doeSer.Days, doeSer.Mins, doeSer.Weeks, doeSer.Units, doeSer.GroupSize,
    doeSer.ClinicianID, doeSer.AssignmentBegin, doeSer.AssignmentEnd,
    doeSer.AssignmentTime, doeSer.DateAssigned, doeSer.PayableRate,
    clin.LastName + ', ' + clin.FirstName as [ClinicianName]
    FROM [doeChild] as deoChild, [doeService] as doeSer, Clinician as clin
    WHERE deoChild.ChildID = doeSer.ChildID
    AND doeSer.ClinicianID = clin.ClinicianID
    AND clin.ClinicianID = 7866
    AND DATEDIFF(Day, doeSer.AgencyEnd, getdate()) <= 665
    AND DATEDIFF(Day, doeSer.AssignmentEnd, getdate()) <= 665
    ORDER BY doeSer.SchoolNum, doeSer.SchoolName, deoChild.LastName + ', ' + deoChild.FirstName, deoChild.DOB, deoChild.OSISID


    G.Palanikumar
    Monday, September 5, 2011 11:06 AM

Answers

All replies