Identifying records based on one or more common fields

Hi all
This should be easy - but going round in circles. I want to be able to group together records based on whether at least one field is the same as the corresponding field in a different record.
So:
Account No Tel No PostCode
ABC123 17654231 TS24 4ZX
DEF987 8764573 NE1 1AL
QWE921 17654321 SR9 8BD
ASD579 24697615 SR9 8BD
So in the above example the first, third and fourth record would all form one group because the first links to the third based on Tel No and the third links to the fourth based on PostCode. The second record will be in a group of its own. I want to output the above (into a new table) with an additional field linking relevant records together (a group number).
My first pass was to simply:
select the minimum group number from the output table where either the Tel No or Phone No match the current record. If no match then create a new record for this record with the next incremental group number.
This would give
Account No Tel No PostCode Group
ABC123 17654231 TS24 4ZX 1
DEF987 8764573 NE1 1AL 2
QWE921 17654321 SR9 8BD 1
ASD579 24697615 SR9 8BD 1
On the surface that looks OK. The problem occurs if for instance the PostCode in the second record is 'SR9 8BD'. The output would be identical to the above - but I want them to all share the same group number as now there is some commonality between all four records. I'm sure I need to do something recursively but just can't get my head around it.
Would really appreciate some help.
Thanks
Ian

Hi, Ian,
Welcome to the forum!
Be sure to read the forum FAQ {message:id=9360002} It contains several tips that can help you get good answers quickly
976560 wrote:
Hi all
This should be easy - but going round in circles.Ironically, the solution below involves NOCYCLE.
I want to be able to group together records based on whether at least one field is the same as the corresponding field in a different record.
So:
Account No Tel No PostCode
ABC123 17654231 TS24 4ZX
DEF987 8764573 NE1 1AL
QWE921 17654321 SR9 8BD
ASD579 24697615 SR9 8BDWhenever you have a problem, please post CREATE TABLE and INSERT statments for all tables inolved. Since this is your fist message, I'll do it for you:
DROP TABLE     table_x;
CREATE TABLE  table_x
(   Account_No     VARCHAR2 (10)     PRIMARY KEY
,   Tel_No      VARCHAR2 (10)
,   Post_Code     VARCHAR2 (10)
INSERT INTO table_x (account_no, tel_no,     post_code)
       VALUES         ('ABC123',       '17654321', 'TS24 4ZX');
INSERT INTO table_x (account_no, tel_no,     post_code)
       VALUES         ('DEF987',       '8764573',  'NE1 1AL');
INSERT INTO table_x (account_no, tel_no,     post_code)
       VALUES         ('QWE921',       '17654321', 'SR9 8BD');
INSERT INTO table_x (account_no, tel_no,     post_code)
       VALUES         ('ASD579',       '24697615', 'SR9 8BD');
COMMIT;
So in the above example the first, third and fourth record would all form one group because the first links to the third based on Tel No Be careful! It looks like you made a typo there. I changed the number ending in '231' to '321'.
and the third links to the fourth based on PostCode. The second record will be in a group of its own. I want to output the above (into a new table) with an additional field linking relevant records together (a group number).
My first pass was to simply:
select the minimum group number from the output table where either the Tel No or Phone No match the current record. If no match then create a new record for this record with the next incremental group number.
This would give
Account No Tel No PostCode Group
ABC123 17654231 TS24 4ZX 1
DEF987 8764573 NE1 1AL 2
QWE921 17654321 SR9 8BD 1
ASD579 24697615 SR9 8BD 1
On the surface that looks OK. The problem occurs if for instance the PostCode in the second record is 'SR9 8BD'. The output would be identical to the above - but I want them to all share the same group number as now there is some commonality between all four records. I'm sure I need to do something recursively but just can't get my head around it.You said it exactly: you need to do something recursively.
What features of Oracle SQL are recursive? CONNECT BY (as shown below) and, starting in Oracle 11.2, recursive WITH clauses.
Would really appreciate some help.Here's one way to do that:
CREATE TABLE     table_y
AS
WITH   got_related_account_no      AS
     SELECT  table_x.*
     ,     CONNECT_BY_ROOT account_no     AS related_account_no
     FROM     table_x
     CONNECT BY NOCYCLE  account_no     != PRIOR account_no
          AND   (         tel_no      = PRIOR tel_no
                OR    post_code      = PRIOR post_code
             -- OR ...   -- other columns as needed
SELECT       account_no, tel_no, post_code
,       DENSE_RANK () OVER (ORDER BY  MIN (related_account_no))
                     AS grp
FROM       got_related_account_no
GROUP BY  account_no, tel_no, post_code
;This will work in Oracle 10.1 and up.
At the end of this, table_y contains:
ACCOUNT_NO TEL_NO     POST_CODE         GRP
ABC123     17654321   TS24 4ZX            1
ASD579     24697615   SR9 8BD             1
DEF987     8764573    NE1 1AL             2
QWE921     17654321   SR9 8BD             1

Similar Messages

  • FORM personalizations, get an error: One or more required fields ....

    when Action type is set to Bulitin, and Builtin Type is RAISE FORM_TRIGGER_FAILURE, then press button: Apply Now to get the following error:
    One or more required fields are missing values.
    Why?
    Thanks

    I open the form:FNDCUSTM.fmb, to find the code:
    if :FND_FORM_CUSTOM_PROPS.ARGUMENT_TYPE IS NULL or
    :FND_FORM_CUSTOM_PROPS.OBJECT_TYPE IS NULL or
    :FND_FORM_CUSTOM_PROPS.TARGET_OBJECT IS NULL or
    :FND_FORM_CUSTOM_PROPS.PROPERTY_NAME IS NULL THEN
    fnd_message.set_name('FND','FND_CUSTM_REQUIRED');
    fnd_message.error;
    else
    app_form_customizations.get_property
    (:FND_FORM_CUSTOM_PROPS.ARGUMENT_TYPE,
    :FND_FORM_CUSTOM_PROPS.OBJECT_TYPE,
    :FND_FORM_CUSTOM_PROPS.TARGET_OBJECT,
    :FND_FORM_CUSTOM_PROPS.PROPERTY_NAME,
    :FND_FORM_CUSTOM_PROPS.FOLDER_PROMPT_BLOCK,
    :PARAMETER.FORM_ID);
    end if;
    so I know why is that.
    Thank you for your help.

  • Matching colour across clips based on one or more reference points

    I usually use three cameras of different makes and occasionally five (adding two GoPros)  This leaves me with the task of colour matching in post as even when manually adjusting for WB, the sensors just record some colours differently.
    Here's a sample where I've manully adjusted the colours so that the shirt is more or less the same from all three angles:  http://www.youtube.com/watch?v=fMacSgwjFBc  The CU of the fly tyer has the best colour representation of the three cameras so I would want to match colour or the other two, to it. FCPx's colour match doesn't cut it for this job.
    What I'd like is a colour adjustment tool where I could pick one or more shades in one clip, from his shirt for example, and then paste that pick onto a different clip and have the tool adjust the colour of that clip, based on the difference. 
    Is there anything out there that will do this?  Failing that, would Hawaiki Autograde be a decent alternative for this sort of colour balancing between cameras?

    In the end, I bought AutoGrade as its tint and WB balance controls let me manage things just like these controls do in Aperture.  It would be nice if FCPx had them as it's a simple way to manage WB issues, vs. playing with colour correction.

  • How to delete the double records connected to one or more than one tables in SQL 2008?

    Hi
    Can anyone please help me with the SQL query. I Im having a table called People with columns names: personno., lastname, firstname and so on. The personno. is having duplicate records,so all the duplicate records i have written with "double" in
    the beginning of the numbers. I tried deleting these double records but they are linked to one or more than one tables. I have to find out, all the tables blocking the deleting of double person. And then create select statements which creates update statements
    in order to replace the current id of double person with substitute id. (The personno. is in the form of id's in the database)
    Thanks

    You should not append "double" in the personno. When we append it will not be able to join or relate to other table. Keep the id as it is and use another field(STATUS) to mark as duplicate. Also we will require another field(PRIMARYID) against
    those duplicate rows i.e the main or the primary personno.
    SELECT * FROM OtherTable a INNER JOIN
    (SELECT personno, status, primaryid FROM PEOPLE WHERE status = 'Duplicate') b
    ON a.personno = b.personno
    UPDATE OtherTable SET personno = b.primaryid
    FROM OtherTable a INNER JOIN
    (SELECT personno, status, primaryid FROM PEOPLE WHERE status = 'Duplicate') b
    ON a.personno = b.personno
    NOTE: Please take backup before applying the query. This is not tested.
    Regards, RSingh

  • Sorting issue on - around 20 records based on one field Data Manager

    Hello Experts,
    We are facing issue sorting some records which belong to one contract.
    if we sort by one field ie item no, it is not sorting based on this field. This issue only one set of contract only.
    For other set of data, sorting is working fine.
    Any hint will be appreciated.
    Thanks in advance

    HI saptest,
    I have not heard of such a issue,please provide detailed description of the same to give a better idea.
    Thanks,
    Ravi

  • Af:tree group by one or more view attribute(s)

    Hi.
    How to create af:tree with one or more levels based on one or more attribute's group by?
    I have a view with two attributes (Attr1 (possible values are 1 or 2) and Attr2 (value is string like name)). I want to create tree with root level of Attr1 and childer of Attr2.
    Example:
    + - 1
    | - - - 'Name1'
    | - - - 'Name2'
    + - 2
    | - - - 'Name3' Do I have to create new view object (based on same table with only distinct data) for each level in tree? Or is there any "better" way of doing this?
    Regards

    You are right !!
    The problem is inside the report generated by Oracle Reports
    The XML code, which I retrieve running the report request is the following:
    <?xml version="1.0" encoding="&Encoding"?>
    - <!-- Generated by Oracle Reports version 6.0.8.20.2
    -->
    - <MODULE1>
    - <LIST_G_MANAGER_NO>
    - <G_MANAGER_NO>
    <MANAGER_NO>1000</MANAGER_NO>
    <MANAGER_NAME>Anil Passi</MANAGER_NAME>
    </G_MANAGER_NO>
    - <G_MANAGER_NO>
    <MANAGER_NO>1001</MANAGER_NO>
    <MANAGER_NAME>Martin</MANAGER_NAME>
    </G_MANAGER_NO>
    </LIST_G_MANAGER_NO>
    </MODULE1>
    and the problem is the "&" !!!
    So, inside Oracle Reports, when I try to generate the XML code from a preexisting report, the encoding variable is not set.
    Now, I'm trying to understand how to set it, but I didn't find nothing....
    Somebody knows where can I find a Report's configuration file in order to set this "encoding" ?
    Thanks
    Alex

  • Integration of one or more tables into a single database alias name

    Hi Experts,
    Hi Experts,
    I got some problem while working with the crystal reports in VB.NET.  How to combine one or more table fields
    with in the single database alias name?
    --roseline

    Please provide more info.

  • Interactive forms- i see only one record -how can i see more?

    Hi experts,
    i have a table and the result is only one record instead of more records.
    how can i see more records?
    my code is:
    types: begin of structure_0021,
    favor type pa0021-favor,
    yy_id type pa0021-yy_id,
    fgbdt type pa0021-fgbdt,
    end of structure_0021.
    data: it_0021 type table of struct_0021,
             wa_0021 like line of it_0021.
    select favor yy_id fgbdt from pa0021 into corresponding fields of table it_0021
    where pernr = lv_pernr and
    subty = '2'.
    data: lo_nd_adobe2 type ref to if_wd_context_node,
            lo_nd_ls00212 type ref to if_wd_context_node,
            lo_el_ls00212 type ref to if_wd_context_element,
           ls_ls00212 type wd_this->element_ls0021.
    lo_nd_adobe2 = wd_context->get_child_node( name = wd_this->wdctx_adobe).
    lo_el_ls00212 = lo_nd_adobe2->get_element().
    lo_nd_ls00212 = lo_nd_adobe->get_child_node(name = wd_this->wdctx_ls0021).
    lo_el_ls00212 = lo_nd_ls00212->get_element().
    loop at it_0021 into wa_0021.
    lo_el_ls00212->get_static_attributes(importing static_attributes = ls_ls00212).
    endloop.
    lo_nd_ls00212->bind_table(new_items = it_0021).
    if anyone can help me - i will really appreciate it.
    i tried other thing and didnt succeed.
    thanks,
    Michal.

    Obvious question, but have you got 'Find My iPhone' set on both devices?  Settings>iCloud>Find My iPhone.

  • INS-40925 - One or more nodes have interfaces not configured with a subnet that is common across all cluster nodes.

    Hi All,
    I am facing the below error while installing Oracle RAC in Silent Mode.
    SEVERE: There are no common subnets represented by network interfaces across all cluster nodes.
    SEVERE: [FATAL] [INS-40925] One or more nodes have interfaces not configured with a subnet that is common across all cluster nodes.
       CAUSE: Not all nodes have network interfaces that are configured on subnets that are common to all nodes in the cluster.
       ACTION: Ensure all cluster nodes have a public interface defined with the same subnet accessible by all nodes in the cluster.
    My /etc/hosts is given below.
    127.0.0.1        localhost    localhost.localdomain
    #Public
    192.168.1.101      rac1        rac1.localdomain
    192.168.1.102    rac2        rac2.localdomain
    #Private
    192.168.2.101    rac1-priv    rac1-priv.localdomain
    192.168.2.102    rac2-priv    rac2-priv.localdomain
    #Virtual
    192.168.1.103      rac1-vip    rac1-vip.localdomain
    192.168.1.104    rac2-vip    rac2-vip.localdomain
    #SCAN
    192.168.1.105    rac-scan    rac-scan.localdomain
    Could you please help me to get rid of the error INS-40925....Any Idea...???

    Hi Ramesh,
    Please find the result of ifconfig -a from both nodes RAC1 & RAC2.
    ifconfig -a in RAC1
    [oracle@rac1 Desktop]$ ifconfig -a
    eth0      Link encap:Ethernet  HWaddr 08:00:27:17:7A:D5
              inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fe17:7ad5/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:102 errors:0 dropped:0 overruns:0 frame:0
              TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:25472 (24.8 KiB)  TX bytes:3322 (3.2 KiB)
              Interrupt:19 Base address:0xd020
    eth1      Link encap:Ethernet  HWaddr 08:00:27:C0:AC:DB
              inet addr:192.168.2.101  Bcast:192.168.2.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fec0:acdb/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:4 errors:0 dropped:0 overruns:0 frame:0
              TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:240 (240.0 b)  TX bytes:816 (816.0 b)
              Interrupt:16 Base address:0xd240
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:56 errors:0 dropped:0 overruns:0 frame:0
              TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:6394 (6.2 KiB)  TX bytes:6394 (6.2 KiB)
    virbr0    Link encap:Ethernet  HWaddr 52:54:00:CC:BD:FB
              inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    virbr0-nic Link encap:Ethernet  HWaddr 52:54:00:CC:BD:FB
              BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:500
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    ifconfig -a in RAC2
    [oracle@rac2 Desktop]$ ifconfig -a
    eth0      Link encap:Ethernet  HWaddr 08:00:27:C9:38:82
              inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fec9:3882/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:122 errors:0 dropped:0 overruns:0 frame:0
              TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:32617 (31.8 KiB)  TX bytes:5157 (5.0 KiB)
              Interrupt:19 Base address:0xd020
    eth1      Link encap:Ethernet  HWaddr 08:00:27:90:B5:A0
              inet addr:192.168.2.102  Bcast:192.168.2.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fe90:b5a0/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:4 errors:0 dropped:0 overruns:0 frame:0
              TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:240 (240.0 b)  TX bytes:746 (746.0 b)
              Interrupt:16 Base address:0xd240
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:56 errors:0 dropped:0 overruns:0 frame:0
              TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:6390 (6.2 KiB)  TX bytes:6390 (6.2 KiB)
    virbr0    Link encap:Ethernet  HWaddr 52:54:00:CC:BD:FB
              inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    virbr0-nic Link encap:Ethernet  HWaddr 52:54:00:CC:BD:FB
              BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:500
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

  • Selecting Records based on multiple values in one field

    Excuse the basic request.
    I want to select all records from one table depending on the value in 2 specific fields. Each of these fields has a single value in it.
    What I have written is as below
    1.select nm_idno "EZAID", nm_fname, nm_lname, nm_et_tt "Position", nm_mt_mt "Status", nm_type, nm_wemal, nm_mailshot from MNME
    2.where nm_type = 'M' and where nm_mailshot = 'Y' and nm_wemal > ' '
    3.and where nm_mt_mt = (1 or 6 or 3 or 10) *** these are the bits that I don't understand why they will not work.
    4. and where nm_et_tt = (408 or 329 or 283)
    Basically every record should have one of the values I have highlighted in it.
    Any help greatly appreciated.

    select nm_idno "EZAID"
          ,nm_fname
          ,nm_lname
          ,nm_et_tt "Position"
          ,nm_mt_mt "Status"
          ,nm_type
          ,nm_wemal
          ,nm_mailshot
    from   MNME
    where  nm_type = 'M'
    and    nm_mailshot = 'Y'
    and    nm_wemal > ' ' --< not sure what you mean here
    and    nm_mt_mt IN (1, 6, 3, 10)
    and    nm_et_tt IN (408, 329, 283)
    ;

  • Adobe Acrobat recovered one or more documents that have not been properly recorded before the Acrobat stop.

    When opening any .pdf with Adobe Acrobat Reader the following error comes.
    Error Message: Adobe Reader has recovered one or more documents that were not saved properly before Reader was shut down. Click Yes to open the recovered documents. If you click No, your changes will be lost.

    Adobe Reader or Adobe Acrobat?

  • TS1424 Purchased an album one or more records does not play all the way through. A 13 minute track only plays for the first 3.05 minutes and then stops and the program locks up. Larry

    I just purchased a album and one or more of the tracks does not play all the way through. One track which is a 13 minute track will only play for the first 3 minutes. Larry

    Delete the songs from your iTunes library and redownload them by clicking "Purchased", under Quick Links at the top right of the iTunes store.
    Download past purchases:
    http://support.apple.com/kb/HT2519
    If this doesn't work contact iTunes support here:
    http://www.apple.com/support/itunes/contact/

  • Using calculated member based upon existence of one or more currentmembers

    I'd like to use a calculated member - using the same definition- where the measure is based upon one dimension if that has been selected for use, or another dimension if that has been selected
    e.g with pseudocode
    WITH member [Measures].[Total Usage] AS
    ' IF EXISTS ([Date A].currentmember) THEN SUM([Date A].members, [Measures].[X])
     ELSE
     IF EXISTS ([Date B].currentmember) THEN SUM([Date A].members, [Measures].[X]) '
    It may sound odd to some ( possibly) - but I have a front end which is generating MDX and I can only really control the calculated member definition.
    Regards
    johnnie

    Hi
    I am not sure of your front end tool but in general, all generic calculated measures are possible with AXIS function. In your case sample MDX will be like
    MEMBER [Measures].[Generic SUM] AS
    iif( IsEmpty(Axis(0).Item(0)),
    null,
    iif( Axis(1).Item(0).Item(0).Hierarchy.CurrentMember.Level.Ordinal = 0,
    Axis(0).Item(0),
    Sum(Axis(1).Item(0).Item(0).Hierarchy.CurrentMember,
    Axis(0).Item(0)
    If need to further details, have a look at
    https://bipassion.wordpress.com/2013/10/06/mdx-generic-averages/
    Prav

  • Office App Devlopment: Unable to load one or more of the requested types.

    I'm receiving the following error with the default C# Office App for Word, Excel, Powerpoint, Project Task Pane
    Error Code
    Description
    File
    Line
    Col
    Project
     1
    Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets
    438
    5
    AppName
    I'm using
    Microsoft Visual Studio Community 2013
    Version 12.0.31101.00 Update 4
    Microsoft .NET Framework
    Version 4.5.51641
    Installed Version: Professional
    LightSwitch for Visual Studio 2013   06177-004-0444002-02129
    Microsoft LightSwitch for Visual Studio 2013
    Team Explorer for Visual Studio 2013   06177-004-0444002-02129
    Microsoft Team Explorer for Visual Studio 2013
    Visual Basic 2013   06177-004-0444002-02129
    Microsoft Visual Basic 2013
    Visual C# 2013   06177-004-0444002-02129
    Microsoft Visual C# 2013
    Visual C++ 2013   06177-004-0444002-02129
    Microsoft Visual C++ 2013
    Visual F# 2013   06177-004-0444002-02129
    Microsoft Visual F# 2013
    Visual Studio 2013 Code Analysis Spell Checker   06177-004-0444002-02129
    Microsoft® Visual Studio® 2013 Code Analysis Spell Checker
    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
    Windows Phone SDK 8.0 - ENU   06177-004-0444002-02129
    Windows Phone SDK 8.0 - ENU
    Application Insights Tools for Visual Studio Package   1.0
    Application Insights Tools for Visual Studio
    ASP.NET and Web Tools   12.4.51016.0
    Microsoft Web Developer Tools contains the following components:
    Support for creating and opening ASP.NET web projects
    Browser Link: A communication channel between Visual Studio and browsers
    Editor extensions for HTML, CSS, and JavaScript
    Page Inspector: Inspection tool for ASP.NET web projects
    Scaffolding: A framework for building and running code generators
    Server Explorer extensions for Microsoft Azure Websites
    Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure
    ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
    For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
    ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
    For additional information, visit http://www.asp.net/
    Common Azure Tools   1.3
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
    Microsoft Azure Mobile Services Tools   1.3
    Microsoft Azure Mobile Services Tools
    NuGet Package Manager   2.8.50926.663
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    Office Developer Tools for Visual Studio 2013 ENU   12.0.31105
    Microsoft Office Developer Tools for Visual Studio 2013 ENU
    PowerShell Tools   1.3
    Provides file classification services using PowerShell
    PreEmptive Analytics Visualizer   1.2
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
    SQL Server Data Tools   12.0.41012.0
    Microsoft SQL Server Data Tools
    Windows Phone 8.1 SDK Integration   1.0
    This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.
    From looking at the build it looks like the web part is building correctly but the application isn't passing validation, I have no idea why since it is the default app, I've made Office Apps on previous machines without a problem.
    Any help would be much appreciated and also let me know if I can give more info!

    Hi mngfinney,
    >> From looking at the build it looks like the web part is building correctly but the application isn't passing validation, I have no idea why since it is the default app, I've made Office Apps on previous machines without a problem.
    I’m trying to reproduce your issue but failed.
    Here is my steps:
    #1 Install Microsoft Visual Studio Community 2013
    #2 Install Microsoft Office Developer Tools for Visual Studio 2013
    #3 Create a new Apps for Office project and rebuild
    According your error message, the failed step is ValidatePackage, I suspect it is an environment issue, but I cannot identify the root cause basing on the information you post.
    Have you tried to re-install the Visual Studio and Microsoft Office Developer Tools for Visual Studio 2013 or test it on another machine with Microsoft Visual Studio Community 2013?
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Delete duplicate records based on condition

    Hi Friends,
    I am scratching my head as how to select one record from a group of duplicate records based upon column condition.
    Let's say I have a table with following data :
    ID   START_DATE   END_DATE    ITEM_ID     MULT    RETAIL            |                      RETAIL / MULT
    1     10/17/2008   1/1/2009     83     3     7                 |                            2.3333
    2     10/17/2008   1/1/2009     83     2     4                 |                            2
    3     10/17/2008   1/1/2009     83     2     4                 |                            2
    4     10/31/2008   1/1/2009     89     3     6                 |                            2
    5     10/31/2008   1/1/2009     89     4     10                |                            2.5
    6     10/31/2008   1/1/2009     89     4     10                |                            2.5
    7     10/31/2008   1/1/2009     89     6     6                 |                            1
    8     10/17/2008   10/23/2008     124     3     6                 |                            2From the above records the rule to identify duplicates is based on START_DATE,+END_DATE+,+ITEM_ID+.
    Hence the duplicate sets are {1,2,3} and {4,5,6,7}.
    Now I want to keep one record from each duplicate set which has lowest value for retail/mult(retail divided by mult) and delete rest.
    So from the above table data, for duplicate set {1,2,3}, the min(retail/mult) is 2. But records 2 & 3 have same value i.e. 2
    In that case pick either of those records and delete the records 1,2 (or 3).
    All this while it was pretty straight forward for which I was using the below delete statement.
    DELETE FROM table_x a
          WHERE ROWID >
                   (SELECT MIN (ROWID)
                      FROM table_x b
                     WHERE a.ID = b.ID
                       AND a.start_date = b.start_date
                       AND a.end_date = b.end_date
                       AND a.item_id = b.item_id);Due to sudden requirement changes I need to change my SQL.
    So, experts please throw some light on how to get away from this hurdle.
    Thanks,
    Raj.

    Well, it was my mistake that I forgot to mention one more point in my earlier post.
    Sentinel,
    Your UPDATE perfectly works if I am updating only NEW_ID column.
    But I have to update the STATUS_ID as well for these duplicate records.
    ID   START_DATE   END_DATE    ITEM_ID     MULT    RETAIL    NEW_ID   STATUS_ID |   RETAIL / MULT
    1     10/17/2008   1/1/2009     83     3     7         2         1      |     2.3333
    2     10/17/2008   1/1/2009     83     2     4                                |     2
    3     10/17/2008   1/1/2009     83     2     4           2         1      |     2
    4     10/31/2008   1/1/2009     89     3     6           7         1      |     2
    5     10/31/2008   1/1/2009     89     4     10          7         1      |     2.5
    6     10/31/2008   1/1/2009     89     4     10          7         1      |     2.5
    7     10/31/2008   1/1/2009     89     6     6                            |     1
    8     10/17/2008   10/23/2008     124     3     6                            |     2So if I have to update the status_id then there must be a where clause in the update statement.
    WHERE ROW_NUM = 1
      AND t2.id != t1.id
      AND t2.START_DATE = t1.START_DATE
      AND t2.END_DATE = t1.END_DATE
      AND t2.ITEM_ID = t1.ITEM_IDInfact the entire where_ clause in the inner select statement must be in the update where clause, which makes it totally impossible as T2 is persistent only with in the first select statement.
    Any thoughts please ?
    I appreciate your efforts.
    Definitely this is a very good learning curve. In all my experience I was always writing straight forward Update statements but not like this one. Very interesting.
    Thanks,
    Raj.

Maybe you are looking for