Stored procedure to insert data

Hi i have a procedure below that will take a bound variable and insert it into the database.
I am trying to test the procedure using this however am getting the error
ORA-06550: line 1, column 21:
PLS-00201: identifier 'Leeds' must be declared
Is the test or the procedure itself incorrect?
Test
variable branch varchar2(20);
exec p_add_branch ("Leeds", :branch);
Procedure
create or replace procedure p_add_branch(v_branch_name IN OUT tbl_branch.branch_name%type)
as
     newbranch tbl_branch.branch_name%type;
BEGIN
newbranch := INITCAP(v_branch_name);
     INSERT
     INTO tbl_branch (branch_name)
     VALUES (newbranch);
end;
Thanks

SQL> create table tbl_branch
  2  (branch_name  varchar2(30));
Table created.
SQL> create or replace
  2  procedure p_add_branch(v_branch_name IN OUT tbl_branch.branch_name%type) as
  3
  4  BEGIN
  5
  6     INSERT INTO tbl_branch (branch_name)
  7     VALUES (INITCAP(v_branch_name));
  8
  9  end;
10  /
Procedure created.
SQL> variable branch varchar2(20);
SQL> exec :branch := 'Leeds'
PL/SQL procedure successfully completed.
SQL> exec p_add_branch (:branch);
PL/SQL procedure successfully completed.
SQL> select * from tbl_branch;
BRANCH_NAME
Leeds

Similar Messages

  • PL/SQL procedure to insert data doesn't work and unable to find reason.

    Sorry that I couldn't find the best place to post this question. It seems that the forum does not deal with this kind of question. I post here for help.
    I have a stored procedure to insert data into one table. SP was compiled without error and executed without error (from log table to get information). But the data was not inserted into
    the target table. I have tried different way to figure out the reason. But I failed to get any idea. Please help me to find possible reasons. The smple SP looks like this:
    CREATE OR REPLACE PROCEDURE my.sp_insert( P_DATE IN VARCHAR2)
    IS
    declare section
    begin
    insert into target_table (column1, column2, column3, column4)
    select record1, record2, record3, record4 from table1, table2, table3, table4
    where clause;
    commit;
    exception section
    UPDATE PROCESS_LOG_TABLE CLAUSE;
    html_email section;
    rollback;
    end my.sp_insert
    I have tested that "select record1, record2, record3, record4 from table1, table2, table3, table4" really fetch the 7,000 records. and if I only run part of SQL from SQLPLUS as
    insert into target_table (column1, column2, column3, column4)
    select record1, record2, record3, record4 from table1, table2, table3, table4
    where clause;
    It will work and insert 7,000 records into target table. Why did it not insert into target_table when execiting as stored procedure? Please help with your input. Thanks.
    Edited by: citicbj on Feb 12, 2013 4:15 PM

    Dear Friend,
    Is the user from which you created database procedure and sqlplus that you tested the code successfully is same?
    Regards
    Ahamed Rafeeque Cherkala

  • Procedure to insert data in multiple rows

    Hi,
    I need a stored procedure which inserts data into multiple rows..
    Ex: I need to have 3 columns in Procedure, where col3 has limit in size let's say 500.
    If user insert about 1500 in col3, i has to insert first 500 in row1 and 501 - 1000 in row 2 and 1001 - 1500 in row 3.
    Can any one help in creating procedure for above scenario.
    Thanks in Advance...
    Sree

    create table #t (id int, id1 int)
    WITH [1-20]
    AS
    SELECT row_number() over (order by number) rn,number
            FROM master..spt_values
             WHERE type = 'P'
             AND number BETWEEN 1 AND 20
     [21-30]
    AS
    SELECT row_number() over (order by number) rn,number
            FROM master..spt_values
             WHERE type = 'P'
             AND number BETWEEN 21 AND 30
    ) INSERT INTO #t 
      SELECT A.number,B.number FROM
         [1-20] A JOIN [21-30] B ON A.rn=B.rn
    SELECT * FROM #t
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How do I run a database procedure that inserts data into a table from withi

    How do I run a database procedure that inserts data into a table from within a Crystal report?
    I'm using CR 2008 with an Oracle 10i database containing a number of database tables, procedures and packages that provide the data for the reports I'm developing for my department.  However, I'd like to know when a particular report is run and by whom.  To do this I have created a database table called Report_Log and an associated procedure called prc_Insert_Entry that inserts a new line in the table each time it's called.  The procedure has 2 imput parameters (Report_Name & Username), the report name is just text and I'd like the username to be the account name of the person logged onto the PC.  How can I call this procedure from within a report when it's run and provide it with the 2 parameters?  I know the procedure works, I just can't figure out how to call it from with a report.
    I'd be grateful for any help.
    Colin

    Hi Colin, 
    Just so I'm clear about what you want: 
    You have a Stored procedure in your report.  When the report runs, you want that same procedure to write to a table called Report_Log. 
    If this is what you want the simple answer is cannot be done.  Crystal's fundamental prupose is to read only, not write.  That being said, there are ways around this. 
    One way is to have a trigger in your database that updates the Report_Log table when the Stored Procedure is executed.  This would be the most efficient.
    The other way would be to have an application run the report and manage the entry. 
    Good luck,
    Brian

  • How to create stored procedure for insert update and delete operations with input output paramters?

    I  have the follwing table is called master table contain the follwing fields,
    So here i need to create  three Stored procedures 
    1.Insert operations(1 o/p paramter,and  14 input paramters)              - uspInsert
    2.Update operations(1 o/p paramter,and  14 input paramters)          - uspUpdate
    3.Delete Operations(1 o/p paramter,and  14 input paramters)          
     - uspdelte
    The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
    Location 
    Client Name
    Owner 
    ConfigItemID
    ConfigItemName
    DeploymentID
    IncidentID
    Package Name
    Scope 
    Stage
    Type 
    Start Date
    End Date
    Accountable 
    Comments
    So can u pls help me out for this ,bcz i knew to stored procedure's creation.

    I  have the follwing table is called master table contain the follwing fields,
    So here i need to create  three Stored procedures 
    1.Insert operations(1 o/p paramter,and  14 input paramters)              - uspInsert
    2.Update operations(1 o/p paramter,and  14 input paramters)          - uspUpdate
    3.Delete Operations(1 o/p paramter,and  14 input paramters)            - uspdelte
    The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
    Location 
    Client Name
    Owner 
    ConfigItemID
    ConfigItemName
    DeploymentID
    IncidentID
    Package Name
    Scope 
    Stage
    Type 
    Start Date
    End Date
    Accountable 
    Comments
    So can u pls help me out for this ,bcz i knew to stored procedure's creation.
    Why you have to pass 14 parameters for DELETE and UPDATE? Do you have any Primary Key?  If you do NOT have primary key in your table then in case you have duplicate information, SQL will update both or delete them together. You need to provide DDL of
    you table. What are the data types of fields?
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

  • Stored Procedures - Basic Insert?

    Trying to do a basic INSERT Store Procedure that isn't
    working.
    Created the SP in the database and went to Dreamweaver.
    -----------------My Stored Procedure-----------------
    CREATE PROCEDURE dbo.spAddShippingAddress (@OneA varchar(50))
    AS
    INSERT INTO aXOne (OneA)
    VALUES (@OneA)
    GO
    -----------------My Stored Procedure-----------------
    aXOne is the Table and OneA is the Column
    So which do I use in Dreamweaver, "Stored Procedure" or
    "INSERT"?
    Also, since this is an insert, I have a form page that
    submits to the
    page with the Command on it.
    Nothing seems to work. Any ideas welcome. Thanks

    Procedure is close. It will work as-is, but get in the habit
    of adding
    certain commands to every procedure; these will prevent
    issues in certain
    situations. Also, do not use "sp" as a prefix - that's
    reserved for system
    procedures and changes the way SQL Server looks up the
    procedure name. The
    "web-friendly" version:
    CREATE PROCEDURE [dbo].[AddShippingAddress]
    @OneA VARCHAR(50)
    AS
    BEGIN
    SET NOCOUNT ON;
    INSERT INTO dbo.aXOne(OneA)
    VALUES (@OneA)
    END
    GO
    As for the rest of it:
    - Use the "stored procedure" option in Dreamweaver. The
    "insert" option is
    what you would use if you were executing the actual insert
    query without the
    procedure as a wrapper (keep the procedure - it's just nicer
    for everyone in
    the end).
    - There's nothing wrong with the form submitting to the page
    with the
    command on it. Make sure you've got the parameters set up
    properly (form
    method="post", then Request.Form; method="get" then
    Request.QueryString) and
    double-check your data types.
    By "doesn't work", please be specific - is there an error, or
    does the page
    execute normally while not inserting the record or inserting
    a blank record,
    or...
    "Lee" <[email protected]> wrote in message
    news:eqvt5u$a0l$[email protected]..
    > Trying to do a basic INSERT Store Procedure that isn't
    working.
    >
    > Created the SP in the database and went to Dreamweaver.
    > -----------------My Stored Procedure-----------------
    > CREATE PROCEDURE dbo.spAddShippingAddress (@OneA
    varchar(50))
    > AS
    > INSERT INTO aXOne (OneA)
    > VALUES (@OneA)
    > GO
    >
    > -----------------My Stored Procedure-----------------
    >
    > aXOne is the Table and OneA is the Column
    >
    > So which do I use in Dreamweaver, "Stored Procedure" or
    "INSERT"?
    >
    > Also, since this is an insert, I have a form page that
    submits to the page
    > with the Command on it.
    >
    > Nothing seems to work. Any ideas welcome. Thanks

  • SSRS - Oracle Stored procedure returns no data but does in SQL Developer Sudio

    HI there,
    Stored procedure returns no data when executed on the report but when i execute the stored procedure in Sql Developer it returns required rows.
    Thanks for your help!

    Hi Simon,
    When i test with simple query, i get the data.
    For your convenience, my stored proc looks lyk :
    PROCEDURE pr_REPORT_data(P_STARTDATE IN DATE, P_ENDDATE IN DATE, data_rows OUT T_CURSOR) AS 
    OPEN completed_Reinstatement FOR
      SELECT 
                 value1,.......value5
      FROM table1
    WHERE
        To_Date(createdDate, 'YYYY/MM/DD') BETWEEN To_Date(P_STARTDATE, 'YYY/MM/DD') AND To_Date(P_ENDDATE, 'YYYY/MM/DD');
    END pr_REPORT_data;          
    T_CURSOR is of type cursor which is declared on the package.
    I'm assuming the problem is with date parameters, however i converted the date before passing to
    WHERE clause. 

  • 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

  • Stored Procedure for displaying data in Crystal Reports

    Hi I am new to Oracle & Crystal Reports,so can any one please give me sample stored procedure to display data in Crystal report from Oracle by passing rwo input values.

    from site:-
    Crystal Reports will only support the return of a single refcursor from Oracle. Even the latest and greatest version 10 doesn't allow you to return more than one recordset at a time. You could add one more step to your procedure that would join up the output of the multiple refcursors into a PL/SQL table and then fetch the result set out through a single refcursor. That way you are using temporary space that will be cleaned up as soon as the connection is terminated and will only be returning a single refcursor

  • Issue using SQL stored procedure to insert/update

    With help I finally managed to execute the stored procedure to insert/ update the sql database with the below stored procedure
    ALTER PROCEDURE [dbo].[uspInsertorUpdate]
    @dp char(32),
    @dv char(32),
    @e_num char(12),
    @mail varchar(50),
    @emerg char(32),
    @opt1 char(16),
    @stat char(20),
    @e_id char(35),
    @e_tit varchar(64),
    @e_date datetime
    AS
    BEGIN
    SET NOCOUNT ON;
    IF EXISTS (SELECT 1 FROM [dbo].[sampleemployee] WHERE e_id= @e_id)
    BEGIN
    UPDATE [dbo].[sampleemployee]
    SET dp = @dp,
    dv = @dv,
    e_num = @e_num,
    mail = @mail,
    emerg = @emerg,
    opt1 = @opt1,
    stat = @stat,
    e_tit = @e_tit,
    e_date = @e_date
    WHERE e_id = @e_id
    END
    ELSE
    BEGIN
    INSERT INTO [dbo].[sampleemployee]( dp, dv, e_num, mail, emerg, opt1, stat, e_id, e_tit, e_date)
    VALUES ( @dp, @dv, @e_num, @mail, @emerg, @opt1, @stat, @e_id, @e_tit, @e_date );
    END
    END;
    But the issue here is it just insert only one row and update that row only, even if there are some no.of rows need to be inserted . Not sure why

    Hi Sid_siv,
    To pass a table value to stored procedure, you can refer to the sample query below.
    create type FileDetailsType as table
    FileName varchar(50),
    CreatedDate varchar(50),
    Size decimal(18,0)
    create procedure InsertFileDetails
    @FileDetails FileDetailsType readonly
    as
    insert into
    FileDetails (FileName, CreatedDate, Size)
    select FileName, CreatedDate, Size
    from
    @FileDetails;
    Reference
    http://www.codeproject.com/Articles/22392/SQL-Server-Table-Valued-Parameters
    http://forum.codecall.net/topic/75547-sql-server-2008-passing-table-parameter-to-stored-procedure/
    Regards,
    Charlie Liao
    TechNet Community Support

  • Server stored procedure to convert date format before insert/ update

    The source which has date in dd-MMM-yy format, have to convert it to
    yyyy-mm-dd hh:mm:ss:SS and insert/update into the database using stored procedure.
    ALTER PROCEDURE [dbo].[uspEmployeeData]
    @emp_id char(35),
    @emp_title varchar(64),
    @start_date datetime
    AS
    BEGIN
    SET NOCOUNT ON;
    IF EXISTS (SELECT 1 FROM [dbo].[employee] WHERE emp_id= @emp_id)
    BEGIN
    UPDATE [dbo].[employee]
    SET emp_title = @emp_tit,
    start_date = @start_date
    WHERE emp_id = @emp_id
    END
    ELSE
    BEGIN
    INSERT INTO [dbo].[employee](emp_id, emp_title, start_date)
    VALUES ( @emp_id, @emp_title, @start_date);
    END
    "The input data for the field/parameter "e_date" is invalid according to the expected SqlDbType DateTime. ---> System.FormatException: The string '04-DEC-65' is not a valid AllXsd value.". Where and
    how to convert the date format

    Format() - new to SQL SERVER 2012 or later - allows you to format an input value to a character string based on a .NET format string, with an optional culture parameter:
    ALTER PROCEDURE [dbo].[uspEmployeeData]
    @emp_id char(35),
    @emp_title varchar(64),
    @start_date datetime
    AS
    BEGIN
    SET NOCOUNT ON;
    IF EXISTS (SELECT 1 FROM [dbo].[employee] WHERE emp_id= @emp_id)
    BEGIN
    UPDATE [dbo].[employee]
    SET emp_title = @emp_tit,
    start_date = Format(@start_date,'yyyy-mm-dd')
    WHERE emp_id = @emp_id
    END
    ELSE
    BEGIN
    INSERT INTO [dbo].[employee](emp_id, emp_title, start_date)
    VALUES ( @emp_id, @emp_title, Format(@start_date,'yyyy-mm-dd'));
    END
    Example:
    SELECT FORMAT(getdate(),'d','en-us') AS us
    SELECT FORMAT(getdate(),'d','de-DE') AS de
    SELECT FORMAT(getdate(),'d','pt-BR') AS br
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.
    Ricardo Lacerda

  • Stored procedure to insert/update data ?

    Hi,
    i have a stored procedure which checks for a specified user and a specified timespan (from - to) its allocations on tasks. The timespan is cut into 30-minute fragments by the SP.
    Very abstract model
    TASK (zero to many) REQUIRED_RESOURCE (zero to many) ALLOCATED_USERThe stored procedure returns a ref cursor with the following columns. The TASK_ID can be null which means there is no allocation between that START_TIME and STOP_TIME. Otherwise the user is allocated on that specific task. Because the data is cut into 30-minute fragments, STOP_TIME is always 30 minutes after START_TIME.
    START_TIME, STOP_TIME, USER_ID, TASK_IDAll good so far.
    I would like to store the data returned by the SP in a table. This allows me for more flexible use of the data. I'm thinking of storing the data as follows (STOP_TIME isn't really needed for storing...):
    START_TIME   (pk)
    USER_ID        (pk)
    TASK_ID       (null)**How can I somehow 'process' the ref-cursor returned by the SP, so that data in my new table is inserted if the START_TIME + USER_ID combination doesn't exist yet or updated if it already exists?**
    Thanks for thinking along!
    This is the SP for reference (TRUNC30 is a function that Truncates a DateTime value to the nearest 30-minute part):
    create or replace
    PROCEDURE REPORT_PLAN_AV_USER
    from_dt IN date,
    to_dt IN date,
    sysur_key IN number,
    v_reservations OUT INTRANET_PKG.CURSOR_TYPE
    IS
    BEGIN
    OPEN v_reservations FOR
      with 
          MONTHS as (select FROM_DT + ((ROWNUM-1) / (24*2)) as DT from DUAL connect by ROWNUM <= ((TO_DT - FROM_DT) * 24*2) + 1),
          TIMES as (select DT as START_TIME,(DT + 1/48) as STOP_TIME from MONTHS where TO_NUMBER(TO_CHAR(DT,'HH24')) between 8 and 15 and TO_NUMBER(TO_CHAR(DT,'D')) not in (1,7))
      select
        TIMES.START_TIME,
        TIMES.STOP_TIME,
        T.TASK_ID,
        sysur_key USER_ID,
      from
        TIMES
        left outer join (ALLOCATED_USER u INNER JOIN REQUIRED_RESOURCE r ON u.AU_ID = r.RR_ID INNER JOIN TASK t ON r.TASK_ID = t.TASK_ID)
          ON u.USER_ID = sysur_key AND t.PLAN_TYPE = 3 AND TIMES.start_time >= TRUNC30(t.START_DATE) AND TIMES.start_time < TRUNC30(t.FINISH_DATE)
      where u.USER_ID is null OR u.USER_ID = sysur_key
      order by START_TIME ASC;
    END;

    Hi,
    user574699 wrote:
    So I should MERGE ON (start_time AND user_id) if i'm correct?Right: the ON condition will be a compound condition; both the time and the user_id have to be the same if the rows match.
    Oh, and is is possible to 'encapsulate' the MERGE statement in the SP? Or should I write another SP that selects from the output cursor as input for the MERGE statement?There's no need for a cursor or a second procedure.
    If the query you posted is producing what you want, just put it in the USING clause as it is, except that you won't need an ORDER BY clause.

  • Report with stored proc running multiple stored procedures with insert statement

    Hi,
    I wonder if this is possible in SSRS ... I use the 2012 version (Data Tools).
    I have a report that triggers a stored procedure. See below.
    Within this SP there are 2 insert statements getting data from 2 other SP's.
    When I make a dataset referring to the main SP below, SSRS does not show me any fields at all.
    Is this because it's a SP with insert statements and nested SP's?
    At the end of the SP I make a select so it should see all the fields.
    The parameters @month and @costcenter are multivalue params. I use a special function to convert the multivalues, selected in the report, into a string to pass it correctly to the query (comma separated).
    USE [TestDB]
    GO
    /****** Object:  StoredProcedure [dbo].[_Pink_SP_StandingsRegisterDataset]    Script Date: 15-4-2014 13:31:30 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[_Pink_SP_StandingsRegisterDataset]
    @year INT,
    @month NVARCHAR(50),
    @costcenter NVARCHAR(500),
    @GLaccount NVARCHAR(9)
    AS
    BEGIN
    /* Remove existing content*/
    DELETE FROM _Pink_TB_StandingsRegister
    /* Add records part 1 */
    INSERT INTO _Pink_TB_StandingsRegister
    EXEC _Pink_SP_StandingsRegister @year, @month, @costcenter, @GLaccount
    /* Add records part 2 */
    INSERT INTO _Pink_TB_StandingsRegister
    Type,
    Row,
    Year,
    Month,
    YearDatetable,
    MonthDatetable
    EXEC _Pink_SP_StandingsRegisterDatetable @year
    /* Select all records */
    SELECT *
    FROM _Pink_TB_StandingsRegister
    END
    GO

    Hi bijntjede2e,
    After testing a similar scenario in my own environment, it works well in Reporting Services. In my test, the stored procedure returns all the fields from _Pink_TB_StandingsRegister table in the dataset. Then I select some values from year, month, costcenter
    and Glaccount parameters, it inserts some values in the _Pink_TB_StandingsRegister table. So we can use this stored procedure as the dataset in the report.
    In order to solve the problem more efficiently, I need to clarify some information.
    Are you pass multiple values parameter to one stored procedure correctly? We can refer to the following thread:
    http://social.technet.microsoft.com/Forums/en-US/dbdfa101-cccc-4e9f-aa50-566dc5ebcc27/ssrs-2008-r2-report-dataset-call-a-stored-procedure?forum=sqlrep
    What results are you get when executing the stored procedure in SQL Server Management Studio? Is it works well? We should double those stored procedures.
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to write stored procedure to spool data into file

    Hi ,
    We get differnt excel sheets of differnt products.
    We upload data from excel sheet to database . After uploading data , I run Preprossor (sql script) to check the data
    This preprocessor script contains several select statements that query different tables in database .the output is spooled into a cvs file .
    I need to change this script into a stored procedure and spool the output to cvs file.
    File spooling should be done inside the stored procedure so that if I call this stored procedure from java program ,or any concurrent program,its output is .cvs file and in parameter should be productname.
    But inside the stored procedure , we cannot spool the data to some .cvs file . Is any way.I do not want to spool to file when calling.It should be inside stored procedure.
    Or do I need to create a table and insert all the select statements output into it .
    Here is the sample preprocessor script.
    spool Graco_Product.csv
    set head off
    set feedback off
    set Pagesize 100
    SELECT '1. EVERY ASSEMBLY GROUP ADDED IN sys_PRODUCT TABLE MUST HAVE AT LEAST ONE ITEM IN WOC_ASSEMBLY_ITEM'
         FROM DUAL;
    SELECT 'ASSEMBLY_GROUP_NAME'
         FROM DUAL;
    SELECT
         assembly_group_name
         FROM association
         WHERE product_model_name = 'Graco_Product'
         AND assembly_group_name NOT IN (SELECT DISTINCT assembly_group_name FROM woc_assembly_item);
    SELECT '2. A RULE SHOULD HAVE AT LEAST ONE EXPRESSION FOR ITS ACTION SIDE.'
         FROM DUAL;
    SELECT 'RELATION_ID , RELATION_TYPE'
         FROM DUAL;
    SELECT wr.Relation_ID                    ||','||
         wr.Relation_Type                    
         FROM WOC_Relation wr
         WHERE NOT EXISTS (SELECT 'X' FROM WOC_Relation_Expression wre
    WHERE wre.Relation_Side = 'Action'
    AND wr.Relation_ID = wre.Relation_ID)
         AND wr.Relation_Type NOT IN ( 'Rule Warning','Rule Resource','Rule Default');
    SELECT '3. PROPERTIES USED IN RULES SHOULD EXIST IN WOC_PROPERTY_MASTER -- EXP_LHS_VALUE'
         FROM DUAL;
    SELECT
         'RELATION_OWNER,EXP_LHS_OPERAND,RELATION_SIDE,RELATION_ID,EXP_LHS_VALUE,RELATION_TYPE'     
         FROM DUAL;
    SELECT
         b.relation_owner               ||','||
         a.exp_lhs_operand               ||','||
         a.relation_side                    ||','||
         a.relation_id                    ||','||
         a.exp_lhs_value                    ||','||
         b.relation_type
         FROM woc_relation_expression a, woc_relation b
         WHERE a.exp_lhs_value IS NOT NULL
         AND a.exp_lhs_value_type = 'Property'
         AND a.exp_lhs_value NOT IN (SELECT property_name FROM woc_property)
         AND b.product_model_name = 'Graco_Product'
         AND a.relation_id = b.relation_id;
    SELECT '--------------------------------------------------------------------------------'
    from dual;
    spool off
    set head on
    set feedback on

    High level description
    Full documentation
    Note that the UTL_ and DBMS_ packages are all covered in the PL/SQL Packages and Types Reference.
    You may also want to read up on the CREATE DIRECTORY statement, which lets you refer to an actual OS directory (which you create separately) via a database object.

  • Calling mysql stored procedure having insert sql commands within cftransaction is not getting rolled back

    Hi,
    cftransaction is working perfectly when all the insert
    updates are called by cfqquery.
    But when there is a mysql stored procedure call with in
    cftrnsaction and that mysql stored procedure is having many inserts
    and updates, cftransaction is not able to roll back insert/updates
    happened in stored procedure.
    I am using InnoDB tables/database of mysql.
    Did anybody faced a similar problem and is it a coldfusion
    bug or mysql bug.
    We checked with Java and java is able to roll back the
    transaction, but coldfusion cftransaction is failing.
    Please help.
    Regards,
    Saikumar

    Mark,
    I believe the syntax of your formatted search is not right. I guess you are trying to get the U_Width from Item Master and the other values from the current form.
    SELECT @Width = T0.U_WTH FROM [dbo].[OITM] T0.WHERE T0.ItemCode = $[$38.1.0]
    EXEC TBC_CHOP @Width, $[$38.U_LINETYPE.0], $[$38.U_LI.0], $[$38.U_LN.0],
    $[$38.U_LD.0], $[$38.U_HI.0], $[$38.U_HN.0], $[$38.U_HD.0], $[$38.U_QTYORD.Number]
    If you see I have added a third parameter which is the Type to the formatted seach field selection $[$Item.Column.Type]
    I have made then all 0 but you may change it as per the col type.  This Type should be 0 for Char type columns, Number for numeric columns and Date for Date type cols
    Suda

Maybe you are looking for

  • Whats the difference between PROCESS INTEGRATION & INTEGARTION PROCESS

    hey All I was just going through one of the tutorials provided in     http://www.help.sap.com  , its related to Process Integartion Scenario  and i also came across one more tutorial related to Integration Process. For * Process Integration* it was t

  • INDIA - Subcontract Process- Creation of Excise Invoice T-code J1IS

    Dear All, We are placing most of the purchase orders on subcontractor labour basis & raw material steel is being supplied by us to subcontractor. Transfer posting Movement type 311. After creation of material document Excise Invoice is created using

  • Automatic Deletion in Infopackage

    Hello all, I have this problem, Im writing an ABAP routine in an infopackage for automatic deletion.  The code ran with no errors but in the code I specified that I didnt want the previous package to be deleted if the new package has less records tha

  • The restart, log off, and shut down icons have quit responding​.

    I have a HP desktoop computer model sw5705f. It is not allowing me to restart, log off ,or shut down by clicking on them proper icon.  The only way I can shut down is to manually turn off the tower. What could have happened and how do I solve the3m p

  • To know the Service Pack???

    Hi Experts, How do we know that on which service pack the portal server is running? I mean to say, i would like to know my portal server is running on which service pack whether it is SP 10 or SP 12? Thanks, Satya