10-17-2020 08:47 AM
How to remove the row of empty string in a 2d array. Any one provide solution
Thanks in advance
Solved! Go to Solution.
10-17-2020 09:02 AM
use the "Delete From Array" function.
10-17-2020 09:20 AM
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.
10-17-2020 11:03 AM
So you index through the array row by row and compare the row to an empty array.
10-17-2020 08:54 PM
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.
10-17-2020 10:28 PM
Yeah you are right, i need to filter the row of 2d array if it has empty string.
10-17-2020 11:44 PM
@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).
10-18-2020 02:34 PM
Thank you so much all of you. I got the solution.