Subquery in pivot_in_clause gives an error in 11g

Hi,
according to the 11g sql documentation a subquery is allowed in pivot_in_clause
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm here's is the pivot_in_clause syntax.
When I use a subquery I get an error. What am I doing wrong?
Without a subquery, everything works fine.
DB version is 11.1.0.6
SQL> with t as (select 1 id from dual
  2             union all
  3             select 2 from dual)
  4  select * from t pivot(sum(id) for id in (1,2));
         1          2                                                          
         1          2                                                          
SQL>
SQL> with t as (select 1 id from dual
  2             union all
  3             select 2 from dual)
  4  select * from t pivot(sum(id) for id in (select level from dual connect by level<3));
select * from t pivot(sum(id) for id in (select level from dual connect by level<3))
ERROR at line 4:
ORA-00936: missing expression Thanks,
Ants

So .. is there a way to convert the SQL below so that it CAN work?
with t as (select 1 id from dual
2 union all
3 select 2 from dual)
4 select * from t pivot(sum(id) for id in (select level from dual connect by level<3));
Thanks in advance for any assistance.

Similar Messages

  • When trying to login in OIM 11g after providing credentials, it gives internal error 500.

    When trying to login in OIM 11g after providing credentials, it gives internal error 500.

    please note: 500 error is the most difficult HTTP error to troubleshoot , because it is very generic. It could be because of many things.
    So, if you could provide us the OIM diagnostic logs when you receive it, it will help as to be helpful.
    thx in advance,
    Thiago Leoncio.
    thiagoleoncio

  • Sp1us.msb not found error in 11g on windows xp machine

    Hi,
    I have installed 11g database in the windows xp machine and when i try to access sqlplus from cmd prmpt it gives me error
    sp1us.msb not found. Need to set ORACLE_HOME.
    Now I had set the ORACLE_HOME but again after setting it gives the same error.
    So I tried to find the sp1us.msb file in ORACLE_HOME directory.
    But there is no folder named sqlplus in my ORACLE_HOME directory which contains the file sp1us.msb
    Can i make a dummy folder named sqlplus and in that mesg and create a blank sp1us.msb file?
    Does this binary file has any significance in intializing the database?

    Hi,
    I have already set ORACLE_HOME in the environment variable.
    But the problem is that sqlplus directory itself is not there in the ORACLE_HOME directory structure. So it is not able to find the sp1us.msb file which resides in
    ORACLE_HOME/sqlplus/mesg. But in my case the sqlplus folder is missing.
    So can I make a new folder like sqlplus and inside it mesg and put the dummy sp1us.msb binary file?
    Does this file contains any contents to intialize the database?
    Thanks in advance.

  • Login gives checksum error

    Hi,
    we have moved from 10g to 11g and we are in apex 3.2.1 . we use custom authentication using hash functions.
    after upgrade ,i updated password from backend using same hash functions.but while logging in,it gives checksume error.
    notification message checksum content error: : B94DD797153BF2D6816AA4A374D0427F
    anyone faced anything like this before?
    Your help is highly appreciated
    Regards
    CKLP

    any help?

  • RE: [Adobe Reader] when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? i

    HelloThank's for your helpsI hope this document is helpfulBest Regards,
    Date: Sun, 22 Jun 2014 17:10:17 -0700
    From: [email protected]
    To: [email protected]
    Subject:  when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th
        when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help m
        created by Anoop9178 in Adobe Reader - View the full discussion
    Hi,
    Would it be possible for you to share the document?
    Regards,
    Anoop
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6485431#6485431
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
         To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Adobe Reader by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

    thank's for reply and your help
    i did the step's that you told me but  i still have the same problem
                                     i have the latest v.11.0.7
    i
    i disable the protected mode

  • Upon upgrading iPhoto, iPhoto Help no longer works.  It gives the error message:  "The selected topic is currently unavailable. To see all iPhoto Help, you must be connected to the Internet." Help!?

    Upon upgrading iPhoto, iPhoto Help no longer works.  It gives the error message:  "The selected topic is currently unavailable. To see all iPhoto Help, you must be connected to the Internet."   I am obviously connected to the internet since you are reading this.
    I tried upgrading permissions but it did not help!?  Can anyone tell me what is wrong?  Thanks

    Try
    Reboot the computer, see if that fixes it.
    Then try:
    Backup your files off the computer (not TimeMachine) and disconnect
    Hold c boot off the 10.6 disk and simply reinstalling OS X
    Log in and update to 10.6.8
    c boot off the 10.6 disk again and use Disk Utility >Repair Disk
    reboot and all should be fine, except some third party programs that install kext files, those will have to be reinstalled from fresh sources.

  • Photoshop gives "Program Error" when I try to open files while VPN

    I think this may be a new one. While VPN on my company network, Photoshop CS cannot open any files. Either drag and drop, double click or even file open command. You get the clock and the message "failed to open because of a Program Error.... " or something close to that. I'm sure it says Program Error though. Works fine if I'm not VPN but soon as I'm on it stops opening files or even creating a new blank canvas gives that error. I checked Adobe forum and nothing there to find about this one. Anyone else have this happen?

    Hi, SSI.
    1. What VPN client are you using?
    As a guess, your VPN client may be blocking a port that PS CS may use for license verification over the Internet. The fact that it works AOK when not using the VPN would tend to support this hypothesis. As to what port it may be attempting to use, I can't say, but you may be able to find this out from Adobe and then work with your firm's networking staff to see if this port can be opened for use when the VPN is active.
    2. You noted that you "checked Adobe forum and nothing there to find about this one." Did you post to the Adobe Photoshop forum? If not, I recommend doing so.
    3. You wrote: "You get the clock and the message "failed to open because of a Program Error.... " or something close to that. I'm sure it says Program Error though."As FYI, in cases such as this, copying down the exact text of the message is helpful.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • When i try to log on to Oracle it gives an error TNS:no listener, WHY?

    hi guys,
    WHen i try to log on to the Oracle 8i server using the user: SYSTEM and password: manager, it gives an error
    ERROR:
    ORA-12541: TNS: no listener
    why this occurs and how do i fix the problem? please give me step by step instructions TY :)
    Message was edited by:
    user502781

    ORA-12541 ...
    - The client is requesting connection to a service.
    - The service is derived from the alias used in the connection. For example, @orcl ... orcl = alias.
    - The alias is used to look up the host, listener port and service in the tnsnames.ora
    The listener is on the same machine as the database. The listener must be up and listening on the port the client want to use.
    If the listener is not up, there wil be an "ORA-12541: TNS: no listener" error;
    If the listener is listening on the wrong port, there wil be an "ORA-12541: TNS: no listener" error;
    If the client is asking for the wrong port, there wil be an "ORA-12541: TNS: no listener" error.
    To start the listener in Windows, go to the Control Panel > Administration Tools > Services and ensure the Ora?????Listener is started.
    To verify the listener is up, open a command box, and type 'lsnrctl status'
    To see what the client is expecting, on the client machine open a command box, and type 'tnsping {alias}' where you replace {alias} with the alias to be used in the connection.

  • To download an App the 3 security questions are required. But at the end, apple is not able to complete the task and gives an error message. No more downloads are possible. What can I do?

    to download an App the 3 security questions are required. But at the end, apple is not able to complete the task and gives an error message. No more downloads are possible. What can I do?

    Very Important, how much Free Space is on your Hard Drive first of all? Click on the Macintosh HD on the Desktop, then do a Get Info on it.
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    Do they launch OK while in Safe Mode?

  • When I download and install iTunes it looks it does it, but then it never starts, instead gives an error report and says iTunes encountered some problem and has to close

    When I download and install iTunes it looks it does it, but then it never starts, instead gives an error report and says iTunes encountered some problem and has to close

    i don't know how they solved it, i'm having the same problem on Windows XP
    EventType : BEX
    P1 : iTunes.exe
    P2 : 10.7.0.21
    P3 : 504d85d9
    P4 : unknown
    P5 : 0.0.0.0
    P6 : 00000000
    P7 : 08920740
    P8 : c0000005
    P9 : 00000008

  • I have a an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes. All of the other movies on the card download with out a problem.

    I have an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes.
    All of the other movies on the card download with out a problem. The movie in question is not 'corrupt' as you can watch it in iMovie direct from the SD card but as soon as you try to import it, it  just says 'error'. iIve tried moving the file to an external drive ( and other variations on this theme) then importing but have had no luck.
    Can anyone please help me.

    The mystery remains....
    Thanks for the pointers. The file type is .mts (a proprietry sony one).
    I have now found some video converter software (Wondershare and iSkysoft) at a cost. Either will convert this file for me into .mp4. This I can then import into iMovie without any problems. I've checked this on the trial versions and it worked well but without paying am left with a giant watermark in the video
    The mystery (which I still havent solved) is why did 20 other .mts files import fine and then this one not?
    If you could point me in the direction of some free .mts converter software that would be the cherry on the cake.
    Thanks

  • My 3.6.14 keeps trying to update and gives this error message:"The update could not be installed. Please make sure there are no other copies of Firefox running on your computer, and then restart Firefox to try again."

    My OS is Windows XP version service pack 3. I even tried to install FF4 but it never get installed. As I mentioned my FF keeps trying to update itself but it gives the error message I provided in title. Now I don't have access to my FF browser and my life is stopped because I have all my passwords saved on FF. I restarted my notebook but it stills try to update itself giving the same error message. I can not also upgrade my Adobe reader 7.0.7 to 10 I have tried more than 10 times but it never gets upgraded. I had this Adobe problem since long time ago.

    Run the Firefox program once as Administrator (right-click: Run as Administrator).<br />
    If that doesn't help then do a clean reinstall.
    Do a clean (re-)install:
    * Download a fresh Firefox copy and save the file to the desktop.
    * http://www.mozilla.com/firefox/all.html
    * Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    * Don't remove personal data if you uninstall the current version.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Your bookmarks and other profile data are stored elsewhere (not in the Firefox program folder) and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.

  • Have uploaded and installed CC 2014. Several apps give this error when I try to start them:  "Unable to launch Adobe InDesign as you do not have sufficient permissions to access the preferences folders" -or- The icon in the dock bounces once, and nothing

    Have uploaded and installed CC 2014. Several apps give this error when I try to start them:  "Unable to launch Adobe InDesign as you do not have sufficient permissions to access the preferences folders"
    -or-
    The icon in the dock bounces once, and nothing happens.

    Windows or Mac, and exactly which operating system version?

  • When i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th

    when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ?
    if you can help me thank's
    [email address removed by host]

    thank's for reply and your help
    i did the step's that you told me but  i still have the same problem
                                     i have the latest v.11.0.7
    i
    i disable the protected mode

  • When i try to connect my Ipod Touch 5th gen to Itunes it gives an error any idea's?

    When i connect to the latest version of Itunes it gives an error message that says "The Ipod "ipod touch" could not be synced because the sync session failed to start." i've tried restarting it sevral times and even restored a backup but to no avail. any help would be greatly appriacated!

    See:
    Sync Session Failed to Start iTouch iOS5: Apple Support Communities
    iphone could not be synced sync session failed to start...: Apple Support Communities

Maybe you are looking for