Click here to Skip to main content
13,142,065 members (51,586 online)
Rate this:
 
Please Sign up or sign in to vote.
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 13

select max(codigo) from Provisiones
where IdPeriodo = 13 and IdCentroCosto in (
select IdCentroCosto from CentroCostos where IdCompania = 1)
  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 11

how do i convert this to linq

SELECT * FROM [container_Detailstbl] WHERE ([con_dateStriped] IS NULL)
  Permalink  
Comments
CHill60 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 27 Jan 2016
Copyright © CodeProject, 1999-2017
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