Doubt with grouping

Hi all

I have a table like

ID email1 email2 email3

10 [email protected]

20                                   [email protected]

30                                                            [email protected]

40 [email protected]

50                                                            [email protected]

I need to consolidate this table based on email1, email2. Address3.

o/p

e-mail1 ID

10 [email protected]

30 [email protected]

20 [email protected]

40 [email protected]

50 [email protected]

Thank you

SQL > with t as)
2. Select 10 id, "[email protected]" email1, email2 null, null Address3 double Union
3 select 20, null, '[email protected]', null of union double
4 Select 30, null, null, "[email protected]" Union double
5 Select 40, '[email protected]', null, null, Union double
6. Select 50, null, null, "[email protected]" of the double
7)
8  --
9. real query
10-
11 select id
12, coalesce (email1, email2, email3)
13 t;

ID COALESCE (EM
---------- -----------
10 [email protected]
20 [email protected]
30 [email protected]
40 [email protected]
50 [email protected]

5 selected lines.

Tags: Database

Similar Questions

  • Internet Explorer 8 XP configuration with group policy

    I'm trying to update the zone information of IE8 via the group policy on the xp computers.  I don't get any errors, but the parameters are not get applied to the computers in the ORGANIZATIONAL unit.  I created a test organizational unit placed a few inside computers and created a group policy I linked to the test OU.  I blocked the legacy on the OU.  Gpresult displays that it is the only political hitting the computer.  Some Internet Explorer settings are updated while others are not?  I imported the inetres.adm file in the new policy.  I use a server of w2k8 Windows with Group Policy Management to update the policy and run gpresult.

    For customers it does not implement try to use the GPupdate command in these machines. Also, you try to apply a restart on these machines and may also attempt to refrech domain and Active Directory.

  • Allow a standard user to install software designated as updates of Adobe reader with group policy

    Hello

    I have the users configured as standard users to prevent them from installing unapproved software.

    This causes problems with products such as java and adobe reader running automatic updates.  We then get cranky users because they are prompted to install the update and approval from the administrator.

    Is it possible with group policy to allow pre-approved software to install as update of adobe reader?

    Thank you
    Andrew Andrew

    Hi Delva,

    Your question is beyond the scope of what is generally answered in these forums Microsoft Answers to consumers. It is better suited for the IT Pro TechNet public. Please ask your question in the Forum on Technet group policy. Thank you!

    Lisa
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How Oracle performs with 'COUNT' when to go with "GROUP BY"?

    Hello

    I am aware that count return 0 there is still no data found a 'WHERE' clause

    However, when he goes with "GROUP BY", he goes to the "EXCEPTION block".

    declare

    a number: = 0;

    Start

    Select COUNT (1) in the doubles where 1 = 2

    Group 1;

    dbms_output.put_line ('a =' | a);

    exception

    While OTHERS then

    dbms_output.put_line ('Exception =' |) SQLERRM);

    end;

    /

    output:

    Exception = ORA-01403: no data found

    Why is Oracle jumps in the 'EXCEPTION' block when "GROUP BY" is added?

    Why may not behave in the same way as it did without "GROUP BY"?

    Please help me understand.

    Hello

    11fdb98c-D100-4baa-8eee-c00c9f7303bc wrote:

    Hello

    I am aware that count return 0 there is still no data found a 'WHERE' clause

    ...

    This is not true.  A query using COUNTY won't necessarily produce anything.  The query you posted is an example:

    Select COUNT (1) in DOUBLE where 1 = 2

    Group 1;

    does not 0; It produces nothing at all.

    Why is Oracle jumps in the 'EXCEPTION' block when "GROUP BY" is added?

    SELECT... INTO will trigger an error ("no data found" or "too many rows"), except if the query produces exactly 1 row.

    Why may not behave in the same way as it did without "GROUP BY"?

    GROUP BY means that the query will produce 1 row of output for each group (after the WHERE clause has been applied).

    A query using an aggregate (such as COUNT) without a GROUP BY clause function will always produce exactly 1 row.  (If you have a HAVING clause, then it can remove this row from the result set.)

    What you trying to do?

    Why do you use a GROUP BY clause in this case?  If you want a query which behaves as if it doesn't have a GROUP BY clause, then do not add a GROUP BY clause.

  • doubt with the creation of the sales order

    Hi all, I have a doubt with the creation of the order customer. When we get into the details of the order I found that according to the type of order we should decide whether to enter PO # or not (Source: _ http://docs.oracle.com/cd/A60725_05/html/comnls/us/oe/ordreqfd.htm _).

    My doubt is, so how can we find requiring an order Type PO # to be included on the sales order form. I mean, can we find from a query or there are defined rules...

    Any help is appreciated,

    Thanks in advance!

    Published by: Sandy on April 17, 2012 11:28

    Look for po_required_flag in oe_transaction_types_all

    Sandeep Gandhi

  • Doubt with an Insert query!

    Hi friends I have a doubt with a SQL here is the following code.
    INSERT INTO
                         (SELECT employee_id, last_name,
                                      email, hire_date, job_id, salary,
                                      department_id
                           FROM employees
                          WHERE department_id = 50)
               VALUES (99999, 'Taylor', 'DTAYLOR',
                            TO_DATE('07-JUN-99', 'DD-MON-RR'),
                             'ST_CLERK', 5000, 50);
    The same insert statement can be performed with
    INSERT INTO EMPLOYEES (employee_id, last_name,
                                      email, hire_date, job_id, salary,
                                      department_id)
                        VALUES (99999, 'Taylor', 'DTAYLOR',
                            TO_DATE('07-JUN-99', 'DD-MON-RR'),
                             'ST_CLERK', 5000, 50);
    What advantage the first request has on the other.

    Thanks in advance to everyone.

    Kind regards
    Maury

    These two statements are the same.

    However, it would be different:

    INSERT INTO
      (SELECT employee_id, last_name,
            email, hire_date, job_id, salary,
            department_id
       FROM employees
       WHERE department_id = 50
       with check option )
    VALUES (99999, 'Taylor', 'DTAYLOR', TO_DATE('07-JUN-99', 'DD-MON-RR'), 'ST_CLERK', 5000, 50);
    

    "WITH CHECK OPTION" would ensure that only employees for Department 50 are inserted.

    See also:
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e17118/statements_10002.htm#i2066598

    Published by: Sven w. March 17, 2011 19:22 - typo correction

  • Can I use LEAD or TROLLING with groups?

    Can I use LEAD or TROLLING with groups?
    I want to compare two records in each group.

    Is this possible?

    Thanks in advance

    Xavi says:
    Can I use LEAD or TROLLING with groups?
    I want to compare two records in each group.

    What do you mean by groups?

    Twinkle

  • several doubts with vmware esx 3.5

    guys, I had many doubts on VMware ESX. can you please answer me if you know the answers to any of the sub questions

    In the meantime thanks for all those who respond to my questions.

    (1) how to install ESX on the SAN to start on the SAN?

    (2) how to back up the database to the virtual Center Server? is it something that supports a SQL DBA or do we do as a VMware administrator?

    (3) for the installation of VCenter server, its request for the installation of the apache tomcat server. Why is this? It is with ESX 3.5

    (4) do we need a separate license for VCenter server apart from the licenses that we buy for the ESX servers?

    (5) if 2 virtual machine port groups are on two different VLANS, to send it, we need to configure a vyatta router. How can we do that if we are not a guy from Cisco?

    (6) we give only the IP numbers for a console Service and Vmkernals but not the virtual machine port groups. If so, how these virtual machines on these virtual machine port groups know what are their IP numbers? If we want a static IP number for a virtual machine, we inside windows from a virtual computer configuration?

    (7) is the Virtual Machine power off a soft stop?

    (8) what happens when we make one pause a Virtual Machine? I think that there is no option in a machine physical windows original. so, what does this mean VM break?

    (9) how many vsphere client can simultaneously access the vcenter Server?

    (3) for the installation of VCenter server, its request for the installation of the apache tomcat server. Why is this? It is with ESX 3.5

    Don't know why VM Ware chose Tomcat, they SAY THEY is not secure... No matter what.  It's just another Web server and its an option that VM Ware has chosen to work with vCenter.  It's not good or bad, just different... many people THINK apache is better, it is a matter of opinion.

    (6) we give only the IP numbers for a console Service and Vmkernals but not the virtual machine port groups. If so, how these virtual machines on these virtual machine port groups know what are their IP numbers? If we want a static IP number for a virtual machine, we inside windows from a virtual computer configuration?

    It is a way, you will realize quickly that will be a major pain.  I do like DHCP, reserve of the INVESTIGATION period.  Unless you know a way to connect to hundreds of virtual machines and change their IP remotely, this is probably the simplest method.  Unless you like make manual updates... then knock you out.

    (7) is the Virtual Machine power off a soft stop?

    Not as the name suggests it is a POWER-off.  Comments stop is a soft stop.

    (8) what happens when we make one pause a Virtual Machine? I think that there is no option in a machine physical windows original. so, what does this mean VM break?

    Confusion in the name.  It simply means 'suspend' and there is an option on physical machines... probably no servers, in the form of profiles of power are generally disabled, but it IS possible.

    (9) how many vsphere client can simultaneously access the vcenter Server?

    no theoretical limit... or I do not think that someone took the time to discover.  You will grow up to the moment where you have too many users connected to vCenter vCenter anyway... So the connections will not be reached.

  • problem with firefox with groups (set as default broswer): links in the email do not open new tab

    I'm using Firefox 36.0.4 with several groups.
    Firefox is set as my default browser.
    When I click on a link in an email or another application, nothing happens.
    It all started when I started using the groups feature.
    Seems that there is no 'default' group to open.

    Open Internet Explorer Windows. Stated as default browser.
    If you wish, you can disable the "check if default" option.

    Now, open Firefox and stated as a default value.
    This aid?

  • BlackBerry Q10 comes into contact with groups

    I have about 200 contacts in my Q10 (automatically imported Contacts Gmail), but it's really annoying to add these contacts manually to the groups, created in Q10.

    Is it possible to import groups with contacts from Gmail or organize contacts into groups in the computer and then download to Q10?

    Thanks for the ideas.

    Dmitri

    Not that I know of.

    As this is a fairly new feature, you might look to come from 3rd party applications to see if they can help.

  • Issue of calendar entries sharing with groups of BBM blackBerry Smartphones BB Curve 8520-

    Greetings!

    I am currently using a BB Curve 8520. I have a problem with the birthday entries sharing with my BBM groups.

    When I add a birthday entry to my contacts from the phonebook, the phone will ask whether or not you will share this date with the BBM groups calendar.

    If I select No., birthday entry will continue to BE SHARED to your BBM groups.

    So I have to go to the calendar of the BBM groups to delete manually created entry.

    Can you help me to solve this problem with my phone?

    Thanks in advance!

    Hi, Ahmed.

    Follow the steps; below

    1. take a full backup of your device.

    2 reset the device (Do a security wipe)

    3 register your device with Netowrk.

    4. return the maintenance book.

    5. If more than one e-mail account then delete pulled CICAL service book of reset. (but keep a default for CICAL service)

    6. now, do a restore advance except BBM GROUP and data.

    7. now, create a new entry in the calendar.

    Please read the following threads for more info:

    http://supportforums.BlackBerry.com/T5/BlackBerry-App-World-General/calendar-issues-BBM-Group/TD-p/6...

    Courtesy: Santosh-Boiro

  • Using the command telnet with groups of objects

    I'm upgrading from a PIX production to 6.2 (2) and will be converting the configuration to use the names and groups of objects.

    Documentation for the object-group deals with their use in ACLs, I wonder if they can also be used in the telnet command.

    Old config example:

    Telnet 10.0.0.0 255.0.0.0 inside

    Telnet 172.16.35.22 255.255.255.255 inside

    Telnet 172.16.35.23 255.255.255.255 inside

    Telnet 172.23.16.138 255.255.255.255 inside

    Telnet 172.23.16.141 255.255.255.255 inside

    Telnet 172.23.20.100 255.255.255.255 inside

    Telnet 172.23.20.101 255.255.255.255 inside

    Telnet timeout 10

    Example of config suggested:

    Telnet NET-Inside_10 255.0.0.0 inside

    Telnet-group of Support_TelecomTeam objects inside

    Telnet-group of Support_SecurityTeam objects inside

    Telnet-group of SNMP_Servers objects inside

    Telnet timeout 10

    Please let me know if you have tried with telnet that I don't have access to a laboratory PIX to test this option.

    Thank you!

    Jennifer

    Good idea, but unfortunately, groups of objects are valid for use in access lists.

    Scott

  • Doubt with removal of the blocks

    Hello.

    I would like to raise a question that, until recently, I thought I knew, but recent events make doubt me about it.

    It is a doubt that Oracle made with blocks that have been removed from a table.

    I understood that if I empty a table using the "truncated" command, the table blocks are released. This means that the space that becomes available is returned to the operating system?

    In other words, it will be the size of the reduced storage space?

    The other question if I delete records in a table using "remove them", make these deleted blocks available to store new data either from the same table or another?

    When it would be convenient to use the command 'shrink '?

    I know this may seem very basic questions, but I would appreciate any clarification.

    Concerning

    You do not remove blocks, you delete records.

    Deleting records NEVER returns the free space to storage or operating system. The space will be available at the same table only.

    Truncate a table returns a space to the storage space, but not the operating system.

    Narrowing of the datafile (s) could return data back to the OS.

  • Select filtering with Group of results do nto work with aliases

    I'm trying to filter the results to obtain the result with number greater than one:

    select DEPARTMENT_ID,job_id, count(*) as cnt
    from employees group by DEPARTMENT_ID,JOB_ID having cnt > 1;
    

    Oracle returns the identifier not valid error for NTC. When I use this:

    select DEPARTMENT_ID,job_id, count(*)
    from employees  group by DEPARTMENT_ID,JOB_ID having count(*) > 1;
    

    Select the works. What is the reason?

    Because it is not allowed.

    If you are looking for "oracle in the having clause column alias" you would find that said. Several times.

    Such as the use of alias to columns in clause error

  • How to classify with grouping

    Means I want top 5 records of each category. with the grouping, I would like to give rank in OBIEE. Please someone have any suggestions for it

    Pls try the following query:

    TOPN (GRADE (SALE by category), 5 per category)

Maybe you are looking for