Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks
CREATE PROC spm_create_stand_alone(@cases_id varchar(50)) AS SET NOCOUNT ON /* -- TESTING ONLY use dbname Declare @cases_id varchar(50) SELECT @cases_id = '15322 FOO-3' */ Declare @bail_message varchar(100) -- Make sure the case was pushed IF NOT EXISTS (SELECT cases_id FROM CLOG_CASE_LOG WHERE cases_id=@cases_id) begin SELECT @bail_message = 'Case ' + @cases_id + 'has not been extracted.' goto bail end DELETE FROM MY_TABLE INSERT INTO MY_TABLE (CASES_ID) VALUES (@cases_id) -- Run the DTS package that writes to the Access database exec master.dbo.xp_cmdshell 'dtsrun /Sserver /Utheuser /Pthepassword /Nthedtspackage, no_output SELECT '1' as RETURN_VALUE goto ex -- This code processes if the deletion was unsuccessful based on any of the above criteria. bail: begin SELECT @bail_message as RETURN_VALUE goto ex end ex: GO
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.