I've been experimenting and collecting data with the DSC and LAB view from the AB 1400 Micrologix PLC. I'm storing the data to MS SQL server. I need to delete duplicate records and order the records within the table by date and time in the MS SQL server once the data is stored there. Is there any means to do this using LABview commands? Can any MS SQL queries be run from Labview? I do not want to use an additional software like dotnet for this purpose.
Thanks in advance,
Using the "Execute Query" function which you can find under the DB tools palette, you would have to be able to send any query you want your SQL server to have to execute. The Execute command returns a reference to a recordset which you can handle as you want. Using the clause "DISTINCT" into your SELECT command you can have a recordset with a unique values from your table under query, therefore you can analyse that recordset and you can store the result in a different table and then you can delete the origin table. But, be careful in this kind of operations to not loose some data.
I hope it was helpful.
Note: Kudos are grateful.
Thanks, TLE. Shall check to see how effective your suggestion is.