LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2d string array

Solved!
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
(1,740 Views)

use the "Delete From Array" function.

0 Kudos
Message 2 of 8
(1,733 Views)

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
(1,725 Views)

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

0 Kudos
Message 4 of 8
(1,692 Views)

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.

0 Kudos
Message 5 of 8
(1,662 Views)

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

0 Kudos
Message 6 of 8
(1,653 Views)
Solution
Accepted by topic author 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).

 

Message 7 of 8
(1,644 Views)

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

0 Kudos
Message 8 of 8
(1,610 Views)