I have a task to generate some sql using some standard statments and some variable names as table name. For example
CREATE PROCEDURE DBA.tmpBSPOt ( )
BEGIN
IF ( SELECT STRING(Value) FROM @tablename
WHERE Name = 'ImplementBSPOT' ) = '1'
----------------------------------------------------------------------------------------------------------------------
-- Table: @tablename - Insert and Delete triggers for audit log capture.
----------------------------------------------------------------------------------------------------------------------
Something like that. How do I do that. I was thinking to put the whole statment until the parameter(@tablename) in to
SELECT 'THE STATMENT' then I want to take the input parameter, but I am not successful yet. How do you append the text to the same file?
TIA
CREATE PROCEDURE DBA.tmpBSPOt ( )
BEGIN
IF ( SELECT STRING(Value) FROM @tablename
WHERE Name = 'ImplementBSPOT' ) = '1'
----------------------------------------------------------------------------------------------------------------------
-- Table: @tablename - Insert and Delete triggers for audit log capture.
----------------------------------------------------------------------------------------------------------------------
Something like that. How do I do that. I was thinking to put the whole statment until the parameter(@tablename) in to
SELECT 'THE STATMENT' then I want to take the input parameter, but I am not successful yet. How do you append the text to the same file?
TIA