06-25-2019 12:51 AM
Hello.I am currently trying to make a VI which fetches the latest data inserted in table for example I want to get the data from column 3 with the latest inserted ID,for example 27546.In the next iteration of the VI I want to get data from the same column, but the ID is not 27547.I tried using the Execute SQL query but I need the data which was fetched to be considered a double or a string.
This is the current SQL query which I am using "SELECT tensiune FROM scada_c2.tensiuni_intrare where id = (select max(id) from scada_c2.tensiuni_intrare)". In my SQL it retrieves the data that I need but I don't know how to use only the element which is fetched.
06-25-2019 04:23 AM
@Lopimank wrote:
In my SQL it retrieves the data that I need but I don't know how to use only the element which is fetched.
You've lost me there.
Post the (part of the) code (inc. sensible input values and results), and mark the problematic part...
06-25-2019 07:24 AM
add "top 1" to only get 1 row and add "sort by id desc" in the end to get the highest ID.
/Y
06-25-2019 11:28 PM
I've been able to modify the DB Execute Statement + Fetch data with the help of one of my friends.
Here's the example he sent me.This is what I needed to do cause I need to append the strings to one other,maybe I didn't explain it well enough when I posted the problem and I am sorry.