Hi all,
I got stuck in converting T-SQL to LINQ as follows
select DISTINCT [ACCOUNT]
from [dbo].[BUDGET] b, [dbo].[OWNER] o
where b.FUND = o.FUND AND b.DEPARTMENT = o.DEPARTMENT AND b.PROGRAM = o.PROGRAM AND o.[USER_ID] = 'test'
AND SUBSTRING(b.ACCOUNT, 1, 1) != '0' AND SUBSTRING(b.ACCOUNT, 1, 1) != '1' AND SUBSTRING(b.ACCOUNT, 1, 1) != '2'
order by ACCOUNT(from a in BUDGET
....
where
b.ACCOUNT.Substring(0,1) != "0" &&
b.ACCOUNT.Substring(0,1) != "1" &&
b.ACCOUNT.Substring(0,1) != "2"
select ...)
).Distinct()
.OrderBy(a=>a)I tried above conversion but It was not working. I really appreciate your help. Thanks in advance.