Click here to Skip to main content
11,718,289 members (83,659 online)
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 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
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 11

how do i convert this to linq

SELECT * FROM [container_Detailstbl] WHERE ([con_dateStriped] IS NULL)
  Permalink  
Comments
CHill60 at 13-Oct-14 13:01pm
   
There is no point posting a question of your own as a solution to an old post. Use the "ask a question" link
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 12

Select * From produto Where produto.idproduto not in (select id_produto from prod_pedido where id_pedido = 2)
  Permalink  
Comments
Dave Kreskowiak at 25-Aug-15 23:04pm
   
Why are you replying to a 3 year old question that already has 11 answers? You're not adding anything to the discussion at all.

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

  Print Answers RSS
0 OriginalGriff 215
1 F-ES Sitecore 210
2 Maciej Los 140
3 Jochen Arndt 120
4 Andy Lanng 115
0 OriginalGriff 535
1 Maciej Los 529
2 Richard MacCutchan 440
3 CHill60 415
4 F-ES Sitecore 415


Advertise | Privacy | Mobile
Web02 | 2.8.150901.1 | Last Updated 25 Aug 2015
Copyright © CodeProject, 1999-2015
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