Assign: Cannot perform '=' operation on System.Double and System.String

I have assigned variable in Assign Activity.Value is to given as below.But it shows error.Provide solution
FileDt.Select("[Delivered Qty] =’ ’ ").CopyToDataTable

@Priyanka_Sorate, Remove square square brackets “” and it sould work. :slight_smile:

1 Like

FileDt.Select("Delivered Qty =’ ’ ").CopyToDataTable


Hi @Priyanka_Sorate try this dt.Select("[Delivered Qty]=’"+" " +"’ ").CopyToDataTable

@Priyanka_Sorate I think it’s better to use Filter Datatable Activity for this in this way :sweat_smile:

Also If you want to use Linq and Get the Output You can use a Different Linq in this way :
FileDT.AsEnumerable.Where(Function(x)String.IsNullOrEmpty(x(“Delivered Qty”).ToString) Or String.IsNullOrWhiteSpace(x(“Delivered Qty”).ToString)).CopyToDataTable

I think the Original Linq that you have used doesn’t seem to Get Output because the Data that are you comparing are of Incompatible Types (Comparing Double with a String ). If you get the Solution Similar to the Original Linq, Please Post it here. :sweat_smile:

ok thanku but it is not work out i will try next

I used this one but using Isempty data not displaying in same sheet.Thank you

@Priyanka_Sorate What you mean by same Sheet :sweat_smile:

Did we try with this expression
Yourdatatable = FileDt.Asenumerable().Where(Function(a) a.Field(of String)(“yourcolumnname”).ToString.Equals(“ “)).CopyToDatatable()

Cheers @Priyanka_Sorate

1 Like

@Priyanka_Sorate, It seems like data type of “Delivered Qty” column is double. If it’s a nullable column and if you want to retrieve all rows where “Develiered Qty” is null then you can use the following value.

e.g. FileDt.Select("[Delivered Qty] IS NULL")

Hi @Priyanka_Sorate did u try this method??

i tried this one also it shows error i will working on that
Assign: Syntax error: Missing operand after ‘’’ operator.

Hi @Priyanka_Sorate it worked for me.In datatable i got the row with Delivered Qty which was empty… :sweat_smile:

Ok thanku

1 Like

ok hope so slightly_smiling_face: this will be worked for me also :slightly_smiling_face:

Hi @Priyanka_Sorate Yes i got ur error use for each row and convert ur column Delivered Qty to string and then try this dt.Select("[Delivered Qty]=’"+" " +"’ ").CopyToDataTable