Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Linq

$
0
0

Actually i have filename with this format "1234-GH" ,"1208-GF" like that i want to sortby by numeric order. This query is given me accurate result but i'm unable convert to in Linq Query.

Please Help

SELECT [file], IIF(ISNUMERIC(SUBSTRING([file],1,(IIF((CHARINDEX('-',[file]) < 1),0, CHARINDEX('-',[file]) - 1))))=0,0,SUBSTRING([file],1,(IIF((CHARINDEX('-',[file]) < 1),0, CHARINDEX('-',[file]) - 1)))) as num
FROM product ORDER BY num desc ;

Thanks


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>