Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

(1 Rating)
facebook Twitter
Email
Print Bookmark Alert me when this article is updated

Feedback

HOW TO: Execute a stored procedure only once when running a PowerCenter session
Solution
This is usually a desired behavior if the stored procedure returns only one value and it is desired to run it only once instead of for every row in the source.
  1. Create a disconnected Stored Procedure Transformation that calls the stored procedure.

  2. In an Expression Transformation, create the following variable ports:

    Port Name Port Type Expression
    CALL_FIELD VAR IIF(FIRST_ROW=0,:SP.SP_NAME(x))
    UPDATE_FIELD VAR IIF(FIRST_ROW=0,1)
    FIRST_ROW VAR 1

NOTE:

The UPDATE_FIELD port must be numeric type since the default value of a variable number field is always zero this condition will allow you to call the procedure only once.

More Information
Reference
Applies To
Product: PowerCenter
Problem Type:
User Type: Administrator
Project Phase:
Product Version: PowerCenter 8.1.1; PowerCenter 8.5; PowerCenter 8.5.1; PowerCenter 8.6; PowerCenter 8.6.1; PowerCenter 9.0
Database:
Operating System:
Other Software:
Attachments
Last Modified Date:3/10/2010 11:52 AMID:11293
People who viewed this also viewed

Feedback

Did this KB document help you?



What can we do to improve this information (2000 or fewer characters)