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