1Have you tried Linqer http://www.sqltolinq.com
2
3An SQL-> LINQ converter..
4
5Or LINQPad http://www.linqpad.net/
1select * from VendorTicket (nolock) where IncidentID in (select IncidentID from Incident (nolock) where ClosedDate is null) and VendorID!=3 order by TicketID
1"Select [Supplier Name] as Supplier_Name,MIN(Invoice_ID) as Invoice_ID, MIN(LogDated) as LogDated," +
2 "IIF(MIN(CAST([Traning Locked] as Nvarchar(1)))=1,'True','False') As[Training_Locked],"+
3 "Sum(IIF([OCR Exception] IS NOT NULL, 1, 0)) as [With_OCR_Exception],"+
4 "Sum(IIF([OCR Exception] IS NULL, 1, 0)) as [Without_OCR_Exception],"+
5 "COUNT([Invoice_ID]) as [Total],"+
6 "CAST((Sum(IIF([OCR Exception] IS not NULL, 1, 0)) * 100.0 / Count([Invoice_ID]))/100.0 as decimal(10, 3)) as [Percent]"+
7 "from[dbo].[qry_AllInvoiceOCRException] where AutomationStatus like '%Completed%' and ([Supplier Name] != '' or[Supplier Name] is not null)"+
8 "Group By[Supplier Name]"
1select category_name,permission_name,trp.add_date from template_role_permissions trp
2inner join template_categories tc on trp.category_id=tc.id
3inner join template_permissions tp on trp.permission_id=tp.id
4where role_id=2
1SELECT MarketingEmailSchedule.id as MarketingID,MarketingEmailSchedule.MarketingGroupSourceId,MarketingEmailSchedule.MarketingGroupId
2,MarketingEmailSchedule.MarketingTemplateId,MarketingEmailSchedule.Subject,MarketingEmailSchedule.SendAsEmailId,MarketingEmailSchedule.ScheduledBy,MarketingEmailSchedule.ScheduledDate,GeneratedEmailHeader.Id as EmailHeaderId
3FROM GeneratedEmailHeader JOIN MarketingEmailSchedule
4ON GeneratedEmailHeader.MarketingEmailScheduleId = MARKETINGEMAILSCHEDULE.ID
5join GeneratedEmail on GeneratedEmail.GeneratedEmailHeaderId = GeneratedEmailHeader.Id
6where GeneratedEmailHeader.EmailGeneratedCount=GeneratedEmailHeader.SuccessfulEmailcount
7select * from MarketingEmailSchedule
8select * from GeneratedEmail
9select * from GeneratedEmailHeader