Case sensitive SQL queries checks (#62752)
This commit is contained in:
@@ -97,7 +97,7 @@ def setup_platform(
|
||||
value_template.hass = hass
|
||||
|
||||
# MSSQL uses TOP and not LIMIT
|
||||
if not ("LIMIT" in query_str or "SELECT TOP" in query_str):
|
||||
if not ("LIMIT" in query_str.upper() or "SELECT TOP" in query_str.upper()):
|
||||
query_str = (
|
||||
query_str.replace("SELECT", "SELECT TOP 1")
|
||||
if "mssql" in db_url
|
||||
|
||||
Reference in New Issue
Block a user