New Posts New Posts RSS Feed: Comparing Two Columns in a Table
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Comparing Two Columns in a Table

 Post Reply Post Reply
Author
cuneytgargin View Drop Down
Newbie
Newbie
Avatar

Joined: 05-Feb-2008
Location: Turkey
Posts: 13
Post Options Post Options   Quote cuneytgargin Quote  Post ReplyReply Direct Link To This Post Topic: Comparing Two Columns in a Table
    Posted: 27-Feb-2008 at 4:28am
Hi.
I am trying to create Entityquery for the query below .


Select * From Personel Where StillWorking=1 and LastEntryDate > LastExitDate

As you see, I am trying to compare two columns of the table
and Entityquery I created is as below :


EntityQuery query = new EntityQuery(typeof(Personel), Personel.StillWorkingEntityColumn, EntityQueryOp.EQ, true);
            query.AddClause(Personel.LastEntryDateEntityColumn, EntityQueryOp.GT, Personel.LastExitDateEntityColumn);

and it's wrong..

Beacuse in fact query expression seems to  be like

Select * From Personel Where StillWorking=1 and LastEntryDate > Personel.LastExitDate

check the last query sentence, it sees it like Personel.LastExitDate column...

How can I ?

Cheers

Cuneyt Gargin - Trinoks
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down