Create a trigger/stored procedure to set one column equal to another

Hey guys,
I have two columns in a table, and when column A is updated or inserted, I need the database to automatically update column B (in the same table) to be equal to that. I can't create a trigger AFTER INSERT OR UPDATE, because it's the same table and it gives me the mutating tables error.
Any help is appreciated.

How have you defined your trigger? It sounds like you should just be able to do
BEGIN
  :new.columnB := :new.columnA;
END;I assume if you are getting a mutating table error that your trigger is trying to query the table. I don't see a need to query the table.
Justin

Similar Messages

  • How do you set one column equal to another?

    how do i?
    at cell B2 i would like to enter a number. in column C, i would like to have the same value for c2 through c11 cells. so, c2 through c11 i would like the value .2 in each cell. in column D, i would like the values found when columns B and C are multiplied. i would like the value of B3 to be the value found in D2, b4 to be the value found in D3, b5 to be value found in D4, etc.
    is that possible to do using formula for columns? or something, well short of hand coding each cell.
    thanks,
    g.

    let me try to clear up what i was asking, but no guarantees here.
    i was trying to create a spreadsheet that would allow me to calculate the interest on an initial amount of money. i was a little frustrated when i wrote the post. i didn't understand how to do it using a construct like (D2:D20) = (B2:B20) * (C2:C20), which as far as i can tell is incorrect syntax, grammar, etc., just wrong. really wrong!
    i'm not an accountant, as you can ready tell. i think though this is called simple interest.
    ok, here's what i was looking to do, by way of an example:
    given $1000 and an interest rate/ or rate of growth of 20% annually, calculate the amount of money one would have after 25 years. compounded annually.
    $1000 * 0.20 = 200
    $1200 * 0.20 = 240
    $1440 * 0.20 = 288
    $1728 * 0.20 = 345.60
    $26,623.33 * 0.20 = 5,326.67
    i realized what asked for was not this, well after i had posted and tried my post request by hand. so
    i really understand the confusion.
    i sure there is a built-in function for this, but i don't think i would have recognized it, because i don't know the financial terminology.
    using the copying and pasting method, i built the first two line above and decided it had to be a better way, solving this kind of problem is what spreadsheet programs do... i copied B3 to cell B4, i copied cell C3 to cell C4, and i copied D3 to D4. copied and pasted. to my surprise, of course, because i had not read the manual completely, it copied the function to the cells and used the correct last values. (confusing here, but i hope you follow) after seeing that, i copied B4 and selected B5 - B21 and pasted, B4 to those selected B cells. i copied C4 and selected C5 - C21 and pasted, C4 to those C cells i had selected. that put 0.20 into each. i copied D4 and selected D5 - D21 and pasted to those selected D cells.
    i seems to have worked.
    i do have a question though. let's say instead of using 0.02 in column C i used 1.2. this would give me the amount of money i would have without having to add the initial to the interest made.
    1000 * 1.2 = 1200
    how do i assign the value, 1200, to another cell without using the copy and paste method? or is copying and pasting the way to do these kinds of things.
    thanks everyone,
    g.

  • Error when linking report to stored procedure defined with one input parm

    Error when linking report to stored procedure defined with one input parameter
    The report will work ok, when the parameter is removed from the stpred procedure
    An unhandled win32 exception occurred in crw32.exe[4480]
    Stored Proc (sql server 2005)
    USE [Allegro]
    GO
    /****** Object:  StoredProcedure [dbo].[SP_Test]    Script Date: 07/08/2009 10:42:14 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER procedure [dbo].[SP_Test](@valuationmode VARCHAR(55)) as
    Begin
    select
         valuation,
         valuationtime,
         valuationmode
    from valuation
    where valuationmode = @valuationmode;
    End;

    This is an example of a stored procedure that is trying to be linked to a new report as the only datasource.
    If I remove the parameter I can create a report, however this will return all of the results of thw query to the report, rather than the desired results. If I add the parameter on the Crystal Report, the stored procedure then has to return all of the results to Crystal and then perform the filtering of records. By using a parameter in the stored procedure, you should be able to do all of the filtering as part of the query on the databse server, making this more efficient.

  • Why Dynamic Parameter is not working, when i create report using stored procedure ?

    Post Author: Shashi Kant
    CA Forum: General
    Hi all
    Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
    Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
    is not shown to me when i referesh the report for viewing the results.
    I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
    ============================================================================================
    1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
    Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
    Dynamic Parameters in Action
    My question is that whether dynamic parameter is working with storedprocedure or not.
    When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
    One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
    Please reply soon , it's urgent
    Regards
    shashi kant

    Hi Kishore,
    I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
    expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
    =lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
    As to the second issue, please try to use the following expression:
    =Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
    Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl  file with all the size properties to us by the following E-mail address?  It is benefit for us to do further analysis.
    E-mail: [email protected]
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Can I create a Stored Procedure That access data from tables of another servers?

    I'm developing a procedure and within it I'm trying to access another server and make a select into a table that belongs to this another server. When I compile this procedure I have this error message: " PLS-00904: insufficient privilege to access object BC.CADPAP", where BC.CADPAP is the problematic table.
    How can I use more than one connection into an Oracle Stored Procedure?
    How I can access tables of a server from a Stored Procedure since the moment I'm already connected with another server?
    Can I create a Stored Procedure That access data from tables of another servers?

    You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
    CREATE DATABASE LINK command. Refer Document for further details

  • Creating a SQL Stored procedure to call a CF function

    I need to create a method to migrate data from a DMZ inside a firewall.  To do this I was thinking of making a call from the DMZ web server (using CF) to an internal SQL server database stored procedure.  The stored procedure would then call a CF template on the internal web server to pull data inside the firewall.  Not my first choice on implementation but as a consultant I don’t make the rules I create the code to enforce them... Anyway these are the steps I need to follow.
    1.)    Call the stored procedure and pass an int value with the call.
    2.)    The Stored procedure calls a URL and passes the INT with it. I.E.  http://Mylocalhost/Xferdata/MyXferTemplate.cfm?MyIntValue=”PASSED IN INT VALUE”
    3.)    The MyXferTemplate does the actual data migration for me.
    My question is how do I create a simple stored procedure to do this on SQL Server 2008???  After looking at the CF documentation I don’t think there will be much of a problem making the call to the stored procedure… its just writing the stored procedure…  Any and all help is greatly appreciated!!!
    Have an Ordinary Day...
    Kurtis   ~|:-)

    So far this is what I got... When I "execute' this code in SQ
    L Server management studio it compiles without any errors but when I run it I get the message "http: is not recognized as an internal or extermnal command."
    /**********************************  Code to create the SP **************************/
    USE 
    [KDLTransfer]
    GO
    /****** Object: StoredProcedure [dbo].[Migrate_DMZ_Data] Script Date: 03/07/2011 16:48:50 ******/
    SET 
    ANSI_NULLS ONGO
    SET 
    QUOTED_IDENTIFIER ONGO
    -- =============================================
    -- Author: KDL
    -- Create date: 3/7/2011
    -- Description: Migrate data
    -- =============================================
    ALTER 
    PROCEDURE [dbo].[Migrate_DMZ_Data]  
    -- Add the parameters for the stored procedure here
    @MyIntValue
    int = null
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    -- Insert statements for procedure here
    EXEC xp_cmdshell 'http://localhost/IREC/KDL/KDL.cfm?@MyIntValue, no_output';
    END
    /**************** Code to call the SP ******************/
    execute  Migrate_DMZ_Data @MyIntValue = N'5'

  • Is it possible to create an invoive that keeps a running total in one column and in another column keep total of monies spent from a starting amount of funding?

    Is it possible to create an invoive that keeps a running total in one column and in another column keep total of monies spent from a starting amount of funding?

    Hi Sara,
    Many thanks for your reply.  We just brought Adobe Acrobat XI Pro complete
    with Adobe Forms Central, My manager asked whether I could use the forms
    part to create a summary tracking sheet for all of our contracts.
    Having looked at it I could see how to create a table that in the first
    column deleted costs from a starting fund, and in the last keeps a running
    total of all monies spent.
    I agree, Excel does seem to be much better suited to the task.  I was try
    trying to comply with her request
    Regards,

  • Stored Procedure Parameters - Setting a default value

    Using SQL 2005, 2008, 2012
    This should be easy, but think that I am making it hard. Below is the stored procedure that I want to call. If I want to pass a 'N' to @SearchDBsFlag how can I retain the default values for @DBName and @PreviewTextSize? I do not want to explicitly pass the
    NULL, 100. I want it to pick up the default values that are defined in the stored procedure.
    Create Procedure [dbo].[ifs_util_Find]
    @SearchText varchar(8000)
    , @DBName sysname = Null
    , @PreviewTextSize int = 100
    , @SearchDBsFlag char(1) = 'Y'
    , @SearchJobsFlag char(1) = 'Y'
    , @SearchSSISFlag char(1) = 'Y'

    I did look up "flag coupling" and all I found was posts from you.
    Start with http://en.wikipedia.org/wiki/Coupling_(computer_programming). The terminology varies; what I call "flag coupling" is one version of Content
    coupling. 
    Cohesion:
    This is how well a module does one and only one thing; that it is logically coherent. The modules should have strong cohesion. You ought to name the module in the format "<verb><object>", where the "<object>" is a specific logical unit in
    the data model. There are several types of cohesion. We rank them going from the worst form of cohesion to the best
    1) Coincidental 
    2) Logical
    3) Temporal
    4) Procedural
    5) Communicational
    6) Informational 
    7) Functional 
    Coupling:
    If modules have to be used in a certain order, then they are strongly coupled. If they can be executed independently of each other and put together like Lego blocks, then they are loosely or weakly coupled. There are several kinds of coupling, which are ranked
    from worse to best: 
    1) Content 
    2) Common 
    3) Control 
    4) Stamp 
    5) Data 
    This is covered briefly in a chapter on writing stored procedures in my book on SQL PROGRAMMING STYLE. In the meantime, you can read DeMarco, Yourdon, Constantine, Myers or several other of the pioneers. 
    This is FAR more basic than SQL programming. This is what you are supposed to know before you write any code in any language. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Stored Procedure returning just one row

    Hi! I've a problem with a MSSQL Stored Procedure. This procedure works perfectlly if I execute it directly on MSSQL Query Analyzer. But the problem is in Java, when I call it, the resultset has just one row, and it must have 59, so I don't know what is going on. My procedure is a bit big, but please, help me :)
    This is the procedure code
    CREATE PROCEDURE desc_doctos
    @pt_gaveta varchar(250),
    @pl_idexp varchar(250),
    @pl_idcar numeric,
    @identa int
    AS
    DECLARE @id_carpeta_hija int
    DECLARE @nombre_hija varchar(500)
    DECLARE @fh_creacion datetime
    DECLARE @numero_carpetas int
    DECLARE @numero_documentos int
    DECLARE @cv_aplicacion_des varchar(100)
    DECLARE @id_gabinete_des int
    DECLARE @identa_modificado varchar(10)
    DECLARE @liga varchar(250)
    DECLARE @hora varchar(50)
    DECLARE @fecha varchar(50)
    DECLARE imx_descendencia CURSOR LOCAL FOR
    SELECT IOC.ID_CARPETA_HIJA, IOC.NOMBRE_HIJA,IC.FH_CREACION,
    convert(varchar(2),datepart(dd,IC.FH_CREACION))+'/'+convert(varchar(2),datepart(mm,IC.FH_CREACION))+'/'+convert(varchar(4),datepart(yyyy,IC.FH_CREACION)),
    convert(varchar(2),datepart(hh,IC.FH_CREACION))+':'+convert(varchar(2),datepart(mi,IC.FH_CREACION))+':'+convert(varchar(2),datepart(ss,IC.FH_CREACION)),
    IC.NUMERO_CARPETAS,IC.NUMERO_DOCUMENTOS,
    ICP.CV_APLICACION_DES,ICP.ID_GABINETE_DES
    FROM IMX_ORG_CARPETA IOC, IMX_CARPETA IC, IMX_CARPETAPUENTE ICP
    WHERE
    IOC.TITULO_APLICACION=@pt_gaveta
    AND IOC.ID_GABINETE= @pl_idexp
    AND IOC.TITULO_APLICACION = IC.TITULO_APLICACION
    AND IOC.ID_GABINETE = IC.ID_GABINETE
    AND IOC.ID_CARPETA_HIJA = IC.ID_CARPETA
    AND IOC.TITULO_APLICACION *= ICP.TITULO_APLICACION                
    AND IOC.ID_GABINETE *= ICP.ID_GABINETE
    AND IOC.ID_CARPETA_HIJA *= ICP.ID_CARPETA
    AND ID_CARPETA_PADRE= @pl_idcar;
    OPEN imx_descendencia
         FETCH NEXT FROM imx_descendencia INTO @id_carpeta_hija,@nombre_hija,@fh_creacion,@fecha,@hora,
              @numero_carpetas,@numero_documentos,@cv_aplicacion_des,@id_gabinete_des
         WHILE @@FETCH_STATUS = 0
         BEGIN
              SELECT @identa_modificado = @identa+1          
              IF (@id_gabinete_des IS NOT NULL)
              BEGIN
                   SET @liga = '../jsp/imxvisor.jsp?gaveta='+@cv_aplicacion_des+'&idExp='+convert(varchar(10),@id_gabinete_des)+'&cierre=si'     
                   BEGIN TRAN
                        --INSERT INTO IMX_ARBOL_TEMPORAL VALUES(@nombre_hija,@liga,@identa,0,'_blank','1',1,1)          
                        SELECT @nombre_hija,@liga,@identa,0,'_blank'
                        EXEC lista_doctos @pt_gaveta,@pl_idexp,@id_carpeta_hija,@identa_modificado
                   COMMIT TRAN
              END
              ELSE
              BEGIN
                   SET @liga = '../jsp/datosarbol.jsp?opcion=0&idcarpeta='+convert(varchar(10),@id_carpeta_hija)+'&carpetas='+convert(varchar(10),@numero_carpetas)
                   SET @liga = @liga + '&documentos='+convert(varchar(10),@numero_documentos)+'&hora='+@hora
                   SET @liga = @liga + '&fecha='+@fecha+'&idExp='+@pl_idexp+'&gaveta='+@pt_gaveta
                   BEGIN TRAN
                        --INSERT INTO IMX_ARBOL_TEMPORAL VALUES(@nombre_hija,@liga,@identa,0,'DATOS','1',1,1)
                        SELECT @nombre_hija,@liga,@identa,0,'DATOS'
                        EXEC lista_doctos @pt_gaveta,@pl_idexp,@id_carpeta_hija,@identa_modificado
                   COMMIT TRAN
              END
              EXEC desc_doctos @pt_gaveta,@pl_idexp,@id_carpeta_hija,@identa_modificado
              FETCH NEXT FROM imx_descendencia INTO @id_carpeta_hija,@nombre_hija,@fh_creacion,@fecha,@hora,
                   @numero_carpetas,@numero_documentos,@cv_aplicacion_des,@id_gabinete_des
         END
    CLOSE imx_descendencia
    DEALLOCATE imx_descendencia
    and this is my java code
    import java.sql.*;
    public class pruebasSQL{
         public static void main(String[] args){
              try{
                   Class.forName("com.inet.tds.TdsDriver").newInstance();     
                   Connection connection;
                   connection = DriverManager.getConnection("jdbc:inetdae7:localhost","user","pass");
                   connection.setCatalog( "DataBase");
                   CallableStatement statement = connection.prepareCall("{call desc_doctos ('NVA_EST',1002,0,1)}");
                   ResultSet rs = statement.executeQuery();
                   rs.last();
                   System.out.println(rs.getRow());
                   rs.close();
                   connection.close();
              catch(Exception e){
                   System.out.println(e);
    Hope u can help me =)
    Raul Medina
    [email protected]

    Hi! I managed to resolve this problem. This is what I did, hope somebody finds it usefull
    //connection, declarations, etc...
    PreparedStatement ps = connection.prepareStatement("exec desc_doctos 'NVA_EST',1002,0,1");
                   ResultSet rs = ps.executeQuery();
                   rs.next();
                   System.out.println(rs.getString(1));
                   while(ps.getMoreResults()){
                        rs = ps.getResultSet();
                        rs.next();
    +" "+rs.getString(2)+" "+rs.getString(3)+" "+rs.getString(4)+" "+rs.getString(5));
                        System.out.println(rs.getString(1));
    ------------

  • Unable to create object from stored procedure

    Hi,
    we are trying to use a stored procedure to do data preparation.
    When we add the stored procedure to a universe, the procedure is executed succesfully and a table with one column, called "1" is created. When we try to create an object from this column, Designer does not allow us to do so.
    We already tried to alias the column name in the stored procedure but we still get an unusable column called "1" back.
    BO version used is XI R3.0. The stored procedure is written in Cobol on DB2 mainframe.
    Does somebody know what we do wrong ?

    Problem solved.
    First we aliased the result columns in the stored procedure, that got rid of the "1".
    Then we still could not create an object based on the column in the result set.
    Apparently this issue occurs when the length of the column of the result set is too long.
    We decreased the length and now we can create the object

  • Unable to create object from stored procedure universe

    Dear All Experts,
    I am facing a problem on unable to create object dimensions on a Stored procedure universe. Fyi, I have successfully insert a stored procedure ('SP_Sales') with input parameter (@date) into universe (Universe_1). But I unable create any object based on the the stored procedured ('SP_Sales') due to it show nothing from the Edit Select Statement of 'Object1', empty for Tables nd columns windows.
    Thefore, i unable to drag data in WEBI when i select univese as "Universe_1", it will not sure any object. Please advise.
    I am using XI4.0, MSSQL2008.

    Hi ,
    You wont be able to edit the object definitions.
    u2022 Designer generates one table per selected stored procedure (or many
    tables if multiple result sets) and one object per column returned by a
    stored procedure.
    u2022 The result set structure is determined when you describe the function.
    Please refer chapter 7(Page 451) of below document for more details.
    [Universe Designer Guide|http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_designer_en.pdf]
    Hope this helps.
    Bilahari M

  • This OK? Trigger & Stored Procedure

    Im ready to insert my new stored procedure and triggers into the Oracle 9.2i dbase. The goal is to have specific tables that have been modifed to set off a trigger and to call a stored procedure. The stored procedure will make a quick check to see if a new scheduled job has been created to handle the update -- if not it creates a new job, if so it just exits. The scheduled job is set up to contact the same stored procedure with a different parameter after 5 mins has expired. The new call to the stored procedure by the job will make a web request to start things rolling on the web app's side.
    I could have had the triggers insert new records into a seperate table which an always running scheduled job checks every 5 mins, but the updates to the tables dont occur all that often and so the scheduled job will always run and more often then not do nothing. I have it set up to run the job after 5 mins of the first change to give the dbase updater +5 mins to make total changes and make a single web request.
    Please let me know if the following code will be added fine and run correctlty under Oracle 10g.
    Thanks ...
    CREATE OR REPLACE PROCEDURE Tourism_Cache_Refresh (WhoCalling PLS_INTEGER) AS
    v_job_exists pls_integer;
    v_html varchar2(32767);
    loopcnt pls_integer := 0;
    BEGIN
    IF (WhoCalling = 0) THEN
    SELECT count(*) INTO v_job_exists FROM user_scheduler_jobs WHERE job_name = 'TourismCacheRefresh';
    IF v_job_exists = 0 THEN
    DBMS_SCHEDULER.CREATE_JOB(
    job_name=>'TourismCacheRefresh',
    job_type=>'STORED_PROCEDURE',
    job_action=>'Tourism_Cache_Refresh(1)',
    start_date=>SYSTIMESTAMP + 5/1440,
    enabled=>TRUE);
    END IF;
    ELSE
    utl_http.set_response_error_check(false);
    WHILE v_html <> 'TourismCacheRefreshInitiated=1' AND loopcnt < 10
    LOOP
    v_html := utl_http.request("http://www.TourismOxford.ca/DesktopModules/Tourism/TourismCacheRefresh.aspx");
    loopcnt := loopcnt + 1;
    END LOOP;
    END IF;
    END tourism_cache_refresh;
    CREATE TRIGGER TourismCacheRefresh_Orgs_Base
    AFTER Insert OR Update OR Delete
    ON Orgs_Base
    BEGIN
    Tourism_Cache_Refresh(0);
    END;
    CREATE TRIGGER TourismCacheRefresh_Tourism
    AFTER Insert OR Update OR Delete
    ON Tourism
    BEGIN
    Tourism_Cache_Refresh(0);
    END;
    CREATE TRIGGER TourismCacheRefresh_Events
    AFTER Insert OR Update OR Delete
    ON Events
    BEGIN
    Tourism_Cache_Refresh(0);
    END;
    Message was edited by:
    quantass
    Message was edited by:
    quantass

    Quantass,
    Why don't you download and install an Oracle 10g instance and test it? OTN makes this possible.
    Cheers,
    Colin

  • Create user using stored-procedures

    Would anyone know of a way to create a user and assign role(s) using stored-procedures from a DOS shell? With MS SQL, one could issue the following commands from the DOS shell to connect to the database engine (osql -ULoginID -PPassword) and then "sp_addlogin loginid password". Additionally, can it be used in a VB app?
    Your help is much appreciated.
    tk

    yes, in the code editor.
    Auto-completion suggestions as you type?

  • Stored Procedure Result Sets in Reports 6.0

    Please help.
    I have successfully managed to write a PL/SQL procedure using
    the EXEC_SQL package in the Oracle to retrieve the return set
    from a SYBASE stored procedure (very similar to the example in
    the HELP documentation).
    I would like to incorporate this output into a report using the
    Oracle Reports Server 6.0 but I am not sure how to do this. If
    anyone has any clues as to how this can be accomplished (PL/SQL
    tables, reference cursors, beads or ribbons [only kidding]) then
    I would be most grateful.
    Thank you.
    Andrew.
    null

    Andrew McSherry (guest) wrote:
    : Please help.
    : I have successfully managed to write a PL/SQL procedure using
    : the EXEC_SQL package in the Oracle to retrieve the return set
    : from a SYBASE stored procedure (very similar to the example in
    : the HELP documentation).
    : I would like to incorporate this output into a report using the
    : Oracle Reports Server 6.0 but I am not sure how to do this. If
    : anyone has any clues as to how this can be accomplished (PL/SQL
    : tables, reference cursors, beads or ribbons [only kidding])
    then
    : I would be most grateful.
    : Thank you.
    : Andrew.
    I would like to suggest the following procedures:
    1. Create a Oracle work table for the Result Set and
    Modify your pl/sql to insert the result set into
    Oracle work table.
    2. Place your pl/sql procedure in Oracle Reports
    Triggers (i.e. Before Report or After parameter
    form)
    3. Define the Data Model using the oracle work table in
    Oracle Reports.
    Peter Ng
    null

  • How to create Jobs using stored procedure?

    Hi All,
             I am in somewhat stuck, I am doing migration of DB, i want to move the Jobs  of my server to client server
    i want to create one stored procedure through which ill write script for the creating job but to create job we need to change the database MSDB and "use database" option not allowed in stored procedure is there any way that i can create jobs  by
    using  stored procedure 
    please help for this 
    Regards,
    Niraj Sevalkar

    Dynamic SQL may be the answer:
    http://www.sqlusa.com/bestpractices/dynamicsql/
    Example for executing dynamic SQL in a different database:
    USE AdventureWorks2008;
    GO
    exec AdventureWorks.dbo.sp_executesql N'select db_name() as DBname'
    -- AdventureWorks
    exec sp_executesql N'select db_name() as DBname'
    -- AdventureWorks2008
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

Maybe you are looking for

  • Open Orders data in Sales Overview Cube

    Hi All, I am using Sales Overview cube to store all the Orders(inclucing Open orders), Deliveries and billing data. I am using seperate ODSs(for all the infosources) to store both the header and item level data for some reporting requirements. But I

  • Am I doing this repeat loop wrong?

    I'm writing an AppleScript to transfer layers from OmniGraffle 5 to Adobe Illustrator. It copies the first OmniGraffle canvas perfectly, but when it gets to the second canvas, it copies the last layer of the previous canvas instead. This might be an

  • Sharing address book data

    I have tried to export my address book data so I can import it into a contact management program. But Mimbers cannot open the files, nor can excel. Can address book NOT create a comma delimited or tab delimited file? And if so, why not?

  • Guest users in EP.

    Hello friends, I have EP 7.0 SP13. Whenever I restart J2EE engine, I see guest users gets logged in on each server node.Could you please provide me with details what this guest users? How can I prevent guest users from loggin into all the nodes. Than

  • DPM 2012 with Remote SQL

    hi all, I am trying to install DPM 2012 beta on a hyper-v VM that has 4 GB of RAM and 4 Procs. I am trying not to install SQL on the same VM, and instead use a SQL that we have on the network. it's running windows server 2008 R2 and server server 200