Help me for getting data?

I have this case I want to resolved.
My data is following:
Cell          new_code     old_code
855123           DLC001           000001
852141           DLC002           000001
811790           DLC003           000001
914007           DLC002           000003
816725           DLC003           000007
923487           DLC001           000001
897683           DLC005           000005
897652           DLC005           000005
634876           DLC015           000002
789345           DLC020           000002
Requirement: How to show old_codes that contains much more than 2 new_codes and
     that new_codes are different.
Example: 000001 mapping to DLC001, DLC002, DLC003 -> show
     000007 mapping only to DLC003 -> do not show
     000005 having 2 records but it's the same -> do not show
     000002 mapping to DLC015, DLC020 -> show
Results that I wanted:
     old_code     num of new_code mapped
     000001          3
     000002          2
Can anyone help me?
Thanks in advance!
Xi`tin

Hi, Xi`tin,
COUNT, GROUP BY and HAVING can do that.
To count each new_code only once, say "COUNT ( *DISTINCT* new_code)"
SELECT    COUNT (DISTINCT new_code)    AS num
,         old_code
FROM      my_data
GROUP BY  old_code
HAVING    COUNT (DISTINCT new_code) > 1
;Untested.

Similar Messages

  • Want to create RFC FM for Getting data in CRM from R/3

    Hi,
    I have made the RFC connection in CRM system , now I want to make RFC FM for getting data from R/3 'MARD' table into CRM, If any one help me how to do this.
    From CRM system I will pass Plant & material no to FM and I need Storage location & Storage Bin from R/3 MARD table in CRM.
    Thanks
    Bobby

    Dear Bobby,
    You would create a FM in SE37 select 'Remote Enabled Module' radio-button in attributes tab of Function Builder.
    Select matnr werks LGORT LGPBE
               from MARD
               into ET_MARD
               where matnr = i_matnr
               and  werks = i_werks.
    Note:
    matnr is material number
    werks is plant
    LGORT is storage location
    LGPBE is storage bin
    Hope this will help.
    Regards,
    Naveen.

  • ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET

    HI ,
    CAN I HAVE ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET
    Regards,
    Aruna

    Standard ALV grid uses the FM <b>ALV_XXL_CALL</b> for exporting data into Excel. You can put a break-point in the FM and check it for urself.
    for ur info - the above FM takes the internal table name, internal table content and the field catalog as input.

  • Need help about RRD4J, get data from rrdb

    i need more help about roundrobin database, especially using RRD4J library.
    i want to know, if i have one file database data1.rrd and i specific want to get data from startTime to endTime.
    how i can get that data from that database, and move them to another database file data2.rrd.
    can i do this?

    thx jschell
    javadoc from rrd4j not clearly enough for me to understanding about prosesing add, update and get data in there, so i ask in this forum may be anyone can give me solution.
    i think it's simple problem but i don't know how to implement with this API.
    with rrd4j we can create roundrobin database (rrd), the output in example: data1.rrd
    i just want to get data that i had put in data1.rrd to move them to another rrd, example: data2.rrd.
    data1.rrd and data2.rrd, they have same lastupdate time.

  • Formatted Text Field for getting Date

    I need a text field to get Date. does anyone know where I can find such a thing?
    all it needs to do is allow the user to type a date in dd/MM/yy format.
    10x.

    in a jtable it has a problem - when I press tab to exit the field the date is not changed.
    i set the on focus lost behaviour to commit, but still not working.
    also, it allows me to enter 4823749823/02/02 - and it translates it to the right format - I'm interested in something more fixed - allows to enter only 2 digits for day, 2 digits for month,2 digits for year.
    the relevent code I'm using is:
    // a cellEditor that uses a formatted text field that holds a Date object
    public class JFormattedDateCellEditor extends DefaultCellEditor {
    public JFormattedDateCellEditor(final JFormattedTextField textField) {
    super(textField);
    textField.setFocusLostBehavior(JFormattedTextField.COMMIT);
    textField.setHorizontalAlignment(SwingConstants.RIGHT);
    textField.setFont(JUtility.theFont);
    textField.setBorder(null);
    textField.addFocusListener(new FocusAdapter() {
    public void focusLost(FocusEvent e) {
    if (textField.getValue() == null) {
    textField.requestFocus();
    delegate = new EditorDelegate() {
    public void setValue(Object value) {
    textField.setValue((java.util.Date)value);
    public Object getCellEditorValue() {
    return textField.getValue();
    //to set the cell editor:
    column = collectionsTable.getColumnModel().getColumn(CollectionFrame_collectionsModel.DATE_COLUMN);
    column.setCellEditor(
    new JFormattedDateCellEditor(
    new JFormattedTextField(
    new DateFormatter(
    new SimpleDateFormat("dd/MM/yy")))));

  • EJB-Archive for getting Data from the DB

    Hello,
    I want to get data from the Database. I created a EJB-Project with an Entity Bean and a Session Bean.
    The jar-Archive that I generated is corrupt. Is that normal?
    Can you provide me with information on database acces?
    In ABAP it would be a piece of cake: Select * from table into ...;-)
    Greetings, Frank

    Hi Frank,
    I see that you are interested in getting data from R/3, please correct me if I'm wrong.
    If that's so, you cannot do it by purely using EJBs, as an entity bean maps to a Table row in the database, which is not quite straight forward in terms of R/3.
    The only way to get data from R/3 is to use
    1)Java + SAP JCO
    2)or a Netweaver technology like Webdynpro + Adaptive RFC
    3)Portal Component + SAP JCO.
    Again, assuming you're dealing with a WebAS server, coming to EJBs, its no different to any other application server. So, you need an RDBMS to use Entity Beans.
    Please let me know if you've got more doubts.
    Regards,
    Rajit

  • Help, for getting data(photos, songs or vid) from multiple sources.....

    Here is a background of the situation. I've bought my Ipod, October 06. I still don't own a laptop or a PC due to the lack of space of living on a ship(Navy). When I got my Ipod I used a friend's laptop. I installed Itunes on there and was able to import songs I had from my collection of CDs and Photos. Just recently I separated from that command. Now I want to put some new songs and photos I've recently acquired. And I plan to use my girlfriend's laptop. She has her own Ipod therefore already has Itunes installed.
    Now my question is:
    Will I be able to get songs from her Itunes Library(that I've copied from my collection of CDs), AND new photos from her laptop and STILL retain the old songs and photos I already have on my Ipod.
    Thanks!

    heres a more simple answer...YES you can add more songs from your GF laptop or from any PC/laptop for that matter
    Just remember to have oyur IPOD to MANUALLY MANAGE SONGS
    if its in automatic mode, your ipod will be the mirror image of the pc you are syncing in...so if you sync with another pc in automatic, that pc's itunes library will be in your ipod and the old songs will be erased. so be in manual so you could sync from multiple computers.
    As far as pics are concerned, it a totally different matter, you cannot do it manually, since you specify the folder where the pics are stored, it copies whatever is inside that folder and erases the old ones. so pictures in ipod needs to be in just 1 pc, if you transfer to another pc it erases the old ones and brings in the pics from the new pc
    Clear?

  • Query for getting data for every quarter for financial year

    Hi,
    My problem is I need to get the data for every quarter for financial year and also I need data for every week for financial year.
    For example for financial year 2012-13, Apr2012 to Jun2012 would be Q1, Jul2012 to Sep2012 would be Q2 and so on. Total 8quarters should come upto Apr2013.
    In the same way  1st apr 2012 to 7th apr 2012 would be week1, 8th apr to 15th apr would be week2 and son on. How to write a query for this scenario in oracle. Can anybody help me on this. very urgent..
    Thanks in advance.

    lakmesri wrote:
    Hi,
    My problem is I need to get the data for every quarter for financial year and also I need data for every week for financial year.
    For example for financial year 2012-13, Apr2012 to Jun2012 would be Q1, Jul2012 to Sep2012 would be Q2 and so on. Total 8quarters should come upto Apr2013.
    In the same way  1st apr 2012 to 7th apr 2012 would be week1, 8th apr to 15th apr would be week2 and son on. How to write a query for this scenario in oracle. Can anybody help me on this. very urgent..
    Thanks in advance.
    How can you get 8 quarters within a year ? I'b be concerned here.
    lakmesri wrote:
    Hi,
    In the same way  1st apr 2012 to 7th apr 2012 would be week1, 8th apr to 15th apr would be week2 and son on. How to write a query for this scenario in oracle. Can anybody help me on this. very urgent..
    Thanks in advance.
    First, that question is really not clearly asked. Second how could it be urgent ? You even did not tell us your Oracle version, did not show any tables descr, output sample nor any effort on your side to work on.
    Nicolas.

  • CAT2 - Help required for changing data

    The requirement I have is, if the data is entered for a particular activity type in CAT2, and if it exceeds the default hours alloted for that week, the extra hours need to be split into different activity types.
    Say, this is the data entered: (Max of 35 Hrs per week as per IT0007) (Click on the link below to see sample data!)
    [http://img32.picoodle.com/img/img32/5/12/21/f_datam_9dfadb2.jpg]
    (The value for Thu is 5 and not 6 in the initial entry.)
    The data has to remain exact until it reaches 35 hours and then the extra hours need to be split and entered in a different activity type. (BU is also counted as regular working hours and value for BU is to remain same)
    I tried using the user-exit CATS0002 but since the user exit gets only the value of a single cell at a time, I am not able to process the data for my requirement. and this user exit is triggered only for the cells where the value is changed... if the data is already entered and the user changes some cell, I don't get the whole data entered and hence, I can't modify the already existing data on the timesheet.
    Has anyone coded for a similar scenario? Your help will be really appreciated.
    P.S: I am working on ECC 6.0

    Hi Nazim,
    There is an user-exit for validating the whole time sheet (I think it is  nr. 6, but I am not sure), in this one you could check all the hours, but I am not sure if it will suffice for your requirement.
    Regards,
    Martin

  • Need advice for getting data service while traveling abroad

    I will be traveling in Norway and England and want to be able to use GPS on my Galaxy S4.  I can get along without voice service, and can rely on wi-fi for email and internet access.  I will be traveling for about 3 weeks.  Any suggestions?

    All the advise you need is right here Spokaneman! We want you to enjoy your trip to Norway and England. Yes, you can use your phone for data while traveling. Here is a link to our Global trip planner to get all the information about cost and what is needed to use your phone http://vz.to/1aGvDAs . You can add our bundle plan for 100mb for $25.00 per month or voice/data bundle for 100minutes/100sent messages and 100mb for $40.00 per month . You can also pay as you go with is $0.02 cent per KB and $20.48 per mb. Voice calls and text are extra if you're interested in those features.
    KinquanaH_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • Search Help - logic for getting output.

    Hi,
    I am trying to create search help for Vendor number field. And input selection has a fields from various Vendor related tables ( LFA1,ADRC,LFB1,LFBK,LFBW,LFM1,LFZA).
    If user enters any of the input field values (from the above table selected fields)then need to get corresponding vendor number details  from all of the above tables(selected fields from the above tables).
    can any one let me know  how to compose the logic for this?
    1. I created search help and trying to put the logic in EXIT for the search help to get the values.
    Thanks in advance.
    Rajesh.

    rajesh,
    check tis out,
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee86446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/cf/21ee5f446011d189700000e8322d00/content.htm
    http://fuller.mit.edu/tech/search_helps.ppt#260,5,Simple
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
    http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee2b446011d189700000e8322d00/content.htm
    http://www.sap-img.com/abap/attach-a-search-help-to-the-screen-field.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/3d/e53642e2a3ab04e10000000a1550b0/content.htm

  • Help , How to get data from database using recordset with UI API

    I want to get a data from database
    when I want to create recordset i notice that UI API didn't has record set
    so I created recordset using DI API (SAPbobscom.recordset and SAPbobscom.company)
    ======================================================
    Dim oCompanyUI As SAPbouiCOM.Company <<UI API
    Dim oRecSet As New SAPbobsCOM.Recordset << DI API
    Dim oCompanyDI As New SAPbobsCOM.Company << DI API
    '=====================================================
    oCompanyDI.Connect
    Set oRecSet = oCompanyDI.GetBusinessObject(BoRecordset)
    oRecSet.DoQuery ("SELECT T0.CardCode, T0.CardName FROM OCRD T0")
    SBO_Application.MessageBox oRecSet.Fields.Item(1).Value
    ======================================================
    but I got an error it said "you are not connected to company"
    I'm really don't have an idea about how to get a data from using UI API (exp I want to get a date or costumer code)
    can someone help me please, I really need it
    Thanks

    you need a single sign on
            Dim oDICompany As SAPbobsCOM.Company
            Dim sCookie As String
            Dim sConnStr As String
            Dim ret As Integer
            oDICompany = New SAPbobsCOM.Company
            sCookie = oDICompany.GetContextCookie
            sConnStr = SBO_Application.Company.GetConnectionContext(sCookie)
            If oDICompany.Connected Then
                oDICompany.Disconnect()
            End If
            ret = oDICompany.SetSboLoginContext(sConnStr)
            If Not ret = 0 Then
                SBO_Application.MessageBox("set Login Context failed!")
                Exit Sub
            End If
            ret = oDICompany.Connect()
            If Not ret = 0 Then
                SBO_Application.MessageBox("Company Connect failed!")
            End If

  • Boolean Expression for get date

    Hi Experts,
    I am working boolean expression in ssis package. I want download files from ftp and the file name is mic_20141101-mi.txt. 
    I want to take yesterday files for that i am using expression but i want to give dynamic date which i want give in variable the specific date to download those files from FTP.
    For this process i am using Boolean Expression if i give the specific date in variable then its download specific date files from ftp or else its download yesterday files.
    Pls help to me for this scenario.
    Raj.

    You need to have a variable inside SSIS through which you pass the date value
    Once passed you can have a script task inside your package to check for the pattern of date variable value inside your file to select correct files
    see this for similar logic where i'm looking for files from current day
    http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Help required to get data from Cash Mgt

    Hi
    I need help to get following data from cash managemment .
    Bank Name
    Branch
    Account#
    Date
    cheque#/Ref
    Amount Direct Debited by bank
    Amount Direct credeted by bank.
    Kindly help
    Regards

    Hello.
    See if this helps. When the Amount column shows a negative number it represents a Debit.
    select b.bank_account_name "Bank Account" ,
    bb.bank_branch_name "Branch",
    b.bank_account_num "Bank Acc Num",
    l.trx_date "Date",
    l.trx_type "Type",
    l.trx_text "Description",
    l.amount "Amount"
    from ce_statement_headers_all h,
    ce_statement_lines l,
    ap_bank_accounts_all b,
    ap_bank_branches bb
    where b.bank_account_id = h.bank_account_id
    and l.statement_header_id = h.statement_header_id
    and bb.bank_branch_id = b.bank_branch_id
    and b.bank_account_id = <bank_account_id>
    and h.statement_number = <'statement number'>
    Octavio

  • "Wrong" User is used for getting Data via Gateway

    Hi experts,
    simple question:
    I have created a view which included a oDataModell, done like this:
    onInit: function() {
    var odataUrl = "/sap/opu/odata/sap/ZWWW_XXX/";
    var odataUser = "remoteuser";
    var odataPass = "pass";
    var oModel = new sap.ui.model.odata.ODataModel(odataUrl, false, odataUser, odataPass);
    sap.ui.getCore().setModel = oModel;
    this.getView().setModel(oModel);
    This is deployed in my Gateway Server (extra system), which will then gets the data from my SAP system.
    When I log on to my BSP page, I use my "normal" user (MFALLEN), perfect. Now, when the view needs the data, I am logged in to my SAP system also with my user (MFALLEN), not with my remoteuser (remoteuser) which I have added to the oModel.
    Is this the normal behaviour? Or am I doing something wrong? I want to use the remoteuser...
    Thanks
    Michael

    Could actually someone point me out if the second argument is mandatory?
    Yes, it is mandatory.
    The database has to know which encoding is used for the input file in order to load it correctly and convert data to the db charset (if necessary).
    If you don't know the encoding of the file, you can always assume one such as UTF-8, or the db charset itself that you can specify using nls_charset_id('CHAR_CS').
    That being said, the error you get is not expected. You should have received this :
    SQL> select xmltype(bfilename('DATA_DIR', 'units.xml')) from dual;
    select xmltype(bfilename('DATA_DIR', 'units.xml')) from dual
    ERROR at line 1:
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'
    which is much more clear.
    So I guess there's another problem going on here. You should report it to Oracle Support.

Maybe you are looking for

  • Language of material description in Outbound Delivery

    Hi, I have created an STO for a new Greek customer Plant and the communication language in the customer master data for this plant was set to Greek. As consequence, my Outbound Deliveries from an Italian Plant have been created with a Material Descri

  • Create "Object" Type based on columns of a table

    Hi Experts is it possible to create an Object Type based on columns of a table? for example the syntax for creation of type is CREATE OR REPLACE TYPE temp_t AS OBJECT (ID number, code number) can we create a type that is based on columns of an existi

  • V$sqltext & v$sqlarea

    I am trying to view the SQL that is being passed to my Oracle 10g server from my .NET app. In a previous post I was told to use the v$sqltext & v$sqlarea views. Using sqlplus from the command line, I am able to produce the 1 line that I believe is th

  • Virtual User Minutes in Visual Studio Online Account Not Updating

    Dear Team, I have conducted a LoadTest connecting to my VSO account and even after completing the test under Resource Usage section I'm not able to see my VUM(Virtaul User Minute) usage changing. Its always 0. Please help me with it. Regards, Divin

  • How can you execute a form without connecting to database?

    Hello, Is it possible to run a form without connecting to database? If Yes, how? Thanking you very much Thobula Rakesh