hi sir
i want to store my procedure in a folder, procedure should be in text formate and the name of text file will be same as procedure name.
for convert procedure to text file with name i am using below code
SELECT O.*,SchemaName=schema_name(o.schema_id),
ObjectName=object_Name(m.object_ID),
ObjectDefinition=m.definition
FROM
sys.SQL_Modules m
INNER JOIN sys.objects o ON m.object_id=o.object_id
my issue is how can store this text file in a folder