fix: add missing conditions for mssql parameters queries

This commit is contained in:
Nybkox
2024-11-28 10:58:37 +01:00
parent fcd6f6c8fc
commit a89d2e1365
2 changed files with 9 additions and 1 deletions

View File

@@ -14,13 +14,17 @@ SELECT
p.precision AS precision,
p.scale AS scale,
p.is_output AS isOutputParameter,
p.parameter_id AS parameterIndex
p.parameter_id AS parameterIndex,
s.name as schemaName
FROM
sys.objects o
JOIN
sys.parameters p ON o.object_id = p.object_id
INNER JOIN
sys.schemas s ON s.schema_id=o.schema_id
WHERE
o.type IN ('FN', 'IF', 'TF')
and o.object_id =OBJECT_ID_CONDITION and s.name =SCHEMA_NAME_CONDITION
ORDER BY
p.object_id,
p.parameter_id;

View File

@@ -10,12 +10,16 @@ SELECT
p.scale AS scale,
p.is_output AS isOutputParameter,
p.parameter_id AS parameterIndex
s.name as schemaName
FROM
sys.objects o
JOIN
sys.parameters p ON o.object_id = p.object_id
INNER JOIN
sys.schemas s ON s.schema_id=o.schema_id
WHERE
o.type = 'P'
and o.object_id =OBJECT_ID_CONDITION and s.name =SCHEMA_NAME_CONDITION
ORDER BY
o.object_id,
p.parameter_id;