My Oracle Support Banner

How to call Stored Procedure from eScript? (Doc ID 486237.1)

Last updated on AUGUST 02, 2018

Applies to:

Siebel Tools - Version 7.5.2.100 SIA [15252] and later
z*OBSOLETE: Microsoft Windows 2000
Product Release: V7 (Enterprise)
Version: 7.5.2.100 [15252] Fin Svcs
Database: Microsoft SQL Server 2000 SP 2
Application Server OS: Microsoft Windows 2000 Advanced Server SP 2
Database Server OS: Microsoft Windows 2000 Advanced Server SP 2

This document was previously published as Siebel SR 38-934445151.
*** Checked for relevance on 05-DEC-2016 ***

Goal

We would like to call a procedure from eScript.

The content of out stored procedure is following:

CREATE PROCEDURE dbo.GetNewPolisnumber
AS
SET NOCOUNT ON
DECLARE @Pos1 CHAR(1),
SET @Verschil= 10
WHILE @Verschil = 10
BEGIN
insert into IP_Polis_Generator values (1)
select @Ident = REPLACE((STR(@@IDENTITY)),' ','0')
select @Pos1= SUBSTRING( STR(@Ident) , 1, 1),
@Pos2 = SUBSTRING( STR(@Ident) , 2, 1),
@Pos3 = SUBSTRING( STR(@Ident) , 3, 1),
@Pos4 = SUBSTRING( STR(@Ident) , 4, 1),
@Pos5 = SUBSTRING( STR(@Ident) , 5, 1),
@Pos6 = SUBSTRING( STR(@Ident) , 6, 1),
@Pos7 = SUBSTRING( STR(@Ident) , 7, 1),
@Pos8 = SUBSTRING( STR(@Ident) , 8, 1),
@Pos9 = SUBSTRING( STR(@Ident) , 9, 1),
@Pos10 = SUBSTRING( STR(@Ident) , 10, 1)
--
-- The interpolis method of calculating
--
SET @Getal = ( @Pos4 * 9 ) + ( @Pos5 * 10 ) + ( @Pos6 * 5 )+ ( @Pos7 * 8 ) + ( @Pos8 * 4 ) + ( @Pos9 * 2 ) + ( @Pos10 * 1 )
SET @Verschil = @Getal / 11
SET @Verschil = @Getal - ( @Verschil * 11)
DELETE IP_Polis_Generator WHERE ID = @Ident
END
SELECT REPLACE(STR((@Ident * 10) + @Verschil),' ','0')
GO

The procedure above gives us a unique number back. This unique number we would like to store in a Siebel Table. How can we launch the stored procedure and capture the returned value?

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.