question

kumar23 avatar image
kumar23 asked

How to compare values from datatable

Hi my code is If LineNo = Family Then If FailCount >= 500 Then 'This is for the sum of that line For Each Row As DataRow In tblRawTesterShutdown.Rows With objShutdownReport .ShutdownType = _ShutdownType .TesterID = LineNo .QuadID = "0" .E_Code = Row.Item("E_FIELD").ToString.Trim .F_Code = Row("F_FIELD").ToString.Trim .G_Code = Row("G_FIELD").ToString.Trim .Status = Row("HSA_STATUS").ToString.Trim .Family = Row("FAMILY").ToString.Trim .Count = CInt(Row.Item("TOTAL")) .StartTime = StartTime .Timestamp = NowTime .CACHE_FAMILY = Row.Item("CACHE_FAMILY").ToString.Trim If Percentage = Then <--- At this part it will get percentage value actually, so here it should find the top value and minus the second value. Anywan can help how to do the looping here. sample data is shown below. Else End If End With Next Else MsgBox("No shutdown") End If End If 'end here** This is my code. I need an help actually to get the top percentage from particular row number and minus the second top of percentage. I quite confuse with the logic. So for an example the first percentage is 0.006 should minus with 0.004 since it should ignore 0.001. With the difference then it should minus again with 0.004 to find the difference. Pls help me. Thanks in advance. LINE_NO E_FIELD F_FIELD G_FIELD FAMILY HSA_STATUS FAMILYCountOfLineNo TotalOfLineNo % 23059B 00353 00418 00684 SUMMIT S WER 3 526 0.006 64006M 00353 00418 00684 SUMMIT R WER 2 2838 0.001 23059B 00353 00418 00758 SUMMIT S WER 2 526 0.004
vb
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
This site is focused on SQL Server with a bit of Oracle. You might post this on a VB forum for a better response - http://stackoverflow.com/questions/tagged/vb.net
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.