0
InsertID    OrderID         Line    OrderNo ProductNo   ModelID Name        PlanQuantity    PlanStartDate   PlanStartTime
18          215051544       Lien1   249     7626488955  77279   DFS05510S   68              2016-05-10      16:53:16    
18          215050561       Lien1   246     7618483945  77285   DFS28023X   50              2016-05-10      16:56:47
18          215050459       Lien1   247     7618483945  77285   DFS28023X   60              2016-05-10      17:15:57
18          215048653       Lien1   248     7622583955  77282   DD Sample   53              2016-05-10      17:38:57
18          215051588       Lien1   249     7626488955  77279   DFS05510S   10              2016-05-10      18:09:16
18          215051587       Lien1   250     7626488955  77279   DFS05510S   15              2016-05-10      18:13:07
18          215051138       Lien1   251     7626488955  77279   DFS05510S   20              2016-05-10      18:18:53
18          213798175       Lien1   252     7635383842  96365   LAM8603     341             2016-05-10      18:26:33

Sample Table is here , I am want replacing to the same model and product rows. Only consecutive rows and order no 249-250-251

Need to Example Table Output ;

InsertID    OrderID         Line    OrderNo ProductNo   ModelID Name        PlanQuantity    PlanStartDate   PlanStartTime   Orders                          Quantitys
18          215051544       Lien1   249     7626488955  77279   DFS05510S   68              2016-05-10      16:53:13    
18          215050561       Lien1   246     7618483945  77285   DFS28023X   110             2016-05-10      16:56:47        215050561,215050459             50,60
18          215048653       Lien1   248     7622583955  77282   DD Sample   53              2016-05-10      17:38:57
18          215051588       Lien1   249     7626488955  77279   DFS05510S   45              2016-05-10      18:09:16        215051588,215051587,215051138   10,15,20
18          213798175       Lien1   252     7635383842  96365   LAM8603     341             2016-05-10      18:26:33

How to easy for me ? Linq or SQL server View , sql procedure ?

I want to Vb.net applicaton views to output table ,

Aynone Is Idea for this situation?

Arulkumar
  • 12,966
  • 14
  • 47
  • 68
  • Can you re-phrase your question because it is a little bit confusing. Cheers. – jegtugado May 02 '16 at 09:51
  • Have a look at this question, I Think you'll find that MoreLinq:s DistinctBy is what you want. http://stackoverflow.com/questions/11811110/select-distinct-by-two-properties-in-a-list – JaggenSWE May 02 '16 at 09:54

0 Answers0