13,142,065 members (51,586 online)
Rate this:
See more:
Hai good evening to all please help me how to convert "order by Displayby asc,newid()" this sql query to linq.

By
Meganathan M
Posted 6-Jun-12 0:57am

Rate this:

Rate this:

## Solution 3

http://www.sqltolinq.com/[^]

You can download software to Convert Sql to linq or vise versa.

Thanks
Rate this:

## Solution 7

```select Id,ScheduleDate,TimeSlot,DecommissionedDate from lnkRegScheduleDate
where ID = (Select Max(Id) from lnkRegScheduleDate where  RegId = @RegId)```
Rate this:

## 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()
v2
Rate this:

## Solution 13

select max(codigo) from Provisiones
where IdPeriodo = 13 and IdCentroCosto in (
select IdCentroCosto from CentroCostos where IdCompania = 1)
Rate this:

## Solution 8

```SELECT     Engineering.IncomingDetail.DocumentId, MAX(Engineering.IncomingHeader.DccReceivedDate) AS maxDccReceivedDate
Engineering.[Document] ON Engineering.IncomingDetail.DocumentId = Engineering.[Document].ID
WHERE     (Engineering.[Document].IsOmit = 0)
GROUP BY Engineering.IncomingDetail.DocumentId```
Rate this:

## 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();
Rate this:

## 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```
Rate this:

## Solution 10

select top 10 * from customerReviews where reviewid not in (select top 2 reviewid from customerReviews);
Rate this:

## Solution 11

how do i convert this to linq

SELECT * FROM [container_Detailstbl] WHERE ([con_dateStriped] IS NULL)
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:

## Solution 12

Select * From produto Where produto.idproduto not in (select id_produto from prod_pedido where id_pedido = 2)
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.

Top Experts
Last 24hrsThis month
 OriginalGriff 230 Jochen Arndt 165 ppolymorphe 90 Karthik Bangalore 60 SerenityNowDev 60
 OriginalGriff 5,132 Graeme_Grant 5,028 ppolymorphe 1,834 Jochen Arndt 1,724 CPallini 1,500