Posts

Showing posts from August, 2019

Call stored procedure from Adobe Campaign Classic

Image
One member of our team working on a different project asked me if there is a way to call Stored Procedure from Adobe Campaign Classic workflow. He was looking to get an option to receive an output parameter also. So I thought of trying a POC and here is the outcome. In my local instance I had Sql Server and thus thought about testing few other sql server specific features Step 1: Create a basic stored procedure ALTER PROCEDURE USP_GetRecipient     -- Add the parameters for the stored procedure here     @ageGreaterThan int = 0,     @state Varchar(20) = '',     @totalRows int OUTPUT AS BEGIN     SET NOCOUNT ON;        SELECT @totalRows = Count(1) from NmsRecipient r;     SELECT iRecipientId,sEmail from NmsRecipient r where [dbo].[YearsDiff](GETDATE(),r.tsBirth) > @ageGreaterThan and sStateCode = @state     Select top 10 iOfferId,sName from NmsOffer where iOfferId > 0 END  The Procedure  selects recipients filtered by age and state code. I tried to keep an integer and