Hello,
Please, I need your help to translate a SQL request into a Linq request.
I get a little XML file generated by MSN.
I load this XML file into a DataSet.
I need some data whitch are in differents tables (Message, From, User, To,
and Text).
In SQL, this would give that :
Select M.DateTime, FU.FriendlyName, TU.FriendlyName, Te.Text_Text
From Message M, From F, User FU, To T, User TU, Text Te
Where M.MessageID = F.MessageID And F.FromID = FU.FromID
And M.MessageID = T.MessageID And T.ToID = TU.ToID
And M.MessageID = Te.MessageID
Order By M.DateTime
Well, I already have the beginning before the Linq request.
Me.DataSet_Temp.ReadXml(my_filename)
Dim m As EnumerableRowCollection =
Me.DataSet_Temp.Tables("Message").AsEnumerable()
Dim f As EnumerableRowCollection =
Me.DataSet_Temp.Tables("From").AsEnumerable()
Dim t As EnumerableRowCollection =
Me.DataSet_Temp.Tables("To").AsEnumerable()
Dim fu As EnumerableRowCollection =
Me.DataSet_Temp.Tables("User").AsEnumerable()
Dim tu As EnumerableRowCollection =
Me.DataSet_Temp.Tables("User").AsEnumerable()
Dim te As EnumerableRowCollection =
Me.DataSet_Temp.Tables("Text").AsEnumerable()
But I can't find the correct syntax for the Linq query...
Thank you in advance for your help.
Best regards,
St�phane
PS:
I don't want to use the inner join, but I use only the primary key = the
secondary key.
PS 2:
I don't want to use the log table whitch is also in the XML file.
PS 3:
I really prefer keep the Order By even if it seems not usefull.
PS 4:
I'm french, so excuse me for my english.
|
|
0
|
|
|
|
Reply
|
St
|
12/8/2009 9:22:14 AM |
|