'Group by' over CURSOR

hi!
i have a problem with grouping over a CURSOR.
when i execute the following statement, i get the following error 'not a single-group group function'.
how can i manage to group over the CURSOR? or is the problem elsewhere?
i cant do sth. like 'group by TALIAS2.id' because i cant adress TALIAS2.id.
would be very glad for advise.
cheers!
SELECT SUM(TALIAS1.price),
CURSOR(
SELECT TALIAS2.id AS ID
FROM dual TALIAS2
) AS CUR_BESTELLUNGEN
FROM table1 TALIAS1
---------------------------------------------------------------------------

you don't need a cursor statement for the example that you've given. Maybe you simplified it too much?
One solution can be a simple join:
SELECT SUM(TALIAS1.price), TALIAS2.id AS ID
FROM table1 TALIAS1
CROSS JOIN dual TALIAS2
group by TALIAS2.id This code of cause does not make any sense at all. As a starter: Dual does not have a column id. And since it has only one row, you would need get different groups. So please give a more reasonable example.

Similar Messages

  • Advantages of Collection over Cursor

    Hello All,
    Cursor acts like a pointer to the query result.
    Collections stores the query result.
    But,
    What are the advantages of collection over cursor?
    I Googled it but didn't find the exact info.
    Thx

    Prabodh wrote:
    Hi,
    Each has its own use. They do not compete but supplement each other.
    One has to use them , mix and match, together.
    If collections were all that useless then they would not have existed , and neither would have BULK COLLECT.
    Within COLLECTIONs, you have NESTED TABLES, ASSOCIATIVE ARRAY and VARRAY. The VARRAY is probably still around for backward compatibility, but other 2 are extremely useful.
    Points to consider:
    a) Bulk Collect is much faster than CURSOR loop
    b)Collection once loaded can be manipulated in memory. Faster but heavy on PGA.Faster than what exactly? Certainly not faster than just doing it in SQL. Faster than row by row cursor loop processing? Depends what "manipulation" is required.
    c) NESTED tables allow you to organize data, can be used with Cursor!
    d) String to table and table yo string (like java String.split method) possible only with Collection. Not possible without Collect / arrayAlso possible with pure SQL.
    I cannot imagine a world without COLLECTIONs. I use them extensively, just like I use CURSORS.I've had a few uses for them... but only a few. Most of the hard work is done on the database using SQL.
    Still not convinced? Look up the Specs of OWA_UTIL, DBMS_SQL, APEX_APPLICATION_GLOBAL, etc. They have Associative Arrays all over the place.
    In fact Application Apex would not have come into existence with Associate Arrays; they are used left, right and center in it
    All the negative opinions expressed on Collections only reflects ignorance.
    "How to make friends and influence people" by Prabodh

  • Group messages over wi-fi in iOS 8

    I have been in a group message chat with two other friends for over a year now, and it's always sent no problem over wi-fi. I just upgraded to iOS 8, but can only send my group texts now. Is this because they only have iOS 7 and older?

    I'm having the same issue. 3 other people for the past couple of years, they haven't upgraded yet, I have and I can't send anything to them through my iPhone but my iPad can. I feel like Apple has stopped caring to beta test any of their software before it's released. They just release it, let everyone complain about it, and that's how they know what do fix. This is ridiculous.
    iPhone 5 (GSM), iPad Mini (GSM), iOS 8

  • How to "group by" over a range?

    hi
    I have a table like this:
    x     y     AMNT
    1     120     12
    1     120     93
    1     125     31
    1     260     15
    2     56     16
    2     115     49
    3     45     71
    4     19     11
    4     16     48
    5     94     52
    5     98     47
    I want to group records on x , y columns and aggregate on amnt column, in which difference between values of y column be less than 10.
    The result is like this:
    x     y     sum(AMNT)
    1     ?     136
    1     260     15
    2     56     16
    2     115     49
    3     45     71
    4     ?     59
    5     ?     99
    What query can I use?

    Like this
    "afiedt.buf" 25 lines, 901 characters
      1  with t
      2  as
      3  (
      4  select 1 x, 120 y, 12 amt from dual union all
      5  select 1, 120, 93 from dual union all
      6  select 1, 125, 31 from dual union all
      7  select 1, 260, 15 from dual union all
      8  select 2, 56 , 16 from dual union all
      9  select 2, 115, 49 from dual union all
    10  select 3, 45 , 71 from dual union all
    11  select 4, 19 , 11 from dual union all
    12  select 4, 16 , 48 from dual union all
    13  select 5, 94 , 52 from dual union all
    14  select 5, 98 , 47 from dual
    15  )
    16  select x, case when max(cnt) = 1 then to_char(min(y)) else '?' end y, sum(amt) amt
    17    from (
    18            select x, y, amt, y_next, case when y - y_next <= 10 then 1 else 0 end y_ind, count(*) over(partition by x,  case when y - y_next <= 10 then 1 else 0 end) cnt
    19              from (
    20                      select x, y, amt, nvl(lag(y) over(partition by x order by y), y) y_next
    21                        from t
    22                   )
    23         )
    24   group by x, y_ind
    25*  order by 1,2 desc
    SQL> /
             X Y                                               AMT
             1 ?                                               136
             1 260                                              15
             2 56                                               16
             2 115                                              49
             3 45                                               71
             4 ?                                                59
             5 ?                                                99
    7 rows selected.
    SQL>

  • Brush panel continues to pop up suddenly over cursor(PS-cc bug?)

    Help please-whenever I try to use my brush too the brush panel pops up over the cursor forcing me to hit undo or click elsewhere to remove it. This is every stroke of the brush- not when I first switch to that tool. This was not a proble 24 hours ago until I upgaded to PhotoshopCC! I have gone through the preferences menu and made every change to the brush panel that I could. But it still happens.  I am on a pc with window8 and 16ram and a Cintiq21. I would really appreciate any help as this is really slowing me down.

    THANK YOU!!! My rocker switches on all my pens had been reset for Adobe programs but still read as right click whenever not in Adobe which the Cintiq assumes is any second my pen is not on the screen- grabbing for my brush with the rocker switch still in right click mode (a quarter of and inch from the screen) was the problem. Thanks again!

  • OU Group Policy over-riding User Group Policy

    I'm using ZfD 4.01 ir7 and have a restrictive Group Policy applied at the
    OU level. I've created a less restrictive Group Policy and assigned it to
    a user within the above mentioned OU but the settings are not
    taking...the OU Group Policy is over-riding the user Group Policy. The
    appropriate rights have been assigned and this configuration is working
    for other users/OUs in the tree. I've run a dsrepair against this
    partition and no errors were reported.
    Any suggestions to resolve this would be greatly appreciated.
    Ryan

    Paulr,
    It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at http://support.novell.com in both the "free product support" and "paid product support" drop down boxes.
    - You could also try posting your message again. Make sure it is posted in the correct newsgroup. (http://support.novell.com/forums)
    If this is a reply to a duplicate posting, please ignore and accept our apologies and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Does Internet Explorer take over cursor control ?

    Hi all,
    Is it possible that Internet Explorer takes over control of the settings of the cursor in Shockwave dcr files ?
    Since a couple of months I have realized that the cursor in my dcr movies does not change anymore from the default pointer despite being instructed using lingo commands.
    For example:
       on startMovie me
          cursor 280
       end
    should change the cursor into a finger, but it does not.
    I have also tried hiding the cursor (cursor 200) and using my own custom made custom but the default pointer refuses to disappear.
    When using Google Chrome all works well.
    Hower, this is not a proper solution since I cannot control the users choice using Internet Explorer or Google Chrome.
    I would expect a lot of screams from all over the world but the lack of that makes me think there maybe a simple way to avoid this.
    Any comments are very much appriciated.
    Ted

    Hi all,
    Is it possible that Internet Explorer takes over control of the settings of the cursor in Shockwave dcr files ?
    Since a couple of months I have realized that the cursor in my dcr movies does not change anymore from the default pointer despite being instructed using lingo commands.
    For example:
       on startMovie me
          cursor 280
       end
    should change the cursor into a finger, but it does not.
    I have also tried hiding the cursor (cursor 200) and using my own custom made custom but the default pointer refuses to disappear.
    When using Google Chrome all works well.
    Hower, this is not a proper solution since I cannot control the users choice using Internet Explorer or Google Chrome.
    I would expect a lot of screams from all over the world but the lack of that makes me think there maybe a simple way to avoid this.
    Any comments are very much appriciated.
    Ted

  • Call Manager Express Hunt Group roll over doesn't work correctly

    Hello,I have a wierd issue occuring on the CME portion of a client's UC520. Currently, I have a hunt group set up that has 1 user and then the auto attendant. Basically, I want to give a user a chance to answer the main line, and if she doesn't, it then roll's to the main auto attendant. This is working as long as I keep the time out on the hunt group under 12 seconds. The issue is that is about 2.5 rings. She'd like a little more time to be able to pick it up. When I put the time out above 12 seconds (say 16) and dial from an external number, it rings her phone correctly, then you can hear it attempt to transfer, but it transfers it back to her phone instead of rolling over to the auto attendant. You can even see on her phone that the transfer occurs and it transfers to herself. For an instance, it shows 2 calls with the same caller ID. Change the time out back under to 12 or under, and everything works great. Any help would be greatly appreciated.

    Sorry about that. Here is the IOS.
    Cisco IOS Software, UC500 Software (UC500-ADVIPSERVICESK9-M), Version 12.4(24)T, RELEASE SOFTWARE (fc1)
    And here is some relevant code.
    ephone-hunt 1 sequential
    pilot 501
    list 201
    final 401
    timeout 11
    no-reg pilot
    statistics collect
    destination-pattern 401
    b2bua
    voice-class sip outbound-proxy ipv4:10.1.10.1
    session protocol sipv2
    session target ipv4:10.1.10.1
    dtmf-relay sip-notify
    codec g711ulaw
    no vad

  • EJB-Developer group - now over 1900 members strong!

    EJB-Developer (http://groups.yahoo.com/group/EJB-Developer) is a great place
    to ask your EJB questions! It's all technical, all the time.
    (EJB-Developer technical discussion group is a nonprofit service in
    operation since September, 1999)
    Best regards and happy holidays,
    Steve/Moderator

    Bing,
    I think one thing you might want to do is to post your code on the Web somewhere. Maybe you can open a Weblog and post this there.
    http://www.jroller.com will let you open a blog for free we'll love to see more customers of JDeveloper opening weblogs and sharing their experience over the Web.

  • How to span parent group results over child group results

    Hey,
    I have created a matrix report with 3 groups, for example,
    Grade for rows, and age and gender for columns:
    -----10---11----12
    ----M F M F M F
    1
    2
    3
    What I am looking to do is make it appear like the age group result is centered above each of the gender group results (both M and F together), appearing to span them both, so for example the 10 will be centered above the M F as above. Right now my 10 only spans as far as needed to hold the result and it looks funny.
    Any ideas, and did I explain what I am trying to do ok?

    Hello,
    You can try this... make your age and gender fields of the same length size long enough to accomodate the longest text, then change the alignment of the these columns to center and the horizontal elasticity to fixed.
    -Marilyn

  • Group messaging over WiFi

    I just purchased a Droid Turbo and I can not receive group text messages through WiFi. I had the Samsung Galaxy 3 before I bought this phone and it allowed group text to come through while on WiFi. My data would be off but it would turn on momentarily just to get the group message through. Does the Turbo have this feature??

    If you disable Data MMS will not come through. However Verizon's new Messaging app uses the data network as does hangouts(though hangouts only uses the wifi or data for hangouts messages). Give one of those apps a try.

  • SSRS show trend chart over column chart per series groups

    Need help in designing following report in SSRS, where I have a chart report with 2 category grouping fields and 1 series group field (as with category grouping, the reason being, i need to show columns in group of 4 joined together based on their grouping
    on top) .
    Below are my queries
    1. how to show my category grouping values on top of chart (showing group in different color) and series grouping values on bottom of chart (under each bar)
    2. I need to show trend line over each series group data.
    For example, First category group is over hotel name, second category group is over room type (deluxe, executive & suite) and one Series group over week number (for a month report), and the chart value is total occupancy (per hotel per room type per week
    number). Now for point 1, Hotel name and room type needs to be on top of the column (total occupancy) chart, where a week iteration number (1,2,3,4 for a month) at the bottom of the chart under every column.
    And for point 2, I need to show trend line per room per week occupancy was improved or not.
    Regards, Sujay

    Hi Sujay,
    According to your description, you want to display the two category group values at the top of the total occupancy value. Also you want to create a trend line over series values.
    For your first requirement, you can specify the Label data as a combination of two category group values and total occupancy values. Then change the location of series group value legend. Please refer to below screenshot.
    For your second requirement, you can add additional total occupancy values to the Chart Data panel, then change the chart type as Smooth Line.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Cursor not understanding to jump below "pasted in" group of objects...

    Hi,
    So I have one large text box on the page and am pasting in the content bits at a time. Now, I have pasted in a group of objects. I am ready to continue pasting in more copy below the group, but the cursor does not understand to jump down below the last items pasted in - e.g. the group.
    In order to position the copy, I need to hit return / enter on the keyboard quite a few times for it to be positioned below the group. This is incorrect and will mess up the flow. I want everything to flow as I add more / subtract content.
    How do I get the cursor to "know" to keep moving forward and to go around the group and blink on the line directly below the grouping of objects?
    Thank you.

    Aha, I suppose this is where the text wrap comes in handy to solve the problem. (I started thinking in Quark terms with its 'runaround' feature.)

  • Two wistnesses in a SQL Server fail over group

    Is it possible to have two witnesses in a SQL Server Always on Availability Group Fail Over Cluster? Our goal is to have redundant witnesses in an Azure availability set.
    Thanks,
    Mike

    AlwaysOn uses Windows Failover Clustering for quorum.  See, eg Understanding Quorum Configurations in a Failover Cluster
    You can do this, but with Dynamic Quorum it's probably not helpful.  If you loose your witness vote, the cluster will adjust the quorum requirements.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Voice Over : Mouse pointer moves VO cursor Question

    Hi!!
    I have low vision, and i want to use the voice over with my mouse and/or trackpad. Im able to see where the text is but i cant read it well. When I enable the Voice Over I select "Mouse pointer moves Voice Over cursor in the preferences. This works fine for me, vut i noticed that when i drag the pointer over the finders sidebar it select the folders without me clicking on them. Something similar happens in Safari when scrolling the web page. There is any way to avoid this?? The Voice Over with the keyboard is very nice but  sometimes I rather use the mouse.
    Thanks in advance!!

    ladislavfromcygnet wrote:
    Thank you Shootist007. I cannot do even Update now. I probably should have spent the same amount of money on a new IMac!
    No not really. If this is a brand new Macbook Pro take it back for a refund. Apple has a 14 day No Questions Asked return policy for Full refund.
    Take it back, get the Full Refund (DO NOT LET THEM TRY TO FIX IT. YOU BOUGHT A NEW COMPUTER NOT ONE THAT HAS BEEN WORKED ON OR NEEDS TO BE FIXED) and then decide whether to buy another Macbook Pro or the iMac. Or you could return it, get the Full refund and buy some other brand computer.

Maybe you are looking for

  • Error while creating index

    hi all, i got this error while creating index in portal. <b>Index could not be created; creating index failed: Invalid entry in configuration: section nameserver, key address, value tcpip://<nameserverhost>:<nameserverport> is invalid (Errorcode 7213

  • Photo organization, navigation and sequencing limitations

    After solving my initial problem getting my Aperture library to synch (albums and previews are required to see photos), I've synched several thousand images to AppleTV. While the photos look great on HDTV, I'm already hoping that V1.x of the AppleTV

  • Put SSD to Hp Pavilion dv6

    Hi, I know I have to put the SSD in the main caddy and the HDD wil be put in the optical bay. Is it compatible with my notebook? http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item​=180911636451 I have a new Hp Pavilion dv6-6c06eh notebook.

  • Uses for older mac mini?

    Upgrading to the newest mac mini, but it would be nice to find a good use for the older one. I've no need to turn it into a server, but I do have a lot of music and movies. It's the 2009 version, so there's no hdmi. Is there another way to hook it up

  • Gstreamer plugins not found on mirrors...

    Wassup with this?  I would like to install rythmbox, but without the gstreamer plugins, I can't play most of my 23 gb library. Last edited by stuman (2010-07-04 21:59:52)