How Can insert the records into Excel_sheet by using SQL Task-SSIS ?

As per requirement ,
insert the records in excel sheet(DT)  by using SQL Task-SSIS .
I used SQL query in SQL Task-SSIS:
e.g.., INSERT INTO [DT$B1:B1] VALUES ('COMMM')
but error:Executing the query "INSERT INTO [DT$B1:B1] VALUES ('COMMM') " failed with the following error: "This table contains cells that are outside the range of cells defined in this spreadsheet.". Possible failure reasons: Problems
with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Please any suggestion  ...
-MADHU

then first create a table inside Excel sheet based on your source data. You can Execute sql task for that using excel connection. then use insert to populate it
see an example here where I create a dynamic sheet using execute sql task
http://visakhm.blogspot.in/2013/09/exporting-sqlserver-data-to-multiple.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • How to Splilit The String Into Single Column using Comma As Delimiter ?

    How to Splilit The String Into Single Column using Comma As Delimiter ?
    using Function

    refer my thread ,code is also available see if that helps you
    error while executing the sp ORA-21779: duration not active

  • How to insert the records using sql query

    hi,
    i insert the record uisng sql query and DOTNET programme successfully and increase the doc num .ubut when i try to  add record using SAP B1 the old Doc no show.It means its not consider the docnums which are not inserted by sql query.
    how can i solve this problem?
    Regards,
    M.Thippa Reddy

    You are not support use Insert / Update / Delete on SAP Databases directly.
    SAP will not support any database, which is inconsistent, due to SQL-Queries, which modify datasets or the datastructure of the SAP Business One Database. This includes any update-, delete- or drop-statements executed via SQL-Server Tools or via the the query interface of SAP Business One
    Check SAP Note: 896891 Support Scope for SAP Business One - DB Integrity
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=896891]

  • How i can Insert selected records in database table using check box.

    Hi Friends,
    I have non database block, which displayed multiple records, now I add a Check Box to this block and now I want to insert the records in a database table which I checked. So when I press a button, all the checked records are inserted in the table.
    Please send me the code of this solution.
    Thanks in advance.
    Shahzad

    I have almost the exact scenario but instead of inserting into the DB, I want to find the Checked records and process them in PL/SQL script.
    I currently have a cursor that looks for all the checked records. It's only getting the first record, so I figured I need to loop through the block looking for checked records.
    Also can I save them to a temp or PL/SQL table to process later?

  • How do you insert new records into multiple tables using the same unique primary key?

    I’ve created a PHP site and MySQL server using a free app called XAMPP.  I have successfully created a form in Dreamweaver that will write data to a (name) table in the SQL database.  Here’s my question: How do you write to two (or more) tables in the same database and pass the same primary key to both tables?  In the SQL database, I defined the first field as ID and set it as the primary key with auto update.  So, when you insert a new record, it creates a unique primary key for that record.  In my form, I’m capturing info that needs to be stored to two tables at the same time; a Name table and Address table. Since the Name and Address tables use the ID field as the primary key, I believe I will need to pass the ID value from the Name table to the insert of the Address table to insure they both have the same primary key, right?

    No. You probably need the primary key from one table to be a foreign key in the other tables. In any case, I believe you can use two methods to obtain the auto generated key. First with SQL:
    http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
    And the other using a PHP function:
    http://us3.php.net/mysql_insert_id

  • How to Insert a record into a MySql database.

    Hi,
    In an earlier question I was advised to use the Adobe extension to get access to database connectivity and server behaviours.
    That extension is now installed. Whether it is functional is another question.
    To chewck it out I follwed exactly the steps set out in Lessons 5 and 6 of Dreamweaver CS5 with PHP
    When trying to make a database connection I am still getting the 404 error I mentioned in an earlier email. However if I type the database name (phpcs5) into the “select database” box and test it says I connected successfully and I can see the user’s table in the database panel.
    So far apparently so good.
    I have created the cs5wtite and cs5read connections to the phpcs5 database
    I set up the insert record behaviour using “Form1!, “cs5write”, “users”,
    Everything went as per the manual, the file turned aqua in Live view.
    I entered data and ctrl/clicked “Sign me up” button and nothing happened.
    No data was entered into the database and I was not passed to login.php.
    I deleted everything from the computer, restarted the pc and started again from scratch.
    The result was the same. Nothing
    My one concern was line 49  $insertGoTo = " login.php";
    The file is in registration so I changed to $insertGoTo = "registration/login.php";
    but that made no difference.
    Is there any logging or error reporting I can use to see where it is going wrong?
    This is the add user page generated
    <?php require_once('../Connections/cs5write.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO users (first_name, family_name, username, password) VALUES (%s, %s, %s, %s)",
                           GetSQLValueString($_POST['first_name'], "text"),
                           GetSQLValueString($_POST['surname'], "text"),
                           GetSQLValueString($_POST['username'], "text"),
                           GetSQLValueString($_POST['password'], "text"));
      mysql_select_db($database_cs5write, $cs5write);
      $Result1 = mysql_query($insertSQL, $cs5write) or die(mysql_error());
      $insertGoTo = "login.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Add new user</title>
    <link href="../../styles/users.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <h1>Sign Up Now</h1>
    <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
      <fieldset>
        <legend>Just a few details and you&rsquo;re in</legend>
        <p>
          <label for="first_name">First name:</label>
          <input type="text" name="first_name" id="first_name" />
        </p>
        <p>
          <label for="surname">Family name:</label>
          <input type="text" name="surname" id="surname" />
        </p>
        <p>
          <label for="username">Username:</label>
          <input type="text" name="username" id="username" />
        </p>
        <p>
          <label for="password">Password:</label>
          <input type="password" name="password" id="password" />
        </p>
        <p>
          <label for="conf_password">Confirm password:</label>
          <input type="password" name="conf_password" id="conf_password" />
        </p>
        <p>
          <input type="submit" name="add_user" id="add_user" value="Sign me up!" />
        </p>
      </fieldset>
      <input type="hidden" name="MM_insert" value="form1" />
    </form>
    </body>
    </html>
    This is the connection page
    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_cs5write = "localhost";
    $database_cs5write = "phpcs5";
    $username_cs5write = "cs5write";
    $password_cs5write = "Smp??2014";
    $cs5write = mysql_pconnect($hostname_cs5write, $username_cs5write, $password_cs5write) or trigger_error(mysql_error(),E_USER_ERROR);
    ?>
    I understand this solution is a wokraround Adobe privided whist deprecating its use.
    In the earlier question I asked if there was another way to work with a database. Someone posted a link to an Object orientated solution but It was way beyond my coding abilities. I wonder are there any other solutions out there?
    Thanks for any input

    Hi,
    Thanks for the test.
    I used your amendment but still got nothing, no record in database and not sent to login page..
    I also tried this code below. It returns "Record added to database" but it was not.
    Something strange going on.
    <?PHP
    $user_name = "cs5write";
    $password = "Smp??2014";
    $database = "phpcs5";
    $server = "127.0.0.1";
    $db_handle = mysql_connect($server, $user_name, $password);
    $db_found = mysql_select_db($database, $db_handle);
    if ($db_found) {
    $SQL = "INSERT INTO users (first_name, surame, username, password) VALUES) VALUES ('Albert', 'Dent', 'hitchiker', 'space')";
    $result = mysql_query($SQL);
    mysql_close($db_handle);
    print "Records added to the database";
    else {
    print "Database NOT Found ";
    mysql_close($db_handle);
    ?>

  • How to insert multiple records into a table?

    hi all 
    i have a table that name is : TiketsItem
    now i  want to 100 records insert my table
    for example : TicketsHeaderRef=52000
    Active=False
    TicketsItemId=45000 to 45100
    how to insert TicketsItemId  45000 to 45100 in my table
    thanks all
    Name of Allah, Most Gracious, Most Merciful and He created the human

    So, you just want to insert the serialized data into the table, without useDate or WKRef? I'm assuming these values will be updated later?
    Try something like this:
    DECLARE @TicketsHeader TABLE (TicketsItemID BIGINT, ticketsHeaderRef BIGINT, active BIT, useDate DATETIME, WKRef SMALLINT)
    DECLARE @startInt BIGINT = 45000
    WHILE @startInt <= 45100
    BEGIN
    INSERT INTO @TicketsHeader (TicketsItemID, ticketsHeaderRef, active)
    VALUES (52000, @startInt, 0)
    SET @startInt = @startInt + 1
    END
    SELECT *
    FROM @TicketsHeader
    thanks 
    i edited your codes:
    DECLARE @TicketsItem TABLE (TicketsItemID BIGINT, ticketsHeaderRef BIGINT, active BIT, useDate DATETIME, WKRef SMALLINT)
    DECLARE @startInt BIGINT = 45000
    WHILE @startInt <= 45100
    BEGIN
    INSERT INTO @TicketsItem (TicketsItemID, ticketsHeaderRef, active)
    VALUES (@startInt,52000 , 0)
    SET @startInt = @startInt + 1
    END
    when i execute:
    SELECT *  FROM TiketsItem
    i do not see any records inserted in TiketsItem
    how to solve it?
    Name of Allah, Most Gracious, Most Merciful and He created the human

  • How to insert new record into oracle table from GridView in VS2005.

    I need to insert records into Oracle10g table from VS2005 GridView using the Insert Method in Business Logic Class. The Update and Delete Methods are working fine. What's the best way out?

    How is it "not possible"?
    Either modify the Class for the new fields, or give the new fields default values (if applicable). If the type of an existing column has changed, then only the first option is available.
    Where's the problem?

  • How to split  the records into two parts

    Hi experts,
    I have a field with 75 char length, this field have records also, Now i want to split the field into two differnt fields. That means upto first 40 char goes to one field, from 41st char to 70 char goes to another field, for that how to split record into two parts.
    Plz advice this,
    Mohana

    Hi,
    Do the following:
    f1 = fsource(40).
    f2 = fsource+40(30).
    where fsource is the 70 character original string and target strings are f1 (length 40) and f2 (length 30).
    Cheers,
    Aditya
    Edited by: Aditya Laud on Feb 22, 2008 2:10 AM

  • How to insert new record into altered table

    I am using JDBC with MySQL. I altered existing table and want to insert new record using java class. But it is not possible.How to do?

    How is it "not possible"?
    Either modify the Class for the new fields, or give the new fields default values (if applicable). If the type of an existing column has changed, then only the first option is available.
    Where's the problem?

  • How to insert a picture into excel file using ALE AUTOMATION

    Hi every body,
    I have to write report that export data from abap to exel the data contain a logo but I don't know how to insert picture to excel using ALE AUTOMATION.
    Please help me!
    Thank you!

    Hi,
    you have to join into SAP Code Exchange and download this zip:
    [ABAP2XLSX_daily.nugg.zip|http://code.sdn.sap.com/spaces/abap2xlsx/documents/btFzHQ3vKr36tCeJe7bhNc/download/btFzHQ3vKr36tCeJe7bhNc]
    Regards,
    Ivan

  • How can I display records quickly in order, using set_block_property

    Hi all,
    I want to display records in order when I click on button corresponding to that filed.I'm getting result by using set_block_property..but it is displaying records slowly,if number of records are more then it's taking more time to sort the records.
    I have written the following code in when-button-pressed trigger:
    begin
    if get_block_property('block_name',default_where) = 'column_name ASC' then
    set_block_property('block_name', default_where,'column_name DESC');
    else
    set_block_property('block_name',default_where, 'column_name ASC');
    end if;
    end;
    How can I get the result quickly can anyone please give me an idea to solve this.
    Thanks in advance.

    Hi user;
    I want to display records in order when I click on button corresponding to that filed.I'm getting result by using set_block_property..but it is displaying records slowly,if number of records are more then it's taking more time to sort the records.
    I have written the following code in when-button-pressed trigger:
    begin
    if get_block_property('block_name',default_where) = 'column_name ASC' then
    set_block_property('block_name', default_where,'column_name DESC');
    else
    set_block_property('block_name',default_where, 'column_name ASC');
    end if;
    end;
    How can I get the result quickly can anyone please give me an idea to solve this.Did you try to use index for related column? Also did you try to use order_by instead of default_where
    If its not help, I also suggest post your issue on :Forum Home » Developer Tools » Forms
    Hope it helps
    Regard
    Helios

  • How to change the angle into front perspective using smart object vectors

    Hello, I need this answered so i could succesfully do my school project.
    I was using a logo mock up vector(smart object file) for my illustration and was wondering if there is any way to present it in front perspective?
    This is just a sample image. I had created a brand new illustration not just a logo but the effect is same.
    As you can see the wood engraved logo is presented in an angle. Could i change the position of this sample logo into a front view or i have to make this effect myself from scratch?

    On your example i used the Perspective Crop Tool
    1. Draw out the perspective crop and move the corner handles to line up with the inside corners of the logo
        (blue circles)
    2. Then drag out the side handles just outside the image
    3. Press the checkmark button to complete the crop
    You said vector smart object.
    Is that logo something you created in illustrator?

  • How to share the same Database Connection when using several Task Flows ?

    Hi All,
    I’m using JDev 11.1.1.3.0.
    I’m developing ADF Fusion Applications (ABC BC, ADF Faces…)
    These applications are deployed on a Weblogic server.
    Each application has only one Application Module.
    All Application Modules have the same connection type defined: JDBC DataSource : jdbc/GCCDS
    It is working fine.
    I’ve also developed Task Flow Applications for small thinks that are reused in multiple main applications.
    Each Task Flow Application has also one Application Module with the same connections type as main applications.
    All these task flows are deployed to JAR file (ADF Library JAR File) and are reused on my main applications. (drag and drop from the Resource Palette to ADF Regions….).
    There are some parameters passed to Task Flows, so that they can filter data depending on which main applications they are called from.
    Everything is working perfectly.
    All my main applications are using more and more task flows. Which is nice for the reusability etc…?
    Only ONE PROBLEM: DATABASE CONNECTIONS.
    Every Task Flows service made a database connection. So one user may have 10 database connections for the same adf page. And when there are 100 users that are working at the same time, it becomes a problem.
    How to share the same database connections for the main applications and all task flows which are used in the main application?
    Best Regards
    Nicolas

    Hi John,
    When I open a ADF Library JAR file of one of my task flow. (gcc_tf_recentSites.jar)
    I can see TF_RecentSitesService.xml and TF_RecentSitesServiceImpl.class in gcc_tf_recentSites.jar\mu\gcc\tf\recentSites\model\service folder
    + bc4j.xcfg in gcc_tf_recentSites.jar\mu\gcc\tf\recentSites\model\service\common folder.
    bc4j.xcfg details are
    +<?xml version = '1.0' encoding = 'UTF-8'?>+
    +<BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration">+
    +<AppModuleConfigBag ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService">+
    +<AppModuleConfig DeployPlatform="LOCAL" jbo.project="mu.gcc.tf.recentSites.model.TF_RecentSites_Model" name="TF_RecentSitesServiceLocal" ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService">+
    +<Security AppModuleJndiName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService"/>+
    +<Custom JDBCDataSource="jdbc/GCCDS"/>+
    +</AppModuleConfig>+
    +<AppModuleConfig name="TF_RecentSitesServiceShared" ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService" DeployPlatform="LOCAL" JDBCName="gccdev" jbo.project="mu.gcc.tf.recentSites.model.TF_RecentSites_Model">+
    +<AM-Pooling jbo.ampool.maxpoolsize="1" jbo.ampool.isuseexclusive="false"/>+
    +<Security AppModuleJndiName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService"/>+
    +</AppModuleConfig>+
    +</AppModuleConfigBag>+
    +</BC4JConfig>+
    So, it seems that the Application Module is packaged with the task flow....
    Is it normal ?
    Regards
    Nicolas

  • Inserting the records into the table

    Hi,
    I defined a procedure as follows
    create ....
    Cursor C1 is
    select item_id,item_name from item;
    Inert into abc.t3_clas(id,name) values(NVL(c1.item_id,' '),c1.item_name);
    end;
    Cursor C1 is having data. There are no null values.
    But after executing the procedure it's working fine but it is not loading the data.
    Could you please help me out where I need do check to find out the problem.
    Thanks.

    832581 wrote:
    create or replace
    PROCEDURE cust_load AS
    <var declaration)
    CURSOR C1 IS
    SELECT a.item_num,a.item_name FROM
    (SELECT ltrim(rtrim(item_num)) itemnum,
    item_name, item_cd, item_typ
         FROM abc.item_wrkg
              UNION ALL
              SELECT ltrim(rtrim(item_num)) itemnum,
    item_name, item_cd, item_typ
         FROM abc.item_w_cd ) a
    WHERE a.item_cd = '01'
    AND a.item_typ = '28';
    BEGIN
    DBMS_OUTPUT.ENABLE(100000);
    lvb_trun_tbl := DWB.DWB_truncate_tbl('ITEM_CTGRY');
    IF NOT lvb_trun_tbl THEN
    RAISE lve_trunc_failed;
    END IF;
    FOR c_rec in c1 LOOP
    INSERT INTO abc.item_ctgry(ctgry_cd,
    ctgry_name)
    VALUES (NVL(c_rec.itemnum,' '),
    c_rec.item_name);
    lvn_rec_count := lvn_rec_count + 1;
    IF MOD(lvn_rec_count,lvn_commit_seq) = 0 THEN
    COMMIT;
    END IF;
    END LOOP;
    COMMIT;
    IF lvn_rec_count = 0 THEN
    RAISE lve_no_rec_found;
    END IF;
    DBMS_OUTPUT.PUT_LINE('abc.item_CODE_LOAD - Rows loaded: '|| TO_CHAR(lvn_rec_count));
    EXCEPTION
    WHEN lve_trunc_failed THEN
    DBMS_OUTPUT.PUT_LINE(' Truncation failed');
    WHEN lve_no_rec_found THEN
    DBMS_OUTPUT.PUT_LINE(' No rows inserted');
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('SQLERRM);
    END;
    this is the procedure....
    please look into this and give me your suggestions.
    Thanks.You still hiding the code...
    But its not throwing any error means ur logic is going wrong somewhere..
    post your whole code.
    and put the below tag line before and end of code..
    Regards
    Umesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • After upgrading Lion to 10.7.2 cannot open iCal

    Hi, Yesterday I did the upgrade to Lion 10.7.2 to my MacBook Air 2011, incorporating iCloud services. At the same time, i upgraded my iPhone 4 to the iOS 5. This morning when i openned the iCal I got a message saying that "Calendar Cache" could not b

  • I have a mac mini which will not wake from sleep mode since installing yosemite.

    The cursor moves when using a track pad and magic mouse, but I can't click on anything. Also computer always starts in safe mode now. Am I the only one having this problem. I have sent the error messages to Apple, but have not seen any updates that m

  • Encoder cc crashes on start up all other cc programs work fine below is the crash report

    Process:         Adobe Media Encoder CC [19309] Path:            /Applications/Adobe Media Encoder CC/Adobe Media Encoder CC.app/Contents/MacOS/Adobe Media Encoder CC Identifier:      com.adobe.ame.application Version:         7.0.1 (7.0.1.58) Code T

  • Pro's and Con's Web dynpro ABAP

    Hi all, Could someone please give some pro's and con's (technical) with Web Dynpro for ABAP compared to Web Dynpro for Java? Thanks, Max

  • Redundant Controller at a remote site

    We are implementing a number of WLCs at different sites that are connected by a WAN (site-to-site links). I'd like to use the WLC at site A as the backup WLC for site B and that at site B as the backup for site A. I've reviewed the documents that I c