MySQL Forums
Forum List  »  German

Re: Messwert aus String extrahieren
Posted by: Thoralf Brandt
Date: June 08, 2021 09:45AM

Danke für den Hinweis mit JSON_EXTRACT().
Wo muss ich das in die Abfrage einbauen? Ich bekomme es nicht hin. Jetzt sieht die Abfrage so aus:
SELECT DISTINCT concat (value) FROM mqtt
WHERE topic LIKE 'Sens/006/pulse/SENSOR' AND date(ts)=curdate()
ORDER BY ts DESC Limit 1
ich erhalte den aktuellsten JSON:
{"Time":"2021-06-08T16:39:43","AM2301":{"Temperature":29.7,"Humidity":39.0,"DewPoint":14.2},"ESP32":{"Temperature":56.1},"TempUnit":"C"}
Mich interessiert als Ausgabe aber nur der Wert: 29.7
Kannst du mir bitte ein Beispiel posten? Vielen Dank

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Messwert aus String extrahieren
224
June 08, 2021 09:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.