Closed franzfrank closed 1 year ago
Hi Frank, What type of objects in t-sql use the create or alter syntax? Could you provide a mock example of each type of object and I'll have a look.
Hi Marcus
thanks for your mail. i didn't expect a reply this fast :-) procedures and functions can use the syntax, but not tables:
procedures:
CREATE [ OR ALTER ] { PROC | PROCEDURE }
[schema_name.] procedure_name [ ; number ]
[ { @parameter_name [ type_schema_name. ] data_type }
[ VARYING ] [ NULL ] [ = default ] [ OUT | OUTPUT | [READONLY]
] [ ,...n ]
[ WITH
Hey Maintainer i like your project very much and it's already helping me a lot. i am working with t-sql and all my .sql files start with / ... / ALTER
or
/ ... / CREATE OR ALTER
Unfortunately, your project only works for me when i am using the CREATE statement. Is there a chance that you can modify the regex which parses the object type and name? I tried to build one, but failed or at least messed up the matching groups... i think it should be something like this to find at least the ALTER version: ((?<=create)|(?<=alter))\s+(\w+)\s(if not exists)\s
Regards, Frank