Different Number of Records

Good Morning All,
I'm using a SSIS package to load data into the DWH. The source is ORACLE and destination is SQL SERVER. My first question is :
1) There is a column in the source table "FULLDATETIME" datatype "DATE". But when i load it into the SQLSERVER its stored as date with timestamp.
For example in the source column if the value is "05-FEB-14" in the destination table its loaded as "2014-02-05 21:15:00.000".I'm not using any transformation it is a straight load.
2) My second question is i want to schedule this package to just load the delta records, for this i'm using the FULLDATETIME column from the Source table and want to load just the previous date's records. Please see the below queries i'm getting two different
sets of records. The first SQL is giving me 5 records and the second one is giving me 1619 records. I'm confused as both queries mean the same.
select t1.*,t2.year,t2.monthofyear,t2.dayofmonth,t2.fulldatetime
from TABLEA t1
inner join TABLEB t2
on t1.intervalkey=t2.datekey
where t2.fulldatetime=trunc(sysdate)-2
select t1.*,t2.year,t2.monthofyear,t2.dayofmonth,t2.fulldatetime
from TABLEA t1
inner join TABLEB t2
on t1.intervalkey=t2.datekey
where t2.year=2014
and t2.monthofyear=2
and t2.dayofmonth=5
Please advice as what i'm overlooking here.
Thanks

Thanks Tom Phillips,
If you look at my above queries i'm joining those to load the first table TABLEA every night with the delta records. When you said that the YEAR, MONTHOFYEAR and DAYOFMONTH are not based on FULLDATETTIME i'm confused as all these columns are part of the
TIME DIMENSION table in the Source, on the othr hand in my second query i have FULLDATETIME field and when i run the sql for the 1619 records it shows the '05-FEB-2014' Value. Is there a way where i can load just the records from the previous day based on
these fields (YEAR,MONTHOFYEAR,DAYOFMONTH)?
e

Similar Messages

  • Different number of records in RSA3 for Full and INIT

    Hi All,
    I am about to load the data from 0FI_GL_4 and checked it in RSA3 for the number of records. It returned different number of records when I run the extract with options 'F' and 'C'. Why is it so? This is the first time I am loading the data into BW for this datasource. I would expect the number of records to be same if I do either a full extract or an init but surprised by seeing different number of records.
    Best Regards,
    James.

    Hi James,
    Probably it's because of the time stamps stored in table BWOM2_TIMEST.
    If you run a delta init and than a delta update then the number of the records should match with the record of the full update.
    You can find some more info about table BWOM2_TIMEST here:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a7f2f294-0501-0010-11bb-80e0d67c3e4a#527,7,Timestamp%20Mechanism:%20New%20documents
    Bye,
         Zsolt

  • COPA pulling different number of records each time?

    Dear Friends,
    I ran a COPA full load for (with Infosource 1_CO_PA_COSTING and) for a the same range of 0FISCPER (three periods)and the load brought different no of records each time. It brought 30,000 records the first time, 3 the second time and 1 the third time. All these loads were run with in 10 minutes. What possibly is the reason? Please share your thoughts?
    Thanks
    Raj
    Message was edited by: Raj Singh

    Dear Friends,
    I ran a COPA full load for (with Infosource 1_CO_PA_COSTING and) for a the same range of 0FISCPER (three periods)and the load brought different no of records each time. It brought 30,000 records the first time, 3 the second time and 1 the third time. All these loads were run with in 10 minutes. What possibly is the reason? Please share your thoughts?
    Thanks
    Raj
    Message was edited by: Raj Singh

  • Procedure inserting different number of records in GT table

    I have procedure, in the procedure a dynamic query is get created. Then query is open using OPEN for statement into refcusror. Then I'm fetching the data into record type object within a loop..end loop and inserting the records in a GT table.
    But problem is for the same data procedure is inserting less records, when i recomplie the procedure it began to insert correct number of data.
    I wonder whether is environment issue or something else? Please advise if any one faced such type problem.

    Hi upennit. Not much info to go on there.
    Have a read of Re: 2. How do I ask a question on the forums?
    then post back with some relevant info.

  • JDBC Sender - Different number of records selected and updated.

    Hi people,
    We have a JDBC -> Abap proxy scenario. The JDBC sender is pooling an Oracle database to retrieve data from a table X, each 30 minutes. The select and update statements in jdbc sender are below
    SELECT FIELD1, FIELD2, FIELD3 FROM MY_TABLE WHERE STATUS = 1
    UPDATE MY_TABLE SET STATUS = 2 WHERE STATUS = 1
    Sometimes the message sent to Abap proxy has, for example, 400 records. Looking at runtime workbench, message monitoring, for the same message there is a log like this
    Channel SENDER_JDBC_CHANNEL: Query executed successfully. Start update
    Channel SENDER_JDBC_CHANNEL: 510 row(s) updated successfully
    Someone has already experienced something like this? How can I handle this to guarantee to update only those read records?
    regards.
    roberti

    Hi All,
    Even we are facing the same problem.
    In our scenario, receiver is SAPR3. (IDOC)
    Will this parameter serialization work in our case?
    1. SELECT XBLNR, WERKS, MATNR, MDV01, BACKFLQUANT, STATUS, SAPTIMESTAMP, PITSTIMESTAMP, PMTIMESTAMP, BATCH FROM PMBPITS.PITS_UNITY WHERE STATUS = '01' and rownum<200 . 
    2. UPDATE PMBPITS.PITS_UNITY SET STATUS = '02' , SAPTIMESTAMP = sysdate WHERE STATUS = '01' and rownum<200  ( currently the value is rownum < 5 )
    Thanks!!
    Regards
    Gouri

  • SD extractors - different number of records in RSA3 and in the table MC*

    Hi
    After deleting setup tables and creating it again
    for extractor 2LIS_11_VAITM
    I have
    in RSA3 - 64686 records
    but
    in MC11VA0ITMSETUP structure only 14857.
    The same situation is for 2LIS_11_VASTI.
    Where this difference is getting from?
    Thanks
    PWnuk

    The reason is that the MC* setup tables "cluster" the data, so there is not a 1 to 1 match in record count.  Therefore, you shouldn't validate using record counts between the setup tables and RSA3.
    See these links:
    Re: no of records in setup tables
    Hope this helps

  • Mysql query returns different number of records from coldfusion and navicat

    Hi
    I'm hoping that someone can suggest a basic strategy to debug this.
    I have a fairly large and complicated query that is executed by a function in a cfc.
    It returns (for example) 100 rows.
    If I use cfdump and then copy and paste the SQL of the query (with the variables, of course) into Navicat and execute exactly the same query on the same mySQL database, it returns 130 rows.
    Same SQL string, same database, same data - the only difference is that in one instance Navicat submits the query and in the other, Coldfusion does.
    Has anyone ever had anything like this happen before?

    Ok I found my own bug. Of *course* the sql queries were not identical.. they could not possibly have been. My mistake was thinking that they were.
    The problem was part of the WHERE clause:
    AND orderid in (500,503,505)
    In the coldfusion code this was
    AND orderid in (<cfqueryparam cfsqltype="cf_sql_varchar" value="#lstOrderID#">)
    which of course rendered in mySQL as AND orderid in ('500,503,505')
    This was not immediately apparent as the cfdump returns this as AND orderid in (?) with the variable in the array below.

  • Hierarchy datasource is showing wrong number of records

    Hi,
    I have to load hierarchies from r/3 to BW.when i test my hierarchy DataSource in RSA6 number of records its showing is 40,where as my R/3 system has 45 records for the same hierarchy.Can any one please let me know why its showing different number of records and how to overcome this problem.

    Hello VaKa,
    How r u ?
    Just load the data to the PSA and identify which records are missing, you can do this, u have small amount of data. Then you can identify which 5 records are missing and it will help to find the reason as well.
    Best Regards....
    Sankar Kumar
    +91 98403 47141

  • Hw to find total number of records

    Hi All,
    Can anyone help from these
    1. how to find total number of reports for a particular cube/ods... need step - step solution
    2. how to find total number of records for a particular Cube and ODS and Aggr's to till date.
    3.what is sandbox,mirror sys,instance of a sys..?
    4.what r TWS(Tivoli Workload Scheduler) jobs? how these r different to standard schedulers?
    Thanks in ADv
    Linda

    Hello Linda,
    As you have lots of answers on first 2 so i'll start from 3rd onward.
    3. Sandbox is mostly practice system where you can do all kind of R&D, mirror sys can be mirror image of any system depends on the organization and instance of system is again mirror image of one system.
    4. TWS is third party tool for scheduling which doesn't come along with SAP like standard scheduler as TWS has been prepared specially for this purpose so it has some more features than standard.
    Hope it helps.
    San.

  • How to count and display the number of records in a database table

    My webpage has a list of items and their details, every item has a button
    Read / Make comments that loads the item in its own page displaying
    a comments form and previous comments.
    This is all working fine.
    I would like to add to each item information stating how many comments have
    been made about that item.
    Allowing the user to see before hand if it is worth while clicking on the
    Read / Make comments button.
    Ideally each item will have a different number of comments.
    The problem I have is outputing the number of comments associated with each item.
    My comments table is called guest my items table is called titles.
    I'm sure mysql statement is correct -
    The table guest currently has 7 comments,
    Item 1 has 3 comments
    Item 2 has 2 comments
    Item 3 has 1 comment
    Item 4 has 1 comment
    When I test the query in dreamweaver
    $Recordset1 = "SELECT COUNT(guest.software_id) as COUNT, titles.id FROM titles LEFT JOIN guest ON titles.id = guest.software_id GROUP BY guest.software_id";
    the outoput is a list showing 2, 3, 1, 1
    My problem is, getting the totals into my repeat region.
    I tried the following line
    <td align="left" valign="top" bgcolor="#e5f8cb">Current comments:<?php echo $row_Recordset1['COUNT']; ?></td>
    resulting in all comments so far displaying 0
    I have highlighted in bold the parts that I am having difficulty with.
    <?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;
    $colname_rsTitles = "-1";
    if (isset($_GET['id'])) {
      $colname_rsTitles = $_GET['id'];
    mysql_select_db($database_abe, $abe);
    $query_rsTitles = sprintf("SELECT title, company, `description`, resources, location, url, image, keyword, copies FROM titles WHERE id = %s ORDER BY id ASC", GetSQLValueString($colname_rsTitles, "int"));
    $rsTitles = mysql_query($query_rsTitles, $abe) or die(mysql_error());
    $row_rsTitles = mysql_fetch_assoc($rsTitles);
    $totalRows_rsTitles = "-1";
    if (isset($_GET['id'])) {
      $totalRows_rsTitles = $_GET['id'];
    $colname_rsTitles = "-1";
    mysql_select_db($database_abe, $abe);
    $query_rsTitles = sprintf("SELECT title, company, `description`, resources, location, url, image, keyword, copies FROM titles WHERE id = %s ORDER BY id ASC", GetSQLValueString($colname_rsTitles, "int"));
    $rsTitles = mysql_query($query_rsTitles, $abe) or die(mysql_error());
    $row_rsTitles = mysql_fetch_assoc($rsTitles);
    $totalRows_rsTitles = mysql_num_rows($rsTitles);
    mysql_select_db($database_abe, $abe);
    $query_rs_comments = "SELECT * FROM guest";
    $rs_comments = mysql_query($query_rs_comments, $abe) or die(mysql_error());
    $row_rs_comments = mysql_fetch_assoc($rs_comments);
    $totalRows_rs_comments = mysql_num_rows($rs_comments);
    mysql_select_db($database_abe, $abe);
    $query_rs_users = "SELECT * FROM users";
    $rs_users = mysql_query($query_rs_users, $abe) or die(mysql_error());
    $row_rs_users = mysql_fetch_assoc($rs_users);
    $totalRows_rs_users = mysql_num_rows($rs_users);
    mysql_select_db($database_abe, $abe);
    $query_Recordset1 = "SELECT COUNT(guest.software_id) as COUNT, titles.id FROM titles LEFT JOIN guest ON titles.id = guest.software_id GROUP BY guest.software_id";
    $Recordset1 = mysql_query($query_Recordset1, $abe) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    mysql_select_db($database_abe, $abe);
    if(!isset($_POST['softwareLevel'])){
    if (!isset($_GET['class_id'])) {
    //show all software titles
    $query_rsTitles = "SELECT id, title, company, `description`, resources, location, url, image, keyword, copies FROM titles ORDER BY id ASC";
    }else{
    //show software titles filtered by Literacy of Numeracy (using URL GET variable)
    $query_rsTitles = "SELECT id, title, company, `description`, resources, location, url, image, keyword, copies FROM titles WHERE titles.class_id = ". GetSQLValueString($_GET['class_id'], "int") ." ORDER BY id ASC";
    }else{
    //show software titles filtered by Level (using Form POST variable)
    $query_rsTitles = "SELECT id, title, company, `description`, resources, location, url, image, keyword, copies FROM titles WHERE titles.level_id = ". GetSQLValueString($_POST['softwareLevel'], "int") ." ORDER BY id ASC";
    $rsTitles = mysql_query($query_rsTitles, $abe) or die(mysql_error());
    $row_rsTitles = mysql_fetch_assoc($rsTitles);
    $totalRows_rsTitles = mysql_num_rows($rsTitles);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <?php $pagetitle="ABE Software Locator"?>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php echo $pagetitle ?></title>
    <link rel="stylesheet" href="../../includes/styles.css" type="text/css" media="screen" />
    <style type="text/css">
    body {
    background-color: #FFF;
    </style>
    </head>
    <body>
    <?php include("../../includes/header.php"); ?>
        <div><table width="70%" border="0" align="center" cellpadding="3" cellspacing="0">
      <tr>
        <td width="29%" height="50" align="center"><a href="software_detail.php">Back to Locator</a></td>
        <td width="50%" align="center"><a href="../../index.php">Welcome Page</a></td>
        <td width="21%" align="center"><a href="../../logout.php">Log Out</a></td>
      </tr>
      <tr>
        <td colspan="3" align="center"><strong> There Are <span class="totalrecordsnumber"><?php echo $totalRows_rsTitles ?></span>  Software Titles Listed</strong></td>
      </tr>
      <tr>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
    </table>
        <?php do { ?>
          <table width="820" border="0" align="center" cellpadding="3" cellspacing="2">
            <tr>
              <td width="206" height="200" rowspan="3" align="center" bgcolor="#FFFFFF"><img src="images/<?php echo $row_rsTitles['image']; ?>" alt="<?php echo $row_rsTitles['title']; ?>" /></td>
              <td colspan="3" align="center" bgcolor="#086b50"><h2><?php echo $row_rsTitles['title']; ?></h2></td>
            </tr>
            <tr>
              <td colspan="3" align="center" bgcolor="#f6b824"><strong>Made by:</strong> <?php echo $row_rsTitles['company']; ?></td>
            </tr>
            <tr>
              <td colspan="3" align="left" valign="top" bgcolor="#e5f8cb"><p class="ptaglineheight"><strong>Description: </strong><?php echo $row_rsTitles['description']; ?></p></td>
            </tr>
            <tr>
              <td colspan="2" align="left" valign="top" bgcolor="#e5f8cb"><span class="tabletext"><strong>Keywords</strong></span><strong>: </strong><?php echo $row_rsTitles['keyword']; ?></td>
              <td colspan="2" align="left" valign="top" bgcolor="#e5f8cb"><strong>Resources:</strong> <?php echo $row_rsTitles['resources']; ?></td>
            </tr>
            <tr>
              <td colspan="4" align="left" valign="top" bgcolor="#e5f8cb"><strong>Web Address:</strong> <a href="<?php echo $row_rsTitles['url']; ?>" target="_blank"><?php echo $row_rsTitles['url']; ?></a></td>
            </tr>
            <tr>
              <td colspan="3" align="left" valign="top" bgcolor="#e5f8cb"><strong>Is installed on:</strong> <?php echo $row_rsTitles['location']; ?></td>
              <td width="195" align="left" valign="top" bgcolor="#e5f8cb"><strong>Copies available:</strong><?php echo $row_rsTitles['copies']; ?></td>
            </tr>
            <tr>
              <td colspan="3" align="left" valign="top" bgcolor="#e5f8cb"><a href="fulltitle.php?software_id=<?php echo $row_rsTitles['id']; ?>&amp;id=<?php echo $row_rsTitles['id']; ?>">Read / Make Comments About This Software</a></td>
              <td align="left" valign="top" bgcolor="#e5f8cb">Current comments:<?php echo $row_Recordset1['COUNT']; ?></td>
            </tr>
          </table> 
          <br />
          <?php } while ($row_rsTitles = mysql_fetch_assoc($rsTitles)); ?>
        </div>
        <?php include("../../includes/footer.php"); ?>
    </body>
    </html>
    <?php
    mysql_free_result($rsTitles);
    mysql_free_result($rs_comments);
    mysql_free_result($rs_users);
    mysql_free_result($Recordset1);

    I changed the mysql as you suggested GROUP BY titles.id
    and added a while loop to iterate over the data
    mysql_select_db($database_abe, $abe);
    $query_Recordset1 = "SELECT COUNT(guest.software_id) as COUNT, titles.id FROM titles LEFT JOIN guest ON titles.id = guest.software_id GROUP BY titles.id";
    $Recordset1 = mysql_query($query_Recordset1, $abe) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    $row_Recordset1 = mysql_query($query_Recordset1) or die(mysql_error());
    <td>Current comments:<?php
    if($row_Recordset1)
    while($row = mysql_fetch_array($row_Recordset1))
    echo $row['COUNT'];
    } ?></td>
    The first item now displays the following,
    comments:2311000000000000000000000000000
    all others
    comments:
    the number matched the database table exactly, 30 records 4 of which have 2, 3, 1, 1 comments.
    It looks as if the problem is trying to get the repeat region to pick up on it!

  • Determine the number of records in a file

    I want to analyse record types from a large input file and so far have managed to extract different groups and created the relevant files. All I want to do now is count the number of records in each file so I can produce a report showing the different types but cannot figure out how to do this, I know it will be simple but I cannot get any command to accomplish this, help please!

    in applescript, there are a few ways to count patterned text.  if (as jeffrey suggests) each record is a separate line, then you can use the following:
    set textContents to read "/path/to/file.txt"
    count of paragraphs of textContents
    if records are determined by some other process (such as a special delimiting character or phrase) you can use text items (replace the @ sign with the special character or phrase):
    set textContents to read "/path/to/file.txt"
    set {oldTID, my text item delimiters} to {my text item delimiters, "@"}
    set theCount to count of text items of textContents
    set my text item delimiters to oldTID

  • Web client returned different no. of records in same query

    May anyone can help me ?
    I am now using Web Client 9.2.0.0.196 Windows XP.
    I am only an user to retrieve records using one static query thorugh Hyperiion Interactive Reporting Web Client for business purposes. The back-end database would be updated monthly.
    We set the request and filter within one Dimension of the query. However, I tried the query 10 times, the number of records returned was different.
    I trired to set filter with different values. Sometimes, it gave me correct number of records and sometime it could not.
    My IT team reported that the Expert of Hyperion Verdor also cannot resolve my problem.

    As you are using the Web Client there are many parts involved in the process of your running a query.
    Below is an example of a very basic path a query takes to DB
    1. PC- Web Browser with Web Client
    2. Web Server
    3. Application Server
    a. Hyperion BI Server
    b, Hyperion DAS - Data Access
    4. Database.
    Anywhere between 1 and 4 there may be firewalls, network switches etc.
    If you are getting unexpected results on you query then I would start with taking the Query/SQL being sent via the Web Client and trying it on a SQL Client Tool for that Database from your PC and see what you get.
    Other Troubleshooting actions:
    - Have DBA monitor the Database and see if they can capture your SQL being sent and see if they can see if there are problems on DB.
    - Have Hyperion Administrator look at the Logs for the BI Server, DAS and Usage Tracking to see if there are any anomolies.
    - I would see if you are experiencing the same problem from a different workstation.
    - Check for Network Time Outs....How long is it taking for your Query to Run? Maybe you are dropping connection somewhere in the process.
    Hope this is helpful.
    Wayne

  • Number of records in trail files

    Hi,
    I have a extract group which captures the change data from many source tables and gives one kind of trail files in different sequence number.
    I would like to know the number of records per table in the trail files.I am not sure whether there is any log table which holds this information?
    Regards,
    Azim

    Dear ,
    Thanks for your reply.
    Could you please tell me what kind of checkpoints?
    Regards,
    Azim

  • Max number of records in MDM workflow

    Hi All
    Need urgent recommendations.
    We have a scenario where we need to launch a workflow upon import of records. The challenge is source file contains 80k records and its always a FULL load( on daily basis) in MDM. Do we have any limitation in MDM workflow for the max number of records? Will there be significant performance issues if we have a workflow with such huge number of records in MDM?
    Please share your inputs.
    Thanks-Ravi

    Hi Ravi,
    Yes it can cause performance overhead and you will also have to optimise MDIS parametrs for this.
    Regarding WF i think normally it is 100 records per WF.I think you can set a particular threshold for records after which the WF will autolaunch.
    It is difficult to say what optimum number of records should be fed in Max Records per WF so I would suggest having a test run of including 100/1000 records per WF.Import Manager guide say there are several performance implications of importing records in a WF,so it is better to try for different ranges.
    Thanks,
    Ravi

  • SPM Data Loads : Less number of records getting loaded in the Invoice Inbound DSO

    Dear Experts,
    We are working on a project, where data of different NON SAP Source Systems is being loaded into SPM, via Flat File Loads. We came across a very weird situation.
    For other Master and Transaction Data objects, it worked fine, but when we loaded Invoice File, less number of records are getting loaded in the Inbound DSO. The Invoice File contained 80000 records, but the inbound DSO has 78500 records only. We are losing out on 1500 Records.
    We are unable to figure out, as to which 1500 records are we missing out on. We couldn't find any logs, in the Inbound Invoice DSO. We are unable to find out if the records are erroneous, or there is any issue with something else. Is there a way to analyze the situation / Inbound invoice DSO.
    If there is any issue with the Outbound DSO or Cube, We know that it is possible to check the issue with the Data Load request, but for the Inbound DSO, we are not aware, as to which the way to analyze the issue, and why Inbound DSO is taking less records.
    Regards
    Pankaj

    Hi,
    Yes, It might be happen in DSO, because the data records have the simantic keys, so in Keyfileds selection you might have less no of records.
    If you have any rountines check the code(If any condetion for filtering the records).
    Regards.

Maybe you are looking for