How to create stored procedure with Null input parameter in "Parallel Datawarehouse?"

3.3k Views Asked by At

I am creating a stored procedure to find tables available in a database in Microsoft Parallel Datawarehouse using SSMS 14 with two inputs parameters, name of table and schema.

I tried this syntax for the SQL statement:

ALTER PROCEDURE MY_SCHEMA.FIND 
    (@TABLE VARCHAR(50) = NULL,
     @Schema VARCHAR(50) = null)
AS
BEGIN
    SELECT * 
    FROM INFORMATION_SCHEMA.COLUMNS 
    WHERE TABLE_NAME LIKE '%' + @TABLE + '%' 
      AND TABLE_SCHEMA LIKE '%' + @Schema + '%'
END

But I got this error:

CREATE or ALTER PROCEDURE statement uses syntax or features that are not supported in SQL Server PDW.

Please suggest the correct syntax to use

1

There are 1 best solutions below

0
Roopkumar Akubathini On

This feature is not available in Azure Synapse Analytics. You can give a feedback on this to Azure feedback forum. Azure feedback - SP to accept null params