Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OWB - GLOBAL VARIABLE

Status
Not open for further replies.

YipYeppp

Programmer
Nov 7, 2002
21
0
0
CA
Hi,

Does somebody knows how to declare and use a global variable in the software "Oracle Warehouse Builder 9i" ?

Thanks..
 
Yip,

I don't know anything about "Oracle Warehouse Builder 9i", but if you want to create a global variable (which persists during the entire life of a session including its most recent value), then you do that by defining a variable in the DECLARE section of a PACKAGE HEADER. Here is a very simplified and minimalist example:
Code:
SQL> create or replace package yip is
  2   ws_date1 date;
  3   WS_NUMBER1 number;
  4  end;
  5  /

Package created.

SQL> exec yip.ws_date1 := sysdate

PL/SQL procedure successfully completed.

SQL> exec yip.ws_number1 := 2

PL/SQL procedure successfully completed.

SQL> exec yip.ws_date1 := yip.ws_date1 + yip.ws_number1

PL/SQL procedure successfully completed.

SQL> set serveroutput on format wrap
SQL> begin
  2      dbms_output.put_line (yip.ws_number1||' days from today is '||yip.ws_date1);
  3  end;
  4  /
2 days from today is 18-MAY-05

PL/SQL procedure successfully completed.

Let us know if this answers your question about global variables.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
Dear Mufasa,

I am used to declare a global variable in pl/sql. The problem is that i have to work with an interface (OWB) that generates PL/SQL code, and i really dont know how to work with global variable with that tool! (I dont know if it is possible..) I found nothing on the subject on internet..
Guess i'll have to talk directly to mr Oracle..
or take one or two tylenol..

thanks for your response, you are always there for us!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top