I need to use “Not Equal” condition with two datatables. Equal is working fine for me but how to use not equal to. <> operator is not at all working. Kindly help
You can type inside the IF:
“NOT (your condition)”
Hi Axel, Could you please help with my condition, which shows in snap.
You want to compare data in those datatable?
Yup, EQUAL TO is working fine for me but I want to use NOT EQUAL.
hope these steps could help you resolve this
–First we need to conver the datatable to string
–for that use a output datatable activity where pass the first datatable as input and get the output with a variable of type string named outstr1
–and use another output datatabe activity where pass the second datatabe and get the output as outstr2
–now use a if condition like this
the reason why you first condition of equals work is
if datatable variable is with .ToString it will give as system.data.datatable so for both it will be like
system.data.datatable = system.data.datatable
which is equal indeed but not the right way to compare buddy
so we need to convert to a string and then only compare it
hope ths would help you
@khan are you converting your datatables to string before comparing?? You can use != or use Equals Method it will return True or False
Can I use “Output Data Table” for conversion or you have some other idea, please share
yeah you can use OutputDataTable
thats what suggested one and is more feasible as well buddy
how will we print data then ?