Need help to translate this into a request

Need help to translate this into a request. I can make the followingusing a query?

I have the data in this way and I want a report in one line.

The available data as follows by joining 2-3 tables:

er_id er_name carrier account records
------------------------------------------------------------
1           XYZ           AT&T                     2
1 XYZ Sprint 4
1 Verizon Wireless XYZ 7
XYZ T-Mobile 1 1
2 AAA AT & T 18
2 AAA Sprint 2
2 AAA Sprint (Nextel) 1
2 AAA T-Mobile 1

Need the output in this format:

ER_ID ER_NAME at & T, Sprint (Nextel) Sprint, Verizon Wireless, T-Mobile
--------------------------------------------------------------------------------------------------------------------------
1            XYZ               2            4                   0                                  7                            1
2            AAA             18            2                   1                                  0                            1

Is this possible with a simple query?

It's called pivot. Assuming that you are on11g and AT & T, Sprint, Verizon Wireless and Sprint (Nextel), T-Mobile is a complete list of carriers:

SET DEFINE OFF

() AS T

SELECT 1 ER_ID, ER_NAME "XYZ", "AT & T" COMPANY, NTC 2 UNION DOUBLE ALL THE

SELECT 1, 'XYZ","Sprint", 4 DOUBLE UNION ALL

SELECT 1, 'XYZ', "Verizon Wireless", 7 DOUBLE UNION ALL

SELECT 1, 'XYZ', 't-Mobile', 1 DOUBLE UNION ALL

SELECT 2, 'AAA', 'AT & T', 18 DOUBLE UNION ALL

SELECT 2, 'AAA', 'Sprint', 2 DOUBLE UNION ALL

SELECT 2, 'AAA', 'Sprint (Nextel)", 1 DOUBLE UNION ALL

SELECT 2, 'AAA', 't-Mobile', 1 DOUBLE

)

SELECT ER_ID,

ER_NAME,

"" AT & T"_CNT" "AT & T"

"" Sprint"_CNT" "Sprint."

"" Sprint (Nextel)"_CNT" "Sprint (Nextel).

"' T-Mobile"_CNT ""T-Mobile"

""Verizon Wireless"_CNT" "Verizon Wireless".

T

PIVOT)

SUM (NTC) NTC

Carriers to ("AT & T", "Sprint", "Sprint (Nextel)", "t-Mobile","Verizon Wireless)

)

/

ER_ID ER_ AT & T Sprint Sprint (Nextel) T-Mobile Verizon Wireless
---------- --- ---------- ---------- --------------- ---------- ----------------
1 XYZ          2          4                          1                7
2 AAA         18          2               1          1

Scott@pdb1orcl12 >

Sy.

Tags: Database

Similar Questions

  • My set-up agency & ABC developed for us. We no longer use the Agency. I have 2 log-in - but 1) cannot change my billing settings & 2) cannot update models due to lack of access. Need help to change this.

    My set-up agency & ABC developed for us. We no longer use the Agency. I have 2 log-ins - but 1) cannot change my billing settings & 2) cannot update models due to lack of access. Need help to change this.

    Hi Rebecca,.

    You should get in touch with our accounts team to work a solution to your problem. Drop them a note at: contact us | Adobe Business Catalyst

    Cristinel

  • Hi Mr President, last week I have a crash on my computer. Yesterday I installed PSE12... but I can't open the program, please I need help/support for this. Thanks a lot for helping me, Roland

    Hi Mr President, last week I have a crash on my computer. Yesterday I installed PSE12... but I can't open the program, please I need help/support for this.

    Wath can I do?

    In the box: PN 65224809, product key 1057 -.

    Please can you tell me wath is you solution?

    Thanks a lot for helping me

    Best regards, Roland Cuypers

    [email protected]

    Post edited by: Sandeep Singh removing serial number

    Hi rolandc65772962,

    Sorry for the inconvenience. Please provide us with the complete error message you get.

    Kind regards

    Sandeep

  • Need help to translate PS Bloom tutorial for Elements 8 ~ layer mask

    http://photoshoptutorials.WS/Photoshop-tutorials/photo-effects/bloom.html

    I'm having difficulting translate this tutorial PS elements.  Could someone familiar with the items please take a look at this tutorial and offer any advice?

    Thanks in advance!

    Credo

    Yes, see if the following gives the results you are looking for:

    1. steps 1 and 2 are the same.

    2. the part where it says Add layer mask, click on the background layer and

    Add a levels adjustment layer. (Layer > new adjustment layer > levels)  Click on layer 1 and select group with previous.

    (Layer > Group with previous or add the clipping mask)

    3. steps 3 and 4, instead of the image to apply it, click the "eye" on the layer levels to

    levels of layer and layer 1 is not visible.

    Click on the background layer and then do a select all, copy. (Select > all) then (Edit > copy)

    ALT-click on the mask of levels and paste (Edit > paste) (a grayscale image will be pasted into the mask).

    Deselect (select > deselect).

    4 step 5 is the same.

    5. steps 6 and 7, click on layer 1 to make visible, and then click on the layer mask to levels

    to activate the mask, and then run the filter on the mask Gaussian blur.

    6 step 8 is the same.

    I hope this helps.

    MTSTUNER

  • Need HELP to get this shadow effect

    Hi all

    I need your advice. Sorry I don't know the name of this effect below therefore the scene I need help

    A man holds a flashlight illuminating a girl in the front (she is a bit away from him in an open field), now the shadow of another person walks between the torch and the girl. The shadow is being cast from left to the right end of the frame, falling on the girl, too, as it moves.

    How to achieve this effect in the aftermath.

    It may or may not be a question of amateur, but any help would be so useful.

    Please notify

    It is now much clearer. you need advice VFX before your shoot. You must have a shadow without the man, be there. I think you can go 2-way with this: shoot twice the place or go to the green screen approach. each with its own complexity and the advantages and disadvantages. I will describe the basic principles:

    Approach to location

    If you want to try to do on-site, you can:

    1. turn your scene with the man and shadow

    2. pull on the same stage without human and shadow

    3 mask man with the rotoscoping and tracking

    This might work if you have no movement in your scene. or if you have motion control of drilling that will exactly twice the same movement.

    The green screen approach

    your question - if you can touch a person out and make him a shadow on the floor - YES. It's the way I'm going to try to do - it's called a Shadow Catcher - a layer that only accepts your shadow. This might work with or without movement of the camera.

    Let's say you have this guy on green screen

    and you want to just its shadow on the background against

    Here are the steps:

    1 make the guy (layer locked) 3D and add a corresponding upstairs floor * in the actual shooting.

    floor - add you a solid, it make 3D, add the effect of grid and position it accordingly with a camera of 2 knot like that of setting

    2. Add a layer of light points and set the shadow, set the images captured in the shade and the soil layer to accept shadow - only and adjust the light

    Now you have this:

    3. check that everything is OK, now define the images captured in shadow - only

    Now you have just the shadow. You can adjust it to your taste with the darkness of the shadow and the diffusion in the properties of light spots

  • Need help to recreate this model of arrow

    Hello

    I need essentially to recreate the profile of arrow shown in the banner below zigzag.  I'm not an expert in photoshop and have spent the last two hours of messing around with it and by using Google, but could not create a similar size of the arrowhead.  I don't know exactly how correct the size of the arrow head and width separately.  I used the online tool and created this way arrowhead.  Then I would try and adjust the width, height and weight on the top of the paved, but was unable to get a ratio similar to that below.  The body of the arrow was too thin, or when I tried to thicken, it caused great become arrowhead.  Also, if you could help explain how to recreate the other lines throughout the banner that would be great.  A friend has created this banner below for me, but I need to change the color of the arrow and the text.

    Can someone help me with this please?  Thanks in advance!

    KarSun1 Banner V3.jpg

    I repeat what has already been said, the best option for you is to recreate probably just head of arrow as a distinct form. Because the shape is very simple, it is a quick and easy solution

    Here's an illustration of what above mentioned Charles quick:

    1. Select the Polygon tool (if you can not see, click and hold the Rectangle tool to access the context menu)
    2. Change the number of side 3
    3. Select your fill color
    4. Then click and drag to create your form

    In addition, a note - if you have access, Illustrator is probably a tool best suited to the creation of this chart type. It allows you to refine the lines and heads of arrow for one more great extent then Photoshop.

    See you soon!

    Kendall

  • need help to convert this procedure used and call in coldfusion

    Hi I'm new to coldfusion and I haed of the code with me and I need it to convert in the stored procedure and will call back within coldfusion. Can someone help me how to make these data to the stored procedure and calling in coldfusion.

    Here is the code of my

    SET NOCOUNT ON

    DECLARE
    @cpt_dpt_cd char (2)
    @cpt_com_cd char (3)
    @sub_com_cd char (5)
    @con_upc_no char (13)
    , @pid_lng_dsc_tx varchar (100)
    , @pid_sht_dsc_tx varchar (100)
    , @rev_by varchar (8)
    @rev_dt datetime


    DECLARE upc_cursor CURSOR FOR
    SELECT *.
    OF di_audit_corp_upc_ldr_tbl
    WHERE con_upc_no IN ((in English only)
    SELECT con_upc_no, COUNT (*)
    TABLE [dbo]. [di_audit_corp_upc_ldr_tbl]
    GROUP BY con_upc_no
    HAVING COUNT (*) > 1
    )
    ORDER BY con_upc_no

    OPEN upc_cursor

    -It is performed while the previous extraction is successful.
    FETCH NEXT from upc_cursor
    IN
    @cpt_dpt_cd
    @cpt_com_cd
    @sub_com_cd
    @con_upc_no
    @pid_lng_dsc_tx
    @pid_sht_dsc_tx
    @rev_by
    @rev_dt

    -Check @FETCH_STATUS to see if he has more lines to fetch.
    WHILE @FETCH_STATUS = 0
    BEGIN
    -If not exists
    IF NOT EXISTS)
    SELECT con_upc_no
    OF dbo.di_audit_corp_upc_tbl
    WHERE con_upc_no = @con_upc_no
    )
    BEGIN
    -Insert record
    PRINT "insert UPC: ' + @con_upc_no"

    INSERT INTO dbo.di_audit_corp_upc_tbl)
    rcp_dpt_cd
    cpt_dpt_cd
    cpt_com_cd
    sub_com_cd
    cas_upc_no
    con_upc_no
    con_upc_tx
    pid_lng_dsc_tx
    pid_sht_dsc_tx
    aut_vld_cd
    rev_by
    rev_dt
    ) (VALUES
    '07'
    @cpt_dpt_cd
    @cpt_com_cd
    @sub_com_cd
    '0000000000000'
    @con_upc_no
    @pid_lng_dsc_tx
    @pid_lng_dsc_tx
    @pid_sht_dsc_tx
    , 'N'
    @rev_by
    @rev_dt
    )
    END
    ON THE OTHER


    BEGIN
    -to jump
    PRINT ' UPC to jump: "+ @con_upc_no
    END
    < cftransaction action = "commit" / >
    -It is performed while the previous extraction is successful.
    FETCH NEXT from upc_cursor
    IN
    @cpt_dpt_cd
    @cpt_com_cd
    @sub_com_cd
    @con_upc_no
    @pid_lng_dsc_tx
    @pid_sht_dsc_tx
    @rev_by
    @rev_dt

    END

    CLOSE Upc_cursor
    DEALLOCATE upc_cursor

    If I understand your SQL code you select some records in the di_audit_corp_upc_ldr_tbl table.  For each record in the results, you insert di_audit_corp_upc_tbl if a matching record does not already exist in di_audit_corp_upc_tbl.  If this summary is correct, you could try rewriting your query to avoid using a cursor.

    Something like the example below might work (I have not tested this code).

    INSERT di_audit_corp_upc_tbl (rcp_dpt_cd, cpt_dpt_cd, cpt_com_cd, sub_com_cd, cas_upc_no, con_upc_no, con_upc_tx, pid_lng_dsc_tx, pid_sht_dsc_tx, aut_vld_cd, rev_by, rev_dt)
    SELECT ' 07', cpt_dpt_cd, cpt_com_cd, sub_com_cd, ' 0000000000000', con_upc_no, pid_lng_dsc_tx, pid_lng_dsc_tx, pid_sht_dsc_tx, "n", rev_by, rev_dt
    From di_audit_corp_upc_ldr_tbl
    WHERE THERE IS NO
    (
    SELECT *.
    OF di_audit_corp_upc_tbl AS B
    WHERE B.con_upc_no = A.con_upc_no
    ) - check to see if the folder already exists in the destination table
       
    AND
    (
    SELECT COUNT (*)
    FROM di_audit_corp_upc_ldr_tbl AS C
    WHERE C.con_upc_no = A.con_upc_no
    ) > 1 - replaces the HAVING clause in the original query used to select cursor

    Note that I assume you are using Microsoft SQL Server.

    For questions about the improvement of SQL queries you could be better off the coast to post this kind of question on a specific forum for the database server you are using.

  • my pc brethren, although when its turned on it tends to act like the lcd screen is broken. I need help to solve this please.

    the screen goes black don't like not when it goes into mode 'sleep', but it tends to fizzle out and fade to black

    Hello

    Check with a real computer store (one that makes its own service internal and not of leeks)
    and displays a Best Buy or other stores) or system manufacturer support. Also
    Ask known problems in their forums.

    Support MSI
    http://www.msi.com/index.php?func=service

    MSI - Downloads (drivers and BIOS)
    http://www.msi.com/index.php?func=downloadindex

    MSI - Forums
    http://Forum-en.msi.com/

    MSI - Service
    http://us.msi.com/index.php?func=service

    MSI - Live Update online
    http://www.msi.com/index.php?func=downloadindex

    MSI - Contacts - USA - North America value
    http://www.msi.com/index.php?func=HTML&name=aboutus

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • When I have my window starup (error loading dll) I need help to solve this problem

    HPDV6871US LAPTOP

    I uninstall a program from the control panel but some how when the starup high tower it allway come with dll (error loading)

    Help, please

    Uninstall the Kodak software system and if you need then this step to install it again.

  • Need help to optimize this script.

    Hello

    I use ID CS5 on Windows7.

    I have a requirment where I need to type text in a block of text perticular and copied it to any other text frames.

    I wrote this little script that does the job for me.

    It has a few obvious repitations and is ineffective.

    Please help me optimize it.

    myDocument var = app.activeDocument;

    myPage var = myDocument.pages.item (0);

    find a block of text with the title of specific script and store its content in a variable

    for (var i = 0; i < myPage.pageItems.length; i ++)

    {

    currItem = myPage.pageItems.item (i);

    If (currItem.label is "ParentText")

    {

    source var = currItem.contents;

    }

    }

    find all the blocks of text except the text with the title of script block and set its content to the source

    for (var i = 0; i < myPage.pageItems.length; i ++)

    {

    currItem = myPage.pageItems.item (i);

    If (currItem.label! = "ParentText")

    {

    currItem.contents = source;

    }

    }

    Hello

    You could match to your 'model' textFrame using string functions.

    Text operations are faster and there is no need of extra loops:

    var
              mLabel = "ParentText",
              mBreak = ";_;",
              mString = app.activeDocument.textFrames.everyItem().label.join(mBreak ),
              mID = mString.search(mLabel),
              mFrames = app.activeDocument.textFrames.everyItem().getElements(),
              source, k;
    
    if (mID == -1)  { alert ("Desired label not found"); exit(); }
    
    mID = mString.slice(0,mID).split(mBreak).length - 1;
    source = app.activeDocument.textFrames[mID].contents;
    
    for (k = 0; k < mFrames.length; k++)
              if (mFrames[k].label != mLabel)
                        mFrames[k].contents = source;
    

    Arrival to the string table returns a string,

    Search method returns the index

    Slice method cut the string.

    Split method trasforms it back towards the table length (minus 1) is equal to the index of the textFrame.

    The rest is to change the content of the frames inside a loop

    Jarek

  • need help to achieve this Qscn

    in the doc of the oracle, he said the following:
    Recover point-in-time of an existing backup of Dprod until some SNA Qscn in a separate area of the staging. Call this Dpitr database. The Capture process in step 2 must capture all transactions having a timestamp commit greater than this Qscn. It must have been positioned before the start of the transaction of long or when the source database is at Qscn. You can query a gv$ transaction and gv$ database to the source database to identify the long case and the current SNA at any point in time to determine where should be set up to Capture.


    How exactly to do this?
    Thank you

    The purpose of the story is to avoid duplication of transactions. When you start the extract, you need to start at some point in time which is just before the value of start_time of the oldest transaction in the database (select min (start_time) from v$ transaction/gv$ transaction).

    Then you have the data until a specific SNA say 1000. Now, as mentioned above, while starting the replicate, you use AFTERCSN to tell replicat that I already have the data up to 1000 YVERT (in this case)! you start to apply from 1001...

    Hope that helps...

  • Media Center 2005 crashed I loaded Windows XP sp2. Installing XP cannot load explorer.exe and another dll file... Need help or information on how to request recovery of microsoft disk MC2005... Gateway has not.

    Help please... I have a gateway gt4024 designed with Media Center 2005. Recently, the system was not "acting accordingly so I tried to reload the OS." I realized that I didn't have the recovery disc, then I decided to load XP Professional I had on it. The law on the computer is as it has been installed correctly and then I get a message saying explorer.exe could not be loaded properly or the drive perhaps is corupted and the same message to another .dll file. Once completed, I can reboot and use the computer, but then the windows installer will not work and the drivers are still present on the hard drive. Now, I loaded the new operating system before and I know that pilots are not supposed to be always present on the system. I then put a new hardrive has had the same problem. So, I then took the hardrive and placed in another computer that was be a dell and load xp fine without error. Can someone point me in the right direction. I contacted gateway to another Media Center recoverydisk, but they said because the computer was no longer under warranty, that they did not have the specified disc and to contact Microsoft. A link would be useful.

    BizzyBidnez,
    Thanks for posting on the Microsoft answers Forum.  Here is a link to the replacement of media information: http://support.microsoft.com/kb/326246
    However, since the entrance to the bridge of your system, the product key may not work with a replacement non - OEM drive.  I'm surprised that the bridge was not able to provide a replacement drive.

    I hope this helps. Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Need help to import sound into flash CS5.5! ???

    I have an MP3 of a song that I downloaded from beemp3.com. I tested to make sure it was not a virus or some thing as wheneever but I click on file-> import to library, I select the mp3 file and an error comes up saying that it could not be imported! I don't understand why he doesn't im [ort in flash. I'm using actionscript 3.0 incidentally. and it has the same error message when I try to import any song into flash. Anyone have the same problem or a solution?

    This is a common problem.  in every situation I've seen, the sound of opening in a sound editor and resave in mp3 format with a new name, authorized the file to be imported.

  • Hey once again, needing help to create this effect

    Hey guys, here's the thing: > I have 3 forms - 3 triangles that form a corner. I need to get an effect similar to the following image

    I did the left effect by gradient fill the 3 shapes, then stick to each, has chosen a new gradient, make the opacity for a new mask. Am not very happy with the result that they are not line up perfectly, suppose I could do a few more new forms on the top with different opacity masks to be closer to desired effect, but this procedure is very heavy and a lot of time. Wonder if this type of effect can be achieved with the NET tool? And if yes, if you are kind enough to illustrate how I can make work. Suppose that the mesh lines should resemble the following image. Great, it seems, it adds the new image on it the 1st one oh well: >temp1-03.png

    temp-03.png

    Cannot follow your geometric description.

    My gradient must have powerful white with a soft fade at the base of each triangle.

    There is no way to determine from your drawing which side is "the base" of three arbitrary triangles. If you call the outsides - people not involved in the inner corner trying to make - the basics, then for all three gradients you must ensure that:

    • The direction of the gradient is perpendicular to the outer edge (not at the angle of a line between the center of that side and the corner opposite). Otherwise, on the side outside of the rectangle of the gradient will not be the same angle as the edge, I think what you call the "base".
    • The white end of the gradient should be at or to the inside of the outer edge, not beyond. It is fine if the dark end of the grad extends beyond the centre; Here's how you can get different on the three triangles of shading using a definition of Grad.

    It's the 3 white stripes interiors where the triangles intersect is in reality a fade, is not an alignment problem.

    1. Online tool: draw a line from the center of the corner of one of the outside corners. Repeat for the other edges of two 'corner '.
    2. Select these three lines. Give them a call of white, some weight you want.
    3. Object > path > OutlineStroke.
    4. Pathfinder palette: Apply the Add/tous United operation as a real path (and not as an effect). You STILL did not say which version you are using, which is necessary for the statement says.
    5. Now, you will have only one path closed, filled with white, with edges lined up to return the graded "strokes" that looks like you describe.
    6. Give this way a radial gradient.

    If you want these 'lines' to scroll, you can change the path in a 'three-pointed star"shape or create it by using the star tool. (Size exaggerated below for clarity).

    JET

  • Need help to buy this T500

    Hello!

    Found a good deal on a new type of T500 224223U I just need to know if it has LED backlight and WWAN AT & T thank you...

    Just a reminder that it is a community of users helping, run by volunteers like me. Although the employees fly from time to time, she isn't a guarded Lenovo support channel.

    If, as sitereader said, the expedition of Tabuk said no LED backlight, it seems probable that the CFL.

Maybe you are looking for

  • The automatic update on Firefox poses a security problem as they say some sites

    I just noticed that some sites say that the automatic update of Firefox is a security risk and I was wondering if it was true

  • Impossible to install the driver of Logitech Webcam - error code 19

    Hi gurus, I just buy Pavilion m9400t with Vista x 64, Dual Core Quad Q6700. Install Logitech QuickCam Pro 4000 without problem, so I decided to upgrade with the new webcam (Quickcam communicate Deluxe) and the beginning of the problem.  Install the n

  • HP ENVY 700 and ACER T232 HL

    I just bought the desktop computer, running Windows 8 and monitor ACER T 232 I saw at best buy as a monitor capable of 'touch '.  I can't get this thing to perform as a touchscreen.  I have attached the DVI output of the computer and the USB cable, e

  • Highlights with false colors

    Just my DVF-L700 was updated with false colours. Very handy when taking Log2 S to display this 18% Gray card. But I really don't understand why after that rose (41, 3-45, 3%) there is nothing before yellow (102, 4-105, 4%)? Highlights, aren't suppose

  • Software LBAVMS16 of surveillance using VISTA with camera WVC210

    I have a promblem with the LBAVMS16 software supplied with the WVC210 camera, I have loaded on two laptops with no promblem they have Windows XP, works fine can see all 4 Camers.but when I installed it on my desktop that vita on it, when I try to ope