Problem with my account and the Group of

Hey there,

I have some difficulties to group by my result, and I ask for assistance in this forum.

My table is really simple, have an Ilie and a COM domain that contain the string with line breaks. I want to count the number of group ResId by COM.

My data in my table store have look like this:

RESOURCE TABLE:
ResId. COM
1. Server: Walcot15.\nCOD M50
2. Server: Walcot15.\nCOD M55
3. Server: Walcot16.\nCOD M55

I would like to get as a result:

Count (RESID) | COM
2. Server: Walcot15.
1. Server: Walcot16.

First of all, I did substr in order to keep only the string that contains the server and not the \nCOD...


SELECT
County (RES. (' ' ID ') as "ResId".
substr (RES. CMT, 0, instr (RES. CMT, Chr (10))) as 'COM '.

Of

RES THE RESOURCE

WHERE

REGEXP_LIKE (RES. ("' CMT ', 'Server', 'i')

Group (RES. "" THE ID ", RES. CMT)
order by
1

The problem is not count and group by server. Anyone help me, please?

Kind regards
Jarod.

Hello

When you assign a column alias (for example, COM) in a query, you can't reference this alias in the same query (except in the ORDER BY clause). It is necessary to repeat the expression or affect the aliases in a subquery. Then, you can use the alias in any part of the request of the mother.
For example:

WITH     got_com          AS
(
     SELECT     id
     ,     SUBSTR ( cmt
                 , 1
                 , INSTR (cmt, '\') - 1
                 )     AS com          -- Alias defined
     FROM     resources
     WHERE     INSTR ( UPPER (cmt)
                , 'SERVER'
                )     > 0
)
SELECT       COUNT (id)     AS count_resid
,       com                         -- Alias referenced
FROM       got_com
GROUP BY  com                         -- Alias referenced
ORDER BY  com                         -- Alias referenced
;

Output:

COUNT_RESID COM
----------- ------------------------------
          2 Server : Walcot15.
          1 Server : Walcot16.

If the idea is to have a production line for evry value distinct from com, the GROUP BY clause should not contain anything except com

You will notice that I used SUBSTR and INSTR, above, in the places where you can also use regular expressions. This is because regular expressions tend to be much slower. If the speed is not a problem, and you prefer to use REGEXP_SUBSTR or REGEXP_LIKE, then it is fine to use.

Tags: Database

Similar Questions

  • Anyone having problems with Windows 7 and the HP LaserJet P2035n?

    It seems, after a few months of service, there are several problems with this printer and Windows 7 only.  We have several offices that use this printer and almost each one has similar problems.  It will printer randomly disappear, not being able to print anything at random times of the day, to the spooler crashing every two minutes or more.  There is no problem at all with Windows XP or Vista, only 7.  Reinsalling the printer driver takes care of the problem for a few days, but the questions up all over again.

    Hello

    The Microsoft Answers community focuses on issues and problems related to the consumer environment. Please join the Technet forums below:

    TechNet forums

  • Why those my xbox tells me there is a problem with my account and pay a method

    I'm trying to pay for an account or on my xbox but it keeps telling me that there is a problem with my account. He told me to visit https://account.live.com but I'm still confused

    Ask in an Xbox forum.
    http://www.Xbox.com/en-us/forums

  • Problem with Microsoft Accounts and Apps store.

    Hello, I've used Windows 8 for about a week and that you had downloaded Apps successfully on my first account of Microsoft.  I have now opened a second account and closed the first, but when I go to download an App store gives the email address and request the password for my first account.  How can I get to recognize that I have a new account?

    Thank you

    Hello

    Thanks for the reply.  I closed a full Microsoft account with an e-mail address.  I opened a second with another email address.  When I go into Apps and you try to install it comes up with my old address e-mail and, of course because it is closed, does not recognize the password.  I need to leave Apps store know there bad Microsoft are associated account.

    In the meantime I opened another user and this allows me to access applications normally but I wish I had the original problem solved if possible.

    Chris

  • Huge problem with my account and Customer Service

    I like the software and products, but I have to say that the customer service was the worst I have experienced in a long time.  The last 5 days have been hell.  Let me explain.  My sub was scheduled to end on 26/11/2015.  He was going to renew and I frankly, as a student, not the means to do so at the price.  When I explained my problem to an agent, she said she would take off auto renew and said: I can re - register with the current promotion.  I thought wow that's great, that she sent me an email of confirmation of this.  11/26 so I renew now, everything seemed well on my end. When I looked at my bank statement I see the full price.  I chat with 2 people who said there was nothing that they could do for me is the price, and I explained to him that I understood, but the agent told me otherwise.  A 3rd officer said as she promised it we will honor it.  So far, I've been very happy.  It reimburses the renewal and implements the new sub 09/12/2015.  Here's where the hell is happening.

    I'll connect and I see this:

    adobe ss1.PNGadobe ss2.PNG

    Why he asked me to but if I already have my renewed sub?  Then I see the second photo and I think why are there 2 CHP schemes.

    Of course, I start Muse and get a notification saying that I can't use my fonts typekit because of my plan and my creative space cloud is only 2 GB when it should be 20 GB.

    12/10 - I chat with someone, they say that it's the app.  I tried to explain things on adobe.com has not looked right and that could be the problem.  I said that there was a problem processing the order and that they need 24 hours to update.  The case, I was told, should be wound.

    12/11-after checking that I still have the same problem after 24 hours.  I discuss with someone more... they think that his app problem.  I connect several times and the problem remains.  They say they see 20 GB of space on my account but the mobile apps, nor my creative application cloud show that.  Yet once, they say they will get worse and it will take a day.  At this point, I'm worried because I have work to do and the customer wants the Web site with the police agreed.

    12/12 I'm in Office of lightroom and the software tells me that my sub has expired.  I have check the lightroom mobile and see the same thing.  Now I can't synchronize my lightroom library so that I can work.  I discuss it again.

    They thing its a problem app and I sign in several times.  Nothing.  I tell them "Please help me, I depend on this ingration and will lose my job if I can't work in all devices".  Friendly but no help.  They said that he was sent to the highest priority and that's all they could do.

    12/13 I check and of course, nothing has changed, well, I saw 20 GB of space on my mobile apps.  But the creative desktop application cloud always says 2 GB. No lightroom and not Muse type fonts kit.  I chat with someone, and they say that it is a technical problem and I have to wait until Monday to get anything resolved.

    12/14 - I spoke with someone and explained what happened.  They would transfer the chat support, but apparently at 12 am EST they would be unavailable for 2 hours.  Then he gave me a number to call.  I called the number and gave them they case # all this... He wanted problem draw apps.  I said that they all work and that there was a problem in the recognition of my membership.  I explained the screenshots and still nothing.  He wanted to deal with the issues the blow by blow.  I have a problem with Lightroom, so he wants to send me the Photo team, do not understand that this is a symptom of something of a bigger problem. I decide I'll try Photo team, at least, then I could fix it and work.  The guys on the team photo was very nice, even if he could tell that I was very frustrated.  He explained that there might be a problem with the application.  So I installed on another computer.  He made a screenshare and how I showed him the tab account and 'ready to buy' screen that I saw.  I am enrolled in my application with his account creds and understood that there is no question here.  He then said that I was right and that there was a problem of ID with my ID and he needed that escalate to this team.  That it can take 24-48 hours to fix on the back.

    How am I supposed to be creative and use these applications with all this back.  Escalations will teams do not look at the problems, agents who are really just read from a script, it feels and have no way to help with an unusual problem.  Everything is stereotyped and they want to do the same procedures, no matter how many times you already have or how from a common sense point of view really does not apply.  It made me rethink where the it products worth despite this lack of service, help and perhaps delays.  I could lose a job because of it, and I paid for the entire year already.  I paid and still cannot use my services entirely.  I apologize for the length of the present, I have not nowhere else to turn.  Everyone knows this?  Can someone on staff help?  Here, I'm desperate.

    Case #:

    0217314429

    0217297716

    0187326545

    0187327032

    0187327032

    Thank you

    Jay

    Thank you for checking on him KGLAD.

  • Problems with external monitor and the Satellite U200 - 10 d

    I have a Satellite U200 - 10 d running Vista Business Edition. When I attach an external display screen flickers (horizontal lines on the screen)... It's worse when you move the mouse on the screen. The monitor on the laptop is fine I just have problems with the external display.

    The screen that I is a model VG1930WM viewsonic (widescreen) here is the specs of res for this screen...

    PC VGA up to 1440 x 900 non-interlaced
    Analog analog/digital RGB (75 Ohm, 0.7 Vc - c) / DVI - D

    Anyone have any ideas? I checked the graphics driver for vista and this is the latest version...

    HM, it's a nice solution, I have a friend with a similar problem.

    We will try your suggestion, snipe and perhaps give feedback if it worked for us.

    Welcome them

  • Problems with hotmail account and spam messages

    woman ask me if I sent the e-mail here say no and she said yes u has sent chk mail so I chk I see 40 more emails sent to friends of game and other envoys I never email only im these people so amended past made sure that the antivirus and firewall are on which windows firewall and firewall of the ISP to have been report this and what they're doing or better how I found EM don't hang by the fingers so no type can I have 8 years using a pc do not need to open some * * cause that will be * me off so should I before all emails to microsoft support and let them see them lol serious need help to find was these come from

    Chances are very good that you will never know who hacked your email. I'll tell you this, however. I answer questions of computer in order to help people with their computer problems on many different forums. I can't tell you how many times I've seen issues where someone hotmail has been hacked. I rarely see this problem with Yahoo Mail. Gmail (from Google), or any other e-mail service. My line of thought is the question, or I should say the cause, is linked to all calls to scam people get the India with the con man, who claims to be with Microsoft. In many cases, these crooks know the serial number of the computer to individuals. Received calls more often follow a software crash in which the 'Send' error report 'do not send' appears on the display of people. That, in itself and tells me that it is an inside job. It is more convincing when you consider that Microsoft has moved almost all of their centers of support for the India. Someone somewhere (MS India) is selling this information.

    Scan your computer with Malwarebytes. Make sure that update you it before analysis. This is to ensure that no keyloggers on your computer, steal your passwords and/or credit card information. If you need help to use Malwarebytes click HERE.

    After completing the above steps, contact MS and tell them to move their call centers in the United States. These incidents constantly, but will be will be diminished.

  • Problem with Windows Explorer and the recorded files

    When I save files from the internet and then open the folder with Windows Explorer in the backed up files, I find that WE consider not save them on my hard drive "change" more. I know it's strange, but I tend to retain files roughly in the order that I saved them, rather than by the name of the file or anything else. So now to manually change the files in a certain way, then save them to get them organized as I want. Of course, this can become very painful and long if I have a lot of files to organize this way. My question is: How can I get Windows to consider saving a file on my HDD as change? I use Firefox and updated recently, which may be the cause of the problem.

    Hi Flingle,

    Were you able to save and access files correctly before you update Firefox?

    You can create a new folder & try to download the file inside of Internet Explorer & check if the problem persists.

    Hope the helps of information. Please post back and we do know.

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

  • I was wondering if there were other problems with Adobe CC and the last IOS El captain?

    I've recently updated to IOS Yosemite to El Capitan, when I went to launch Premiere Pro for the first time, there were a few very visible differences of how things went, if not, the program has worked very well.

    Thinking that this might just be a problem after installing just El Capitan, I thought that a reboot would clear things up. When I went to restart, I could not go beyond the initial start-up of the grey Apple screen, I ended up having to wipe the drive and reinstall El Capitan, nd, then migrate my data from my backup of TM, what a shot, it took hours to complete.

    Anyone else having similar problems? Anyone know when Adobe get out their CC to CE upgrade?

    I don't know about Apple (I'm on Windows), but I read that Microsoft has a way to restore the previous operating system if an upgrade to Win10 does not work

    I don't want to know about it, because my Win8.1 works with all my current software... I have read Win10 problems with the software that I have now, so I will NOT go to Win10

    If Apple does not offer a way back to the BONE you had before, I think you're stuck with problems until 'the 3rd party vendors' make changes to work with El Capitan

    And, if you do a "time machine" backup before the upgrade, be aware that TM backups do NOT work with Adobe because of... hidden folders software then you would need to uninstall and reinstall

    And just so you know, Microsoft has also problems with Mac 10.11 El Capitan

    -http://www.macrumors.com/2015/10/05/microsoft-office-2016-el-capitan-bugs/

  • Problems with configuration properties and the java plugin

    Hello

    I have test the java plugin from the hyperic documents. Autodiscover works very well. Now, I had the problem if I want to change all "configuration properties" I get following error message:
    ' The configuration has not been set for this resource due to: invalid configuration: error reported by Agent @ 141.73.130.146:2144: java.lang.NullPointerException.
    Wait I use properties by default, then I don't get any errors.

    What is the problem?

    MyAutoDiscoveryServerDetector.java
    ---------------------------------------------------------------------------------------------------------------------------
    SerializableAttribute public class MyAutoDiscoveryServerDetector extends ServerDetector implements

    {AutoServerDetector}

    public list getServerResources (ConfigResponse platformConfig)

    get {PluginException}

    Server list = new ArrayList();

    Server ServerResource = createServerResource ("My Auto-Discovery Server->" + (x + 1));

    ConfigResponse productConfig = new ConfigResponse();

    productConfig.setValue ("myTimeout", String.valueOf ((x+1) * 1000));
    productConfig.setValue ("myUrl", "http://127.0.0." + (x + 1));
    productConfig.setValue ('Description', 'Description - my Auto Discovery Description->' + (x + 1));
    productConfig.setValue ("myValue", 10);

    server.setProductConfig (productConfig);

    Servers.Add (Server);

    return of the servers;

    }
    ---------------------------------------------------------------------------------------------------------------------------

    HQ - plugin.xml
    ---------------------------------------------------------------------------------------------------------------------------
    <? XML version = "1.0"? >
    < package = "com.citytechinc.articles.hyperic.plugin plugin" >

    < name of the filter = "domain" value = "My Auto Discovery" / >

    < name of the server = "MyAutoDiscoverServer" version = "0.1 c" platforms = "Unix, Win32" >

    < plugin type = "autoinventory" class = "MyAutoDiscoveryServerDetector" / >
    < plugin type = 'measure' class = "MyAutoDiscoveryServerMeasurementPlugin" / >

    < config >

    < name of option = 'myUrl '.

    Description = "Enter the URL for this resource"

    " default = ' http://127.0.0.1 "/>

    < name of option = "Description".

    Description = "enter a description of this plugin"

    default = "default my Auto Discovery Description" / >

    < name of option = "myTimeout."

    Description = "time-out for something in my plug-in.

    default = "0" / >

    < name of option = "myValue"

    Description = "a metric value.

    default = "10" / >


    < / config >


    < name metric = "availability".
    alias = 'availability '.
    Template = "System.avail:type = Platform:Availability"
    category = "AVAILABILITY".
    indicator = 'true '.
    collectionType = "dynamic".
    units = "percentage" / >

    < name metric = 'value '.
    alias = 'value '.
    model = "" MyPlugin:Type = value: value ' "
    category = 'USE '.
    indicator = 'true '.
    collectionType = "dynamic".
    units = "none" / >

    < / Server >

    < / plugin >
    ---------------------------------------------------------------------------------------------------------------------------

    UM,.

    This must be due to an incompatibility between the definitions of plugin in the server (and/or of the database) and the agent.

    First of all, always check the server log, errors that appear it should lead to the cause.

    The plugin xml initialized ok on the server, or any error appear?

    You go to Administration-> default trace and see your plugin (Server Type: MyAutoDiscoverServer) and everything is there?
    If this isn't the case, errors occurred when starting the server, check the log.

    Did you start to shave - created the plugin, added to both server and agent, autodiscovery, the platform/server added in Hyperic - or you already had the server/platform added in Hyperic and who has made some changes in the xml plugin that may be in conflict with what is already in the Hyperic database?

    Generally the pitfalls that come from these errors.

    Been there, done that.

  • Problem with PSE - 2 and the new 1.5 TB drive

    Hi all. First of all, I use my PSE - 2 recorded for several years without problem. AMD Athlon 7750 2.7 Ghz, 2.0 G memory bicoeur. WD 1 .5TB primary and WD 500 GB secondary drive. Win XP SP3. I recently had a disk fails and installed a new freshly formatted WD 1.5 TB as my boot drive. New installation of Windows XP and updates. When I install the elements, it now seems to install fine. The problem comes when I try to run the first time that I get "could not initialize Photoshop Elements because scratch disks are full '. Then elements shut, not allowing no not me nothing to do with configuring internal program. I tried unistalling and installing on the 500 GB drive, but still not the same error. I increased my page file memory does anyone know of a problem with the installation of the elements on a large drive or can anyone offer a possible solution to what I see? Thanks in advance for suggestions...


    JohnR.

    I think Barbara meant photoshop 7, which was a little before pse2.

    If you hold them Alt + right Ctrl keys after starting pse2, a dialog box

    should appear allowing you to choose the drive working (keep holding

    keys until the dialog box is displayed)

    If you have a recovery partition on your hard drive, try this to choose

    the drive working, then exit pse2. Then restart pse2 and

    Preferences > Plug-ins and Scratch Disks choose your hard drive regularly to the scratch disk.

    Newer versions of the EPS, the newer less than 3 or 4 don't seem to have this problem.

    MTSTUNER

  • Windows 7 starts problems with black screen and the cursor because of power failure

    I'm on a Windows 7 64-bit Home Premium OS. Start-up problems arose after the power failure (accidentally unplugged the charger, the battery was not in place) during a video call in Skype. Accessories attached to the laptop at the time were a Logitech Webcam, a dongle Bluetooth, microphone and headphones.

    When starting my laptop Asus N81VP, he'll go as far as the 'Starting Windows' logo, then I meet a black screen with a mobile cursor. I don't then right click, CTRL + ALT + DELETE.

    I tried the things:

    Start Up Repair = "cannot automatically repair."

    System Restore = no available restore points

    Windows Memory Diagnostic = at 100%, no screen of detected problems, then black with mobile cursor

    Networking Mode Safe Mode/Safe = black screen with cursor mobile

    Activate video low resolution (640 x 480) = black screen with cursor mobile

    Good known Configuration = black screen with cursor mobile list

    Start Windows normally = black screen with cursor mobile

    Please help me. I've had this laptop for less than a year, and it would break my heart to have to re - format.

    You seem to have exhausted most of the options available in such cases, except two:
    D ' log in under a different account.
    -To restore your registry files manually. See below for more details.

    On your heart that could get broken: have you considered using the imaging facility that is integrated with Windows 7? You can find it in the control panel / backup and restore. This is somewhat marginal in the feature and it can be finicky, but it saved my butt several times.

    You can restore your registry files manually to a previous point through the steps described below. The process is complex and requires some careful typing. Ask a computer-savvy friend to help you if you lack experience in this field. Note that it may reset your password to a previous value.
    1. keep tapping F8 during the first phase of startup.
    2. Select repair in the menu that looks like this:
    http://Windows.Microsoft.com/en-us/Windows-Vista/advanced-startup-options-including-safe-mode
    3 log in as administrator if you are prompted.
    4. Select repair when prompted.
    5. Select the command line in the menu that looks like this:
    http://Windows.Microsoft.com/en-us/Windows7/what-are-the-system-recovery-options-in-Windows-7
    6. identify the correct drive letter for your Windows installation. It could be one drive other than c, but it will not X:. You do this by typing commands
    DIR C:\Win*
    Dir D:\Win*
    dir E:\Win*
    until you find the Windows folder.
    I'll call this "Q:" drive
    7 type these commands:
    CD /d Q:\windows\System32\config
    xcopy *. * Q:\MyRegBack\
    CD RegBack
    dir
    8. review the dates of the software, system, and SAM files. The files created before or after that is your problem?
    9. If they were made before the problem appeared, you can then type these commands:
    copy software / y...
    /y copy system...
    /y copy Sam...
    (the two points are part of each order)
    10. restart normally. If things don't work then you can go back by copying files from the original register of Q:\MyRegBack to Q:\Windows\System32\config.

  • Problem with Active Directory and the NAC

    Hello.

    Please I need help.

    I have my server with the "Active Directory SSO" began, but when a user tries to connect to the network with its credentials in Active Directory, the PC agent say that 'Invalid username and password.

    My server is tuned by the 8910 port.

    I conectivity with CBS and active directory.

    kpass command runs successfully.

    Thks.

    Jorge,

    If the service is running, then you must put emphasis on the communication client/AD and see where the break occurs.

    Can you ensure that the unauthenticated role, you have all the required TCP/UDP ports open, and ICMP and IP FRAGMENTS to all your domain controllers?

    HTH,

    Faisal

    --

    If you find this article useful, please note so that others can easily find the answer

  • Oracle Weblogic domain creation problem with Webcenter portal and the content of the products.

    Hello

    I tried to create a new domain weblogic support webcenter portal and content products. However, I got the following error on the progression of 70%:

    --------------------------------------------------------------------------------------------------------------------------

    Preparing...

    Extract the contents of field...

    Creating new domain security information...

    Failed to create in the domain!

    Location of area: C:\Oracle\Middleware\user_projects\domains\base_domain

    Reason: null

    Exception:

    Traceback (innermost last):

    "< Iostream >" file, line 86, in there?

    ImportError: no module named javaos

    --------------------------------------------------------------------------------------------------------------------------

    Server operating system: Windows Server 2012 R2

    FMW Version: 11.1.1.8

    Your help would be greatly appreciated.

    Thank you

    Cyrus

    Hello

    Did you add the name of your operating system (Windows Server 2012) in the javashell.py file?

    After you add the name of your os you must re-create the jython file - modules.jar.

    Use after command to generate the jar again

    jar - cvf jython - module.jar Lib META_INF (records created after extraction of the jar file)

    I have also been facing same problem, solved by above to get around.

    -Prashant

  • Problem with VMWare Tools and the virtual drive

    Hello

    I installed the test version of "Workstation" and installed a windows 7 x 86 non-virtual DVD drive mapped, which is mounted on D:\.

    Subsequently, I installed all Windowsupdates and after that I tried to install the VMWare Tools.

    But every time I get the message that I should look on the 'virtual' drive on D:\.

    But there is no virtual drive, it is my DVD of the hostsystem.

    Is there a way to mount a virtual drive with tools or install them in another way?

    Thanks in advance

    Taldrit

    Hello

    You can directly install the VMware tool configuration by copying the setting in the machine and manually install the same.

    Try VMware on another machine tool in which you will get the installation... Copies on disk and then move it to your new VM and do a manual configuration.

Maybe you are looking for