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

Similar Messages

  • 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.

  • 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

  • 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

  • Stored Procedure for insert in a table

    Hi everybody
    I have to insert a line into a table to initialize the supply of a datawarehouse.
    The table contains:
    Id_chargement Oracle sequence
    date_chargement sysdate
    status 'EN COURS'
    I read some message in this forum but I don't find the solution.
    Can I call a procedure in the workflow ? Or must be use the preprocessing of the first map to call this stored procedure ?
    But for the second solution, if I had a map before, I must change this call.So, it's not very interesting.
    Have you a idea
    Thank you for your help
    Frederic from France

    Hi Mahesh,
    I created a procedure as
    begin
    insert into <table name> values( <timestamp value>);
    end;
    i added this procedure in the process flow, and as you said i added 1- Success, 2 - warning, 3 - error.
    I am able to deploye the procedure and process flow,
    after that when execute the process flow, that just says completed with errors,
    no other information and oracle error messages are abilable in the
    result panel
    Job Final Status : Completed with errors
    Job Processed Count : 1
    Job Error Count : 0
    Job Warning Count : 0
    can you say , what could be the problem??
    Thanks & regards
    raja

  • 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

  • Help: using a stored procedure to insert a record in DB

    A stored procedure:
    PROCEDURE db_insert
    db_block IN OUT plsql_table)
    is created in DB.
    db_select and db_update are created too. They both work fine as
    db_select is called by go_block execute_query (block populated) and
    db_update is called by commit (DB updated);
    I am trying to have db_insert called as:
    1. DO_KEY('Create_Record');
    2. fill in fields and then
    3. commit.
    These 3 steps do not cause the call of the auto generated block trigger insert_procedure. I think that after filling in the fields and there should be a way to call this insert_procedure trigger. I am not sure how this will work.
    Any suggestions are greatly appreciated.

    I went through quite a deep search and yet not found any good answers. Knowing that select and update all done well with execute_query(stored procedure is called) and commit(stored procedure is called), but not insert.
    Logically there must be some FORM build in that will trigger the call of stored procedure insert.
    I am still looking for answers and just to remind that there are quite number of similar posts and I do not think that any clear answers were delivered.
    Please help.

  • Stored Procedure basic timing questions

    If I have the following statements in one stored procedure, what happens if a user does an update, insert, or select to the MAIN_TABLE during the procedure (assume the procedure takes a few seconds)?
    MY_PROCEDURE:
    INSERT INTO BACKUP_TABLE (COL1, COL2, ETC.)
    (SELECT COL1, COL2, ETC. FROM MAIN_TABLE WHERE BACKED_UP = 'N');
    UPDATE MAIN_TABLE SET BACKED_UP = 'Y' WHERE BACKED_UP = 'N';If they do an update/insert, will the data in MY_PROCEDURE see that update/insert and send it to BACKUP_TABLE? Or will it depend on whether that record has been processed yet? Or will the update/insert not persist until the procedure is complete? (I suspect the latter, but it's hard to get the timing right to test this myself)
    Would there be any problems doing a select on MAIN_TABLE while this process is occurring?
    If there's a reference to how these timing issues are resolved that someone could point me to, that'd be great; I can't seem to find anything on my own.

    when all else fails Read The Fine Manual
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/consist.htm#sthref1118

  • Stored Procedure to INSERT VALUE to UDT

    Hello Everyone,
          I came across a situation that I have UDT "Temp", when I enter data in AP Invoice, is there any way to exactly replicate the detail line data in to UDT, Can it be done using Transaction Notification Stored Procedure?? the UDT "Temp" have same columns as of PCH1 with same data type.
    Is it possible?? If so then please provide me the query to insert it in "Temp"..
    Which SP I have to use then?? and please provide me query..
    Thanks in advance

    Hi Idrees,
    if you Had made the UDT using SAP then please don't go for the Transaction Notification ... but if you have Created the table In Sql Server (Non-SAP Table  ) the Go for The Transaction Notification
    but if you  use UDT then "SAPbobsCOM.oUserTable" Go for It make Insert /Update/Delete Through it.
    Transaction Notification may be difficult to Handle.
      Regards,
    Mayank Shah.

  • 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.

  • Tsql stored procedure bulk insert

    Hi,
    The following code works perfectly:
    cfquery datasource="#SESSION.DSN#">
      BULK INSERT dbo.Syndicated
      FROM '#selectedfile#'
      WITH
       FIELDTERMINATOR = ',',
       ROWTERMINATOR = '\n',
       FIRSTROW = 2
    </cfquery>
    I created this stored procedure:
    CREATE
    PROCEDURE dbo.uspInsertSyndicatedRecords@selectedfile
    varchar(2000)
    AS
    BEGIN  
    BULK INSERT Syndicated 
    FROM '@selectedfile'
    WITH
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n',
    FIRSTROW = 2 
    END
    I'm getting an error:  The file "@selectedfile" does not exist.
    Anyone know if there are issues with the file path in a stored procedure.  #selectedfile# = C:\ColdFusion8\wwwroot\cfdocs\mis35\luxury.csv
    Thanks!
    cfwild

    Unfortunately, dynamic queries don't work within TSQL - meaning you can't substibute table and column names with variables.  You can only use variables for the comparison values or select values.
    However, you can create a variable, build the SQL statement in that variable and execute it:
    DECLARE @SQLString VARCHAR(max)
    SET @SQLString = 'SQL Start ....' + @MyVar + ' .... SQLEnd'
    EXEC(@SQLString)
    Now, if the variable being concatinated is not a string, you will need to cast/convert it to string, which just adds tons of fun to the equation.
    Hope this helps!

  • Using stored procedures for insert, update and delete

    Hello all;
    We have a question from our customer (who is the DBA), who has not in the past used TopLink, about whether it makes sense to tie TopLink into existing stored procedures to save and retrieve informations.
    Is it possible?
    Is there any circumstance under which it is a good idea?
    Thanks

    In TopLink any operation for which TopLink generates SQL, can be replaced by custom SQL, or a stored procedure call.
    Custom SQL or stored procedures can be used for each of the descriptor's CRUD operations, but also for mapping queries and named queries. The Mapping Workbench only supports defining custom SQL for the descriptor CRUD operations and named queries, so many of the stored procedures call from the descriptor and mappings will need to be done through amendment methods.
    Whether it makes sense or not depends on the application and the company and their requirements. It will add significant overhead to the development process to have to define and maintain all of the stored procedures, and the stored procedure calls in the descriptors. You may wish develop your application using TopLink generated SQL, and once you have the model and queries stabilized then switch to using stored procedures.
    Whether it is a good idea depends on the application and the company and their requirements. Stored procedures may give the DBA more freedom to change the data-model once in production, and may allow for adding database-level security checks. In general using stored procedures will not improve performance if the procedures contain the same SQL that would have be executed anyway, but they may allow for the DBA to tune the SQL better.

  • Stored procedure to insert into multiple tables in sql server 2012, using id col from one table to insert into the other 2

    Hi all,
    Apologies if any of the following sounds at all silly but I am fairly new to this so here goes...
    I have 3 tables that require data insertion at the same time. The first table is the customers table, I then want to take the automatically generated custid from that table and inser it into 2 other tables along with some other data
    Here's what I have so far which does not work:
    CREATE PROCEDURE CustomerDetails.bnc_insNewRegistration @CustId int,
    @CompanyName varchar(100),
    @FirstName varchar(50),
    @LastName varchar(50),
    @Email nvarchar(254),
    @HouseStreet varchar(100),
    @Town smallint,
    @County tinyint,
    @Postcode char(8),
    @Password nvarchar(20)
    AS
    BEGIN
    begin tran
    insert into CustomerDetails.Customers
    (CompanyName, FirstName, LastName, EmailAddress)
    Values (@CompanyName, @FirstName, @LastName, @Email)
    set @CustId = (select CustId from inserted)
    insert into CustomerDetails.Address
    (CustomerId, HouseNoAndStreet, Town, County, PostCode)
    values (@CustId, @HouseStreet, @Town, @County, @Postcode)
    insert into CustomerDetails.MembershipDetails
    (CustomerId, UserName, Password)
    values (@CustId, @Email, @Password)
    commit tran
    END
    GO
    If anyone could help with this I would very much appreciate it as I am currently building an online store, if there's no registration there's no customers.
    So to whom ever is able to help, I thank you whole heartedly :)

    I hope by now it is apparent that statements like "doesn't work" are not particularly helpful. The prior posts have already identified your first problem.  But there are others.  First, you have declared @CustID as an argument for your
    procedure - but it is obvious that you do not expect a useful value to be supplied when the procedure is executed.  Perhaps it should be declared as an output argument so that the caller of the procedure can know the PK value of the newly inserted customer
    - otherwise, replace it with a local variable since it serves no purpose as an input argument.
    Next, you are storing email twice.  Duplication of data contradicts relational theory and will only cause future problems. 
    Next, I get the sense that your "customer" can be a person or a company.  You may find that using the same table for both is not the best approach.  I hope you have constraints to prevent a company from having a first and last name (and
    vice versa).
    Next, your error checking is inadequate.  We can only hope that you have the appropriate constraints to prevent duplicates.  You should expect failures to occur, from basic data errors (duplicates, null values, inconsistent values) to system issues
    (out of space).  I'll leave you with Erland's discussion for more detail:
    erland - error handling.
    Lastly, you should reconsider the datatypes you are using for the various bits of information.  Presumably town and county are foreign keys to related tables, which is why they are numeric.  Be careful you don't paint yourself into a corner with
    such small datatypes.  One can also debate the wisdom of using a separate tables for Town and County (and perhaps the decision to limit yourself to a particular geographic area with a particular civic hierarchy). Password seems a little short to me. 
    And if you are going to use nvarchar for some strings, you might as well use it for everything - especially names.  Also, everyone should be security conscious by now - passwords should be encrypted at the very least.
    And one last comment - you really should allow 2 address lines. Yes, two separate ones and not just one much larger one.

  • 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

  • Stored procedure to Insert any type of file in to sql server from the path ?

    Hi,
    I have a table "FileMGT" and storing files in to disks. 
    FileMGT Columns :
    FileName
    FilePath
     020324.doc
    f:\cfs\Claims Document
     5013.tif
    f:\Addendums
     2790.msg
    t:\Treatycfs
    Now I would like to store all files from above table in to sql sever by adding content column ( VARBINARY ) datatype.
    Please help me do solve this.
    Thank you.

    Why do you want to store files in SQL Server? If your version is SQL Server 2012, then you can try with FILETable.
    Please refer the below link for the same
    http://technet.microsoft.com/en-us/library/ff929144.aspx
    The FileTable feature brings support for the Windows file namespace and compatibility with Windows applications to the
    file data stored in SQL Server. FileTable lets an application integrate its storage and data management components, and provides integrated SQL Server services -
    including full-text search and semantic search - over unstructured data and metadata.

Maybe you are looking for

  • Bypassing OUI

    I am attempting to install 8i on a Sparc Solaris machine and I constantly run into problems with the OUI crashing when attempting to load one of the java classes. Is there a way to manually install the product without the use of the OUI or what can b

  • Connection sharing for embedded JDBC and DatabaseController

    <p> </p><p>I would like to share an existing JDBC connection with the DatabaseController (i.e. same session in database).  Basically I need to call a stored proc in the JSP page then use the same (already established and open) connection for the Data

  • REUSE_ALV_GRID: coloring of cells without digits

    Hello Experts, Im using reuse_alv to display my internal table: CALL FUNCTION 'GUI_UPLOAD'      EXPORTING        filename = v_filename        filetype = 'ASC'      TABLES        data_tab = ta_csv.    IF sy-subrc <> 0.      MESSAGE 'Lokale Datei nicht

  • Anyone else getting adobe AIR error 2032 when trying to download Adobe max companion?

    Hey; I'm attending max for my first time and am psyched. I've tried downloading the Adobe MAX companian at http://www.max.adobe.com/companion but I keep getting error 2032. I'm wondering if I'm the only one experiencing this problem and if so what ca

  • A problem downloading movie

    i am having a problem downloading movie that was filmed with a JVC camera in hdv format 720p 50fps. the movie was filmed on a tape, not directly to hard disk, and it is not being recognized on my dsr-15 machine.