Answer the question
In order to leave comments, you need to log in
Postgres select into multiple values?
Is it possible to write multiple variables in a query in plpgsql?
SELECT "ID_TagData", value
INTO avg_id, val
FROM "SC_Tag"."T_TagData"
WHERE "F_TagName_ID" = 192
AND "F_Date">(now()- interval '12:00:00')
ORDER BY "F_Date" DESC LIMIT 1;
Answer the question
In order to leave comments, you need to log in
It is possible, but in plpgsql INTO is written to variables at the end of the query.
SELECT "ID_TagData", value
FROM "SC_Tag"."T_TagData"
WHERE "F_TagName_ID" = 192
AND "F_Date">(now()- interval '12:00:00')
ORDER BY "F_Date" DESC LIMIT 1
INTO avg_id, val;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question