Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-server-2005
Hai good evening to all please help me how to convert "order by Displayby asc,newid()" this sql query to linq.
 

 
thanks in advance
By
Meganathan M
Posted 6-Jun-12 0:57am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Try this link:
 
http://www.sqltolinq.com/[^]
 
You can download software to Convert Sql to linq or vise versa.
 
Thanks
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

select Id,ScheduleDate,TimeSlot,DecommissionedDate from lnkRegScheduleDate
where ID = (Select Max(Id) from lnkRegScheduleDate where  RegId = @RegId)
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 8

SELECT     Engineering.IncomingDetail.DocumentId, MAX(Engineering.IncomingHeader.DccReceivedDate) AS maxDccReceivedDate
FROM         Engineering.IncomingHeader INNER JOIN
                      Engineering.IncomingDetail ON Engineering.IncomingHeader.ID = Engineering.IncomingDetail.IncomingHeaderId INNER JOIN
                      Engineering.[Document] ON Engineering.IncomingDetail.DocumentId = Engineering.[Document].ID
WHERE     (Engineering.[Document].IsOmit = 0)
GROUP BY Engineering.IncomingDetail.DocumentId
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

Hi,
You can try this one....
 
var Query = from temp in db.Employee orderby temp.Displayby ascending select temp;
Employee objemp = new Employee();
string newid = objemp.Id.ToString();
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 9

Select BrandDescription, CAPEXLookUp, count (*) frpm CAPEXRecord
            inner join Facility on CAPEXRecord.facilityId= facility.facilityId
            inner join FacilityBrand on facility.facilityBrand=facilityBrand.FacilityBrandId
            inner join CAPEXLookUp on CapexLookUp.LookUpId= CAPEXRecord.lookupId
            group by facilitybrand.branddescription, CAPEXLookUp.Description
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 10

select top 10 * from customerReviews where reviewid not in (select top 2 reviewid from customerReviews);
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

hi,
 
try like these
var x =from p in db.Persons orderby a.FirstName descending select p;
the word displayby is not a sql keyword
and for newid()
have look at this link
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 467
1 CPallini 400
2 Sergey Alexandrovich Kryukov 348
3 BillWoodruff 254
4 George Jonsson 251
0 OriginalGriff 5,370
1 CPallini 4,360
2 Sergey Alexandrovich Kryukov 3,822
3 George Jonsson 3,037
4 Gihan Liyanage 2,435


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 13 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100