How to calculate the total running time for process from sysssislog entries

Hi All,
I have the below query which gets me the log entries form the logs table when the process started/completed.
Select row_number() over (order by starttime) row_num,Substring( Substring(message, CharIndex('''',message) +1 ,Len(message)) ,0, CharIndex('''',Substring(message, CharIndex('''',message) +1 ,Len(message)))) as Description,
starttime,endtime,message
from dbo.sysssislog
where (message like 'start%' or message like 'finish%' ) and
LEFT(Substring( Substring(message, CharIndex('''',message) +1 ,Len(message)) ,0, CharIndex('''',Substring(message, CharIndex('''',message) +1 ,Len(message)))),1) between 'A' and 'Z'
order by starttime
However,I have to build a report on the top of it showing how much time that attribute/dimension/heirarchy took to execute(Ex-How much time did YearlyReview dimension take to complete).I dont have much knowledge of T-SQL and unable to figure out how to calculate
that on SQL or report level.
Could someone please assist me in getting the exact query for that?
Thanks a lot.

I get the below output(sample 20 rows) on executing this query.Also,a start process does not necessarily follow up a finished message for the same dimension as it may have been stopped or it failed.So we need to leave it as NA in case it started but dint
finish
Row_Num Description starttime endtime Message
1 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Super Type' dimension.
2 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Super Type' dimension.
3 Team Member Indicator 12/13/12 16:38 12/13/12 16:38 Started processing the 'Team Member Indicator' dimension.
4 Team Member Indicator 12/13/12 16:38 12/13/12 16:38 Started processing the 'Team Member Indicator' dimension.
5 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Super Type' attribute.
6 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Super Type' attribute.
7 Specialist Merger Indicator 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Specialist Merger Indicator' attribute.
8 Specialist Merger Indicator 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Specialist Merger Indicator' attribute.
9 YearlyReview 12/13/12 16:38 12/13/12 16:38 Started processing the 'YearlyReview' dimension.
10 YearlyReview 12/13/12 16:38 12/13/12 16:38 Started processing the 'YearlyReview' dimension.
11 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Repeat Caller' dimension.
12 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Repeat Caller' dimension.
13 Year 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Year' attribute.
14 Year 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Year' attribute.
15 Staffing Function 12/13/12 16:38 12/13/12 16:38 Started processing the 'Staffing Function' dimension.
16 Staffing Function 12/13/12 16:38 12/13/12 16:38 Started processing the 'Staffing Function' dimension.
17 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Repeat Caller' attribute.
18 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Repeat Caller' attribute.
19 PAC HV Cust 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC HV Cust' dimension.
20 PAC HV Cust 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC HV Cust' dimension.

Similar Messages

  • Hi frinds ,how to calculate the  totals in smartforms

    1)how to calculate the  totals in smartforms .

    Hi,
        To calculate totals and sub totals in sap scripts you can use subroutines.
    Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine
    /: DEFINE &TOT_PRICE&
    /: PERFORM F_GET_PRICE IN PROGRAM /:USING &KOMVD-KBERT& /:CHANGING &TOT_PRICE& /:ENDPERFORM
    Then write the variable where ever you want it to be printed (mostly it will be in footer window)
    Then create subroutine pool program and you have to write the code.
    FORM F_GET_PRICE tables int_cond structure itcsy
    outt_cond structure itcsy. data : value type kbert.
    statics value1 type kbert.
    Read int_cond table index 1.
    value = int_cond-value.
    value1 = value1 + value.
    Read outt_cond table index 1.
    outt_cond-value = value1.
    Modify outt_cond index 1.
    ENDFORM.
    regards..

  • How to contact the Dubai technical support for Iphone from outside dubai

    how to contact the Dubai technical support for Iphone from outside Dubai

    If you purcased your iPhone from one of the UAE cell carriers, you will need to find the support number for the carrier, Etisalat or DU, from which you purchased the iPhone. If you purchased your iPhone from the online Apple Store in the UAE, you can find their phone number here:
    http://support.apple.com/kb/HE57#U
    Regards.

  • How to calculate the total of bytes transferred when I submit a PDF Form in A. Reader

    Hello,
    I need to know some way for calculate the total of bytes transferred when I submit a PDF form using JavaScript, hereby:
    b ******************************************************************
    i var service_url = http://some_webservice/;
    i var send_type = "PDF";
    i var doc = event.target;
    i doc.submitForm( { cURL: service_url, cSubmitAs: send_type } );
    b ******************************************************************
    b The reason:
    I need to indicate the percentage of bytes sent to the server, in real time. Adobe Acrobat shows a progress bar and the transferred quantity in bytes, but Adobe Reader doesn't. Is in this case, when I need to find a way in order to make something similar.
    b Than you for your time.

    You can use SharePoint Designer and calculate the total in xslt view. Refer to the following post for more information
    http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2009/04/24/how-to-total-calculated-columns-in-a-sharepoint-list.aspx
    http://blog.metrostarsystems.com/2012/12/03/jennys-sharepoint-tip-sum-calculated-columns/
    Cheers,

  • How to calculate the total of a calculated column in a list view at the end of the view?

    I have a view with the following columns ProductName, Quantity, Price, Total The total column is a calculated column which is the product of quantity and price. I want to place the sum of the total column by the end of the list view. I can do this with
    the price and quantity but not with the total column. how do I do this?

    You can use SharePoint Designer and calculate the total in xslt view. Refer to the following post for more information
    http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2009/04/24/how-to-total-calculated-columns-in-a-sharepoint-list.aspx
    http://blog.metrostarsystems.com/2012/12/03/jennys-sharepoint-tip-sum-calculated-columns/
    Cheers,

  • How to calculate the total from users input in switch?

    I dont know how to hold the input from user. But here is part of my coding :
    System.out.println ("Type 1 for buying Ruler"+
    "\nType 2 for buying Pencil");
    stationaries = console.nextInt();
    switch (stationaries)
    case 1 : System.out.println("Ruler per unit : MYR1");
    System.out.println("How much does you want? : ")
    wantRuler = console.nextInt();
    sum = wantRuler * 1;
    break;
    case 2 : System.out.println("Pencil per unit : MYR2");
    System.out.println("How much does you want? : ")
    wantPencil = console.nextInt();
    sum = wantPencil * 2;
    break;
    How can I calculate the total for both of the stationaries if user wants 5 for ruler and 6 for pencil?

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.
    Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.

  • How to get the total execution time from a tkprof file

    Hi,
    I have a tkprof file. How can I get the total execution time. Going through the file i guess the sum of "Total Waited" would give the total time in the section "Elapsed times include waiting on following events:"
    . The sample of tkprof is given below.
    SQL ID: gg52tq1ajzy7t Plan Hash: 3406052038
    SELECT POSTED_FLAG
    FROM
    AP_INVOICE_PAYMENTS WHERE CHECK_ID = :B1 UNION ALL SELECT POSTED_FLAG FROM
      AP_PAYMENT_HISTORY APH, AP_SYSTEM_PARAMETERS ASP WHERE CHECK_ID = :B1 AND
      NVL(APH.ORG_ID, -99) = NVL(ASP.ORG_ID, -99) AND
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'ALWAYS' OR
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'CLEARING ONLY' AND
      APH.TRANSACTION_TYPE IN ('PAYMENT CLEARING', 'PAYMENT UNCLEARING')))
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute    442      0.08       0.13          0          0          0           0
    Fetch      963      0.22       4.72        350      16955          0         521
    total     1406      0.31       4.85        350      16955          0         521
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 173     (recursive depth: 1)
    Number of plan statistics captured: 1
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
             1          1          1  UNION-ALL  (cr=38 pr=3 pw=0 time=139 us)
             1          1          1   TABLE ACCESS BY INDEX ROWID AP_INVOICE_PAYMENTS_ALL (cr=5 pr=0 pw=0 time=124 us cost=6 size=12 card=1)
             1          1          1    INDEX RANGE SCAN AP_INVOICE_PAYMENTS_N2 (cr=4 pr=0 pw=0 time=92 us cost=3 size=0 card=70)(object id 27741)
             0          0          0   NESTED LOOPS  (cr=33 pr=3 pw=0 time=20897 us)
             0          0          0    NESTED LOOPS  (cr=33 pr=3 pw=0 time=20891 us cost=12 size=41 card=1)
             1          1          1     TABLE ACCESS FULL AP_SYSTEM_PARAMETERS_ALL (cr=30 pr=0 pw=0 time=313 us cost=9 size=11 card=1)
             0          0          0     INDEX RANGE SCAN AP_PAYMENT_HISTORY_N1 (cr=3 pr=3 pw=0 time=20568 us cost=2 size=0 card=1)(object id 27834)
             0          0          0    TABLE ACCESS BY INDEX ROWID AP_PAYMENT_HISTORY_ALL (cr=0 pr=0 pw=0 time=0 us cost=3 size=30 card=1)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                       350        0.15          4.33
      Disk file operations I/O                        3        0.00          0.00
      latch: shared pool                              1        0.17          0.17
    ********************************************************************************

    user13019948 wrote:
    Hi,
    I have a tkprof file. How can I get the total execution time.
    call count cpu elapsed disk query current rows
    total 1406 0.31 4.85 350 16955 0 521TOTAL ELAPSED TIME is 4.85 seconds from line above

  • How to determine the creation date/time for a file?

    The important operating systems maintain both a creation date/time and last modified date/time for files. But in the File class there is only a lastModified() method. How does one determine the creation date/time for a file?

    As far as i know, there is no way to know creation time, since it is a OS dependant information.

  • How to include the visa run-time into the installer?

    Dear All,
              I made an USB device whose driver is developed by "NI visa driver development wizard".
              In my program, the COM is also be used. When it is builded and creats the installer, I have checked the Serial Port Suport in Advanced settings in Installer which I thought the visa run-time engine is concluded. In fact, when it is installed, the COM can work correctly, but the USB device's driver can't be installed. To fix it, the visa run-time engine must be setupped again.
              I see that I can add it to "run executable after installation" but during the installaion of run-time engine, some pages will be displayed which need user to choose some option.
             Would you please give some suggestion that the process of installation is automatic. Certainly the part of visa run-time engine which the USB driver is needed can be integrated to the installer of vi(like COM) is best.
              Thank you!
    Hugo
    PS: I am using LabVIEW 7.1

    First, you can install a VISA Runtime Engine in the target PC, to verify it is VISA Run Time Engine issue.
    If so, you can add a VISA Run Time Engine in LabVIEW when creating an Installer. It is much easy in LabVIEW 8 and still possible in LabVIEW 7.1. Follow the link.
    http://digital.ni.com/public.nsf/allkb/E09BA0E2F31​D304F86256A640070058E?OpenDocument

  • How to Calculate the total orders for Items with supplier

    How do I write a function or SQL query that will give me the total quantity of an item that an organization has on order with other suppliers? Any help would be greatly appreciated. Thank you.

    It would help if you provided the description of the tables.
    To do totals by say item_id
    select item_id, sum(quantity)
          from supply_table A
          where org_id = 1
               and exists (select 1 from supplier B
                                         where a.org_id = b.org_id )
    group by item_id
    How do I write a function or SQL query that will give me the total quantity of an item that an organization has on order with other suppliers? Any help would be greatly appreciated. Thank you.

  • How to calculate the total of absences? How to collect data from a specific line of a table?

    Hi,
    Again, I made a nice coloured picture from a screen capture which summarise the improvements that I would like to make in my form,
    Situation:
    For an educational purpose, I made this form   to simplify the way of recording the data and also to develope the independence of the students.
    ( I am doing this on a voluntary basis, working extra hours on my free time but I don't really mind because I am learning a lot of things in the same time)
    After being tested by the teacher, the student has to record the short date, the lines memorised, his grade, number of mistakes, and his attendance.
    I created everything in Word, then converted the file in PDF, then I created all the different fields with Adobe acrobat.
    There is in total 4 sheets, there are all similar except the first one in which there is a box with: date started, date finished, total time spent, absences.
    Below this box there is a table with 16 lines from (A to P) and 7 columns (Days, Date, From.. to.. , Grade, No. lines memorised, No. Errors, Attendance) ( so this table is present on all the sheets)
    Due to the fact that some students need more time than others, and also beacause some text need more time, I estimated a need of 4 sheets at the very most.
    I would like to make the following amelioration and automate the inputting of some of the data because I know that some of the students will certainly forget, so to avoid this scenario I am trying to make this form the easiest possible.
    screen capture of the form:
    screen capture of the form editing, you can see the names of the different fields:
    here is the form (only the first page) : http://cjoint.com/12fe/BBotMMgfYIy_memorisation_sheet_sample.pdf
    In  yellow 00000:
    At present, the students has to input the total of absences manually, is there a way ( script) to automate this by initialising the field next to "Absences" at  " 0 day"   and then everytime that Absent is selected from the COMBO BOX, it add 1 and it is displayed like this:  " 1 day" then " 2 days"  then " 3 days" etc … (so from what I read I have to initialise a counter a the beginning and then for (i...   ) count= count++; something like this...
    Furthermore, I need a solution to overcome the possibility that a second sheet may be needed for the same student; therefore I would need the data from the "attendance column" from the second sheet ( and perhaps the 3rd and 4th aswell) to be added on the "absences field" in the first sheet
    My idea: everytime that the short date is inputted in the first line (next to A) in the "Date" column of one of the 4 sheets then we check the 16 Combo box of the attendance column in this sheet instead to check 16*4=64 fields fot the 4 sheets in one go?
    but I don't know at all how to write it in Javascript. Or perhaps there is a way more easier than that?
    Shall I allocate a value for Absent on the “ export value”?
    In purple
    At present I wrote a simple script which matches the number of lines to the poem selected (Eg.  if I select the poem V.Hugo,  the number "36" will appear next to Number of lines).
    Again I would like the make the life of the students very easy so I would like a script which detects this number “36” on the "From .. to …" column,  as soon it is detected (on the first sheet or 2nd or 3rd or 4th)  check from the same line if "A / Pass" or "B / Pass" have been selected in the "Grade" column ,if yes the short date inputted on this line will be written on the field next to "Date finished" .
    this is a simple example with 36 lines only but somethimes, the students may have to memorise 80 lines and more, this is the reason for having 4 sheets in total.
    So basically I would like to automate the field next to" Date finished:" with a script that collect the short date from the day in which the student has finished his memorisation with "A / Pass" or "B / Pass"
    As for the "Total time spent" George Johnson helped me with a script that calculate the difference betwen date started and date finished (thank you)
    I am sollicting your help, because after trying for hours I was really confused with the different if/else needed. And in top of that, it’s my first experience with Javascript.
    I anticipate your assistance, thanking you in advance.

    I found this for counting the absences, its give you the total that's perfect, but is there a better methode which avoid me to write all the fields name, more simple????
    ( I found the idea here : Re: Total number added automatically  )
    // custom calculation script for field "Total #"
    function CountFields(aFields) {
    var nFields = 0;
    for(i = 0; i < aFields.length; i++) {
    try {
    // count null values, export value of Absence is 0;
    if(this.getField(aFields[i]).value == "0") nFields++;
    } catch(e) {
    if(e['message'] == "this.getField(aFields[i]) has no properties") app.alert("unknown field name: " + aFields[i]);
    else app.alert(e.toString());
    } // end catch
    } // end for aFields
    return nFields;
    // create array of field names to count
    var aNames = new Array("Sheet1AttendanceA","Sheet1AttendanceB","Sheet1AttendanceC","Sheet1AttendanceD","Sh eet1AttendanceE","Sheet1AttendanceF",
    "Sheet1AttendanceG","Sheet1AttendanceH","Sheet1AttendanceI","Sheet1AttendanceJ","Sheet1Att endanceK","Sheet1AttendanceL",
    "Sheet1AttendanceM","Sheet1AttendanceN","Sheet1AttendanceO","Sheet1AttendanceP" );
    // count the non-null fields;
    event.value = CountFields(aNames);
    As for the 2nd question, I've tried to do something similar to the previous script, but of course it doesn't work, but I am quite sure that the idea is similar:
    I don't know also how to add the other condition: the student should get A / Pass or B / Pass in order to consider he has finished??? and also how to check these condition from page 2, 3 and 4 and collect the date
    function Datefinished(bFields) {
    d2.value = nFields[i].value;
    for(i = 0; i < aFields.length; i++) {
    try {
    if(this.getField(aFields[i]).value == this.getField("NumberLines").value) d2.value = nFields[i].value;
    } catch(e) {
    if(e['message'] == "this.getField(aFields[i]) has no properties") app.alert("unknown field name: " + aFields[i]);
    else app.alert(e.toString());
    } // end catch
    } // end for aFields
    return nFields;
    // create array of field names to check
    var aNames = new Array("Texte00","Texte54","Texte56","Texte58","Texte60","Texte62","Texte64","Texte66","Te xte68","Texte70","Texte72","Texte74","Texte76","Texte78","Texte80","Texte82");
    var bNames = new Array("d1","d3","d4","d5","d6","d7","d8","d9","d10","d11","d12","d13","d14 ","d15","d16","d17");   // d1 is included because in some cases a student can finish in 1 day (short text);

  • How to calculate the total sum value of a particular field that repeats

    Hi All,
    I have the following Req...File----Idoc Scenario
    In the Inbound xml file i will get the Sales Order details with suppose 10 line items( 10 Orders)
    Each line item represents one one SO. So totally i wil have 10 Sales Orders in this file.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Sales_Order xmlns:ns0="http://sap/Sales_Order">
       <Header>
          <COMP_CODE></COMP_CODE>
          <DOC_TYPE></DOC_TYPE>
           <SUPPL_VEND></SUPPL_VEND>
       </Header>
       <Item>
          <ITEM></ITEM>
          <MATERIAL></MATERIAL>
          <PLANT></PLANT>
          <QUANTITY></QUANTITY>
          <Amount></Amount> 
    </Item>
    In the above structure Item Segment will repeats as many no. of Sales Orders comes in a file.
    In a file if there are 10 Orders means the Item segment wil repeats 10 times.
    I have the Amount field in the Item Segment, each and every time that needs to be added to next Amount value that presents in the next Line Item.
    Finally i will have the Another separate field caled Grand Total, and i have to get the total summation of the 10 values of the Amount field at last.
    Can we achieve this using UDF or is there any way to do this
    REgards

    Hi,
    Do like this, actually in your case sum is taking place before the condition check for discount type
    do a little change in mapping
    DiscntType--removeContext--
                                              EqulsS-------IfWithoutElse----Amount---removecontext--then---SUM-
    Connstatnt(Value)
    --->GrandAmount
    Krishna, Check the same question asked by Rajesh in thread Calculate totals of segments that occur multiple times
    Thanks!

  • Need to know how to find the last execution time for a function module

    HI all
    I need to know
    1) How to find out the last execution time of the function module ?
      say for eg. I have executed a func. module at 1:39pm. How to retrieve this time  (1:39pm)
    2) I have created 3 billing document in tcode VF01 i.e 3 billing doucment no. would be created in SAP TABLE "VBRP" b/w 12am to 12:30 am.
    How to capture the latest SAP database update b/w time intervals?
    3) Suppose I am downloading TXT file using "GUI_DOWNLOAD" and say in 20th record some error has happened. I can capture the error using the exception.
    Is it possible to run the program once again from 21st records ? All this will be running in background...
    Kindly clarify....
    Points will be rewarded
    Thanks in advance

    1.Use tcode STAT input as Tcode of Fm and execute .
    2. See the billing documents are created in table VBRk header and there will always be Creation date and time.
    VBRk-Erdat "date ., u can check the time field also
    So now if u talk the date and time we can filter then display the records in intervals.
    3. with an error exeption how is my txt download finished .
    once exception is raised there will not be a download .
    regards,
    vijay

  • How to calculate the number of times an user has accesed a BEx report

    Hi Experts,
    We have number of reports in our BW portal and users logon to the portal and run the reports.
    How do we count the number of times each user has logged in and ran each report.
    Kindly advice.
    Thanks,
    Sai

    Hi Sai:
    I think you can use BI statistics information, which could provide you more detail information.
    You can follow the document
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90080703-4331-2a10-cd98-9c1e95acdea0
    Regards,
    Louis Lu

  • [Forum FAQ] How to calculate the total count of insert rows within a Foreach Loop Container in SSIS?

    Introduction
    We need to loop through all the flat files that have the same structure in a folder and import all the data to a single SQL Server table. How can we obtain the total count of the rows inserted to the destination SQL Server table?
    Solution
    We can use Execute SQL Task or Script Task to aggregate the row count increment for each iteration of the Foreach Loop Container. The following steps are the preparations before we add the Execute SQL Task or Script Task:
    Create a String type variable FilePath, two Int32 type variables InsertRowCnt and TotalRowCnt.
    Drag a Foreach Loop Container to the Control Flow design surface, set the Enumerator to “Foreach File Enumerator”, specify the source folder and the files extension, and set the “Retrieve file name” option to “Fully qualified”.
    On the “Variable Mappings” tab of the container, map the variable FilePath to the collection value.
    Drag a Data Flow Task to the container, in the Data Flow Task, add a Flat File Source, a Row Count Transformation, and an OLE DB Destination, and join them. Create a Flat File Connection Manager to connect to one of the flat files, and then configure the
    Flat File Source as well as the OLE DB Destination adapter. Set the variable for the Row Count Transformation to “User::InsertRowCnt”.
    Open the Property Expressions Editor for the Flat File Connection Manager, and set the expression of “ConnectionString” property to
    “@[User::FilePath]”.
    (I) Execute SQL Task Method:
    In the Control Flow, drag an Execute SQL Task under the Data Flow Task and join them.
    Create one or using any one existing OLE DB Connection Manager for the Execute SQL Task, set the “ResultSet” option to “Single row”, and then set the “SQLStatement” property to:
    DECLARE @InsertRowCnt INT,
                   @TotalRowCnt INT
    SET @InsertRowCnt=?
    SET @TotalRowCnt=?
    SET @TotalRowCnt=@InsertRowCnt+@TotalRowCnt
    SELECT TotalRowCnt=@TotalRowCnt
    On to parameter 1. 
    On the “Result Set” tab of the Execute SQL Task, map result 0 to variable “User::TotalRowCnt”.
    (II) Script Task Method:
    In the Control Flow, drag a Script Task under the Data Flow Task and join them.
    In the Script Task, select variable InsertRowCnt for “ReadOnlyVariables” option, and select variable TotalRowCnt for “ReadWriteVariables”.
    Edit the Main method as follows (C#):
    public void Main()
    // TODO: Add your code here
    int InsertRowCnt = Convert.ToInt32(Dts.Variables["User::InsertRowCnt"].Value.ToString()
    int TotalRowCnt = Convert.ToInt32(Dts.Variables["User::TotalRowCnt"].Value.ToString());
    TotalRowCnt = TotalRowCnt + InsertRowCnt;
    Dts.Variables["User::InsertRowCnt"].Value = TotalRowCnt;
    Dts.TaskResult = (int)ScriptResults.Success;
              Or (VB)
              Public Sub Main()
            ' Add your code here
            Dim InsertRowCnt As Integer =        
            Convert.ToInt32(Dts.Variables("User::InsertRowCnt").Value.ToString())
            Dim TotalRowCnt As Integer =
            Convert.ToInt32(Dts.Variables("User::TotalRowCnt").Value.ToString())
            TotalRowCnt = TotalRowCnt + InsertRowCnt
            Dts.Variables("User::TotalRowCnt").Value = TotalRowCnt
            Dts.TaskResult = ScriptResults.Success
           End Sub
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Microsoft SQL Server 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hi ITBobbyP,
    If I understand correctly, you want to load data from multiple sheets in an .xlsx file into a SQL Server table.
    If in this scenario, please refer to the following tips:
    The Foreach Loop container should be configured as shown below:
    Enumerator: Foreach ADO.NET Schema Rowset Enumerator
    Connection String: The OLE DB Connection String for the excel file.
    Schema: Tables.
    In the Variable Mapping, map the variable to Sheet_Name, and change the Index from 0 to 2.
    The connection string for Excel Connection Manager is the original one, we needn’t make any change.
    Change Table Name or View name to the variable Sheet_Name.
    If you want to load data from multiple sheets in multiple .xlsx files into a SQL Server table, please refer to following thread:
    http://stackoverflow.com/questions/7411741/how-to-loop-through-excel-files-and-load-them-into-a-database-using-ssis-package
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • Contact Pictures not displaying in texts...

    At some point yesterday my contact pictures has stopped showing up in text messages. They still appear when calls are placed and in the actual contact information, but no longer are in texts. I have restarted my phone and also shut it off for over an

  • Touch Up Text Tool

    Hi, I ran OCR on a document and wante to play with the touch up text tool.  The issue is, I don't know how to view how acrobat has interpreted the words, so how can I figure out what it has got wrong or right without converting to word etc first.  I

  • T430 cannot duplicate desktop on external display

    I am having a problem with my brand new T430.  I have purchased a miniDP to HDMI adapter, if I connect the adapter to my thinkpad and then an HDMI cable from the adapter to the external monitor it will correctly duplicate the display. However when I

  • VIDEO MOVIE MENU  FIFTH SCENE SELECTION DOES NOT SHOW

    IN ANY OF THE FIVE MENU SCREENS WHY? HOW DO I ADD THE VISIBLE MARKER TO CREATE THE FIFTH SCENE SELECTION FOR EACH SCENE SELECTION MENU. I HAVE FIVE SCENE SELETION MENUS WITH 5 OPTIONS FOR EACH ONE. I ADD THE MARKER BUT IT DOES NOT SHOW THE VIDEO CLIP

  • Need to send in my iPad

    i need to send it my iPad mini i have my repair ID but where do i go from there ??