Showing results for 
Search instead for 
Did you mean: 

2d string array

Go to solution

How to remove the row of empty string in a 2d array. Any one provide solution


Thanks in advance 

0 Kudos
Message 1 of 8

use the "Delete From Array" function.

0 Kudos
Message 2 of 8

Firstly i read the data from sql database. It contains empty entries in more than one rows of each column.I don't know that which row entry is empty(index can't find) . So i need to filter it. 

0 Kudos
Message 3 of 8

So you index through the array row by row and compare the row to an empty array.

0 Kudos
Message 4 of 8

A 2D array cannot have empty arrays as rows, unless all rows are empty. I assume you are talking about rows exclusively containing empty strings.

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 5 of 8

Yeah you are right, i need to filter the row of 2d array if it has empty string. 

0 Kudos
Message 6 of 8
Accepted by Manik981211

@Manik981211 wrote:

Firstly i read the data from sql database. It contains empty entries

Why talking about empty strings if you mean NULL entries from a database?

It's now more a question of which database you are using and/or which toolkit/interface you are using in labview. I prevent these NULL values by defining defaults in the column definition of the create table statements.

Lot of toolkits return variants, so you can use the standard compare function of labview to find the NULL. Pleate note that the data of a NULL variant is different from an empty variant. You can see the difference when using either "flatten to string" or "variant to flattened string" functions.

If you return strings from the database (which is sometimes faster than using variants), then one option could be a function on the database server which replaces the NULL with anything else - something like '~NULL~' (a string that did not occur in your database fields).


0 Kudos
Message 7 of 8

Thank you so much all of you. I got the solution. 

0 Kudos
Message 8 of 8