LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

database searching and sorting in LabVIEW

I need to do sorting of data, mostly in date/time format and will do search later on, using date/time field most of the time. Havne't found any LabVIEW example for that.

Any idea? Thanks.
0 Kudos
Message 1 of 3
(2,903 Views)
forgot to add something...

I know "SELECT * FROM AA ORDER by Criteria" syntax but the table will be filled with probably hundreds of thousands of rows so i guess sorting required rows on the fly everytime user use quires would be time wasting... I don't know how to sort table permanently ...
0 Kudos
Message 2 of 3
(2,902 Views)
Hi m_min,

Would you like to sort the table of your database or the indicator with the elements of the table? For the first one your Database Managementsystem does the complete query optimization - you only have to set your primary keys and for columns which are often selected you can define indizes to optimize the performance of the query. For the second one you can use arrays where you store your online data. Via a SELECT COUNT(*) FROM AA ORDER.... you can search if the count of rows have changed. If so query the difference of rows via the primary key column (usually a continious integer) and add the result to your array - now you can do a array-sort.

Would this advice do what you want?

HTH

--
Joachim
0 Kudos
Message 3 of 3
(2,899 Views)