Unable to use the with clause in oracle 9.0.2

Hi,
I need to use oracle SQL with clause in oracle 9.0.2 database. Its a 9i feature but i am unable to use it.
It is giving internal error, when i try to execute it.
Even for simple query:
WITH acct_summary as ( select TOT_COLL_AMT from tdc_acct)
select TOT_COLL_AMT from acct_summary WHERE TOT_COLL_AMT>100;
Error message while using 8.0.5 sql plus client:
SP2-0642: SQL*Plus internal error state 2091, context 0:0:0
Unsafe to proceed
Please help to find out why i am not able to use the sql with clause in oracle 9.0.2 database.
Thanks and regards,
Raajkathir

Hi Jens Petersen,
Yes, You are correct. Thank you very much.
Regards,
Raja

Similar Messages

  • Updating large table using the WITH CLAUSE or PLSQL

    I tried to perform an update on a table with over 15million records using the merge statement below but it's very slow.
    Can someone help me re-writting this statement using the WITH CLAUSE or a PLSQL statement that will make it run faster?
    my merge statemet:
    MERGE INTO voter dst
    USING (
    SELECT voterid,
    pollingstation || CASE
    WHEN ROW_NUMBER () OVER ( PARTITION BY pollingstation
    ORDER BY surname, firstnames
    ) <= 1000
    THEN 'A'
    WHEN ROW_NUMBER () OVER ( PARTITION BY pollingstation
    ORDER BY surname, firstnames
    ) BETWEEN 1000 AND 2000
    THEN 'B'
    ELSE 'C'
    END AS new_pollingstation
    FROM voter
    ) src
    ON (src.voterid = dst.voterid)
    WHEN MATCHED THEN UPDATE
    SET dst.new_pollingstation = src.new_pollingstation
    the with clause approach:http://www.dba-oracle.com/t_with_clause.htm
    thanks.

    Well, here's your query formatted for people to read...
    MERGE INTO voter dst
    USING (SELECT voterid,
                  pollingstation || CASE WHEN ROW_NUMBER () OVER ( PARTITION BY pollingstation ORDER BY surname, firstnames) <= 1000
                                           THEN 'A'
                                         WHEN ROW_NUMBER () OVER ( PARTITION BY pollingstation ORDER BY surname, firstnames) BETWEEN 1000 AND 2000
                                           THEN 'B'
                                         ELSE 'C'
                                    END AS new_pollingstation
           FROM voter) src
    ON (src.voterid = dst.voterid)
    WHEN MATCHED THEN
    UPDATE SET dst.new_pollingstation = src.new_pollingstation
    ;In future, please read {message:id=9360002} and post relevant details.
    What do you mean when you say it's "slow"? How have you measured this? Have you examined the explain plan?
    Take a read of the threads linked to by the FAQ post: {message:id=9360003} for details of what you need to provide to get help with performance issues.

  • OPEN CURSOR using a WITH clause in the select query

    Hi,
    I am using Oracle 9i. I have a requirement where I have a REFCURSOR as an OUT parameter for my procedure. I have declared the TYPE and created the procedure.
    In the procedure, I am using OPEN <cursor_name> FOR <query>;
    Ideally this works in most of the cases that I have tried earlier. However, in the current case I am using a WITH clause in my query to get the results.
    I need help in understanding if the above mentioned syntax would not allow me to use the WITH clause in the query.

    What error do you get , seems to work ok for me on 10g
    SQL> begin
      2  open :cv for 'with x as (select * from emp)  select * from x';
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> print :cv
         EMPNO
    ENAME
    JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7521
    WARD
    SALESMAN        7698 22-FEB-81       1250        500         30
          7566
    JONES
    MANAGER         7839 02-APR-81       2975                    20
         EMPNO

  • Hello, I have a macbook pro late 2011 15 inch with 4 gb ram. My macbook runs extremely slow when logging in after waking up from sleep, locking up and I am unable to use the keyboard. Is there a fix?

    My macbook runs extremely slow when logging in after waking up from sleep, locking up and I am unable to use the keyboard. Furthermore, when just using safari to watch streaming television, my computer gets really slow, and locks up, and the dock appears blank and I sit here frustrated. Anytime i wake up my computer, my keys don't respond and I've waited at most 3 minutes untill i can type in my password. Even sometimes when i type in my password and hit enter, it takes forever to open up my mac. I have barely used any storage in my macbook, since i only use it for college, and I have run clamscan wiht no viruses showing... Any ideas?

    when just using safari to watch streaming television, my computer gets really slow, and locks up, and the dock appears blank
    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output andWi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Installed the ios 7.0.2 update to my iphone 4, now it is stuck on a screen with itunes icon and power plug.  is this corect? I am unable to use the phone now.  What should i do next? I plug in to itune in my computer and ask me to restore my phone?

    installed the ios 7.0.2 update to my iphone 4, now it is stuck on a screen with itunes icon and power plug. 
    I am unable to use the phone now.  What should i do next? I plug in to itune in my computer and ask me to restore my phone? I will loose all my date?

    I hooked up itune and restore.  after finished restores, it said my phone is in recovery mode and needs to be finish before using itune, my screen still show the itunes icon and power plug

  • Why am I unable to use the text message feature on my Honda CRV with my iphone 6?

    Am I unable to use the text messaging feature on my 2014 Honda CRV with my Iphone 6?

    mspacmn wrote:
    Am I unable to use the text messaging feature on my 2014 Honda CRV with my Iphone 6?
    Yes, you are unable to use text messaging feature with your iPhone.
    -> http://owners.honda.com/vehicles/information/2014/CR-V/features/SMS-Text-Message -Function/3
    "The system is currently compatible with select Blackberry® phones with Bluetooth"

  • I'm unable to use Fiverr with Firefox. Last year I was able to order Fiverr gigs and send messages inside Fiverr but for the last 3 weeks I've been unable to.

    I'm unable to use Fiverr.com with Firefox. Last year I was able to order Fiverr gigs and send messages but for the last 3 weeks I've been unable to do either. I can login to Fiverr but I'm unable to use the service.
    I'm using Windows 7.

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Did this fix your problems? Please report back to us!

  • Use of WITH clause

    Hi,
    I am using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 .
    I am working in a procedure where I want to manipulate the data produced by a WITH AS clause.  But it is giving "PL/SQL: ORA-00942: table or view does not exist" error. A small example to illustrate my problem is given below. Here in the example am just trying to get a replaced string by using the out put of a WITH AS clause.
    SET SERVEROUTPUT ON;
    DECLARE
    CNT INTEGER;
    LETTER CHAR(1);
    REPLACED_STRING VARCHAR2(10);
    BEGIN
    REPLACED_STRING := 'ABC';
    WITH T AS
      (SELECT 'ABC' VAL FROM DUAL),
      TMP (LEN, SUBVAL) AS
      (SELECT LENGTH(VAL) LEN,
        SUBSTR(VAL, 1, INSTR(VAL, 'B', 1, 1)) SUBVAL
       FROM T
       UNION ALL
       SELECT LENGTH(VAL)-1 LEN,
       SUBSTR(VAL, 2, INSTR(VAL, 'C', 1, 1)) SUBVAL
       FROM T
      SELECT COUNT(*) INTO CNT FROM TMP,T ;
      FOR I IN 1..CNT LOOP
      SELECT SUBSTR(SUBVAL,1,1) INTO LETTER FROM  TMP,T;
      SELECT REPLACE(REPLACED_STRING,LETTER,'X')INTO REPLACED_STRING FROM DUAL;
      DBMS_OUTPUT.PUT_LINE(REPLACED_STRING);
    END LOOP;
    END;
    I thought of declaring a cursor which will hold the data produced by WITH clause but it did not work. Can you please let me know what are the possible options to do this.
    Thanks

    I think, I can not use the WITH inside loop as, I want to manipulate on data resulted by WITH reading row by row from it. I have a complex procedure and I wont be able to explain that scenario here and thus i came up with a similar problem through a very simple example. I will try to explain my problem thru my example here.
    The WITH in my example give an out put as :
    SUBVAL
    AB
    BC
      WITH T AS
      (SELECT 'ABC' VAL FROM DUAL),
      TMP (LEN, SUBVAL) AS
      (SELECT LENGTH(VAL) LEN,
        SUBSTR(VAL, 1, INSTR(VAL, 'B', 1, 1)) SUBVAL
       FROM T
       UNION ALL
       SELECT LENGTH(VAL)-1 LEN,
       SUBSTR(VAL, 2, INSTR(VAL, 'C', 1, 1)) SUBVAL
       FROM T
      SELECT subval FROM TMP,T;
    and then by using this in the PLSQL block mentioned above
      FOR I IN 1..CNT LOOP
      SELECT SUBSTR(SUBVAL,1,1) INTO LETTER FROM  TMP,T;
      SELECT REPLACE(REPLACED_STRING,LETTER,'X')INTO REPLACED_STRING FROM DUAL;
      DBMS_OUTPUT.PUT_LINE(REPLACED_STRING);
      END LOOP;
    I want to have an output like:
    XBC
    XXC
    Please note that nature of my original problem is that I want to manipulate the data given by WITH clause in the same procedure by passing it to other functions/procs to get the desired result. So please advice me following this approach only which would be helpful.
    Thanks

  • Since upgrading iTunes 10.5.1.42, I have been unable to use the "Advanced - Create iPad or Apple TV Version" to convert movies.

     I have been unable to use the "Advanced - Create iPad or Apple TV Version" to convert my movies for use with my iPad2. The movie will go through the conversion process, and is the correct length, but the video is a black and there is no sound? Has anyone found a similar problem? If so, what can I do to fix the problem? Before I used Handbrake to convert the videos which worked well, but now that is not working either .

    No, there is no direct download link. Those are days of the past, I'm afraid. You may need to reinstall Mavericks.
    Install or Reinstall Yosemite, Mavericks, Mountain Lion, or Lion from Scratch
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    How to Clean Install OS X Yosemite
    OS X Mavericks- Erase and reinstall OS X
    OS X Mountain Lion- Erase and reinstall OS X
    OS X Lion- Erase and reinstall Mac OS X
    Note: You will need an active Internet connection. I suggest using Ethernet if possible
                because it is three times faster than wireless.

  • Unable to use the keyboard in XP keys work OK when boot into dos

    Unable to use the keyboard in XP. It was working for over a year OK  with XP running
    keys work OK when I install win98 or use a dos boot disk.
    If I try to reinstall XP I can not use any of keys to input anything.
    Return
    Esc
    CapsLock
    ctrl-alt-del.
    NO KEYS WORK AT ALL OTHER THAN 
    ë à
    I did an upgrade from win98 but that did not work.
    Any ideas

    billwyatt, welcome to the forum,
    I think you forgot to mention which ThinkPad you have. It would be even better if you could post the Type and Model Number as this will help members to hopefully help you. If it ends in CTO please provide some details about the ThinkPad. Please do NOT post your s/n.
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • ORA-32034: unsupported use of WITH clause-issue

    hello all,
    i am facing some issue when i use with clause and union all operator.
    i have created a dummy code to solve this problem..
    my code is ----------
    with dept_1 as
    (select deptno d1 from detp9 where deptno = 20)
    select empno from emp9 e,dept_d1 where e.empno = dept_1.d1
    UNION ALL
    with dept_1 as
    (select deptno d2 from detp9 where deptno = 30)
    select empno from emp9 e,dept_d2 where e.empno = dept_2.d2.
    when i ran this i gort a message-
    ORA-32034: unsupported use of WITH clause.
    please help me to solve this iisue..
    when i ran it separatly without using union/union all it ran sucessfully..
    thanks in advance..

    923315 wrote:
    hello all,
    i am facing some issue when i use with clause and union all operator.
    i have created a dummy code to solve this problem..
    my code is ----------
    with dept_1 as
    (select deptno d1 from detp9 where deptno = 20)
    select empno from emp9 e,dept_d1 where e.empno = dept_1.d1
    UNION ALL
    with dept_1 as
    (select deptno d2 from detp9 where deptno = 30)
    select empno from emp9 e,dept_d2 where e.empno = dept_2.d2.
    when i ran this i gort a message-
    ORA-32034: unsupported use of WITH clause.
    please help me to solve this iisue..
    when i ran it separatly without using union/union all it ran sucessfully..
    thanks in advance..Well, i don't see anything about these queries that makes sense.
    You are essentially joining emp and dept on EMPNO to DEPTNO ... that doesn't usually make any sense.
    How about you step back from the query which is almost certainly incorrect, and explain your tables, their data and what you need as output?
    Cheers,

  • We bought an iphone 4s for our daughter. We transfered it to straight talk. She can make calls and text no problem. She can use the WiFi but is unable to use the internet or mms. How do we update the APN?

    We bought an iphone 4s for our daughter. We transfered it to straight talk. She can make calls and text no problem. She can use the WiFi but is unable to use the internet or mms. How do we update the APN?

    To clarify for anyone who is still having any problems doing this.
    1. Unlock your phone with the carrier ( I know the process will work if it is jail broken but I am assuming you dont want to void the warranty on your phone) NOTE: even if you purchased the phone outright at Wal-Mart it is still locked to ATT so you will have to unlock the phone.  If it's already unlocked skip to step 2.  This works and will work even if you update the phone. 
    1a Here is the link to unlock a ATT iphone. Simply follow the instructions https://www.att.com/deviceunlock/client/en_US/
    2. Get a T- mobile SIM. Even if you don't want the service, if you feign interest, they will send you one for free or 99cents. If you need it now you can get one at a T-mobile store too.
    3. Once you have both your Straight talk SIM and your T-mobile SIM follow these instructions:http://www.youtube.com/watch?v=mFFf5uqk18M
    4. If you have any remaining questions look at all the responses posted previously on this thread or check out the Howard Forums Wiki: http://wiki.howardforums.com/index.php/Straight_Talk_iPhone
    Everything should work flawlessly at this point.  If not let me know and I'm happy to help when I can.  I hope this makes doing this very easy for everyone in the future. God Bless -J

  • What is equivalent to 'with clause' in oracle

    what is equivalent to 'with clause' in oracle
    thanks

    My reqirement is :
    I have a table named egroup. I have to find the name of the egroup different from "other" that can be found in the most countries in Africa
    create table EGROUP(
         c_id     char(2), -- country id
         egroup     varchar2(40), -- name of the ethnic group
         percent number(4,2), -- percentage of population
         constraint egroup_fk foreign key(c_id) references COUNTRY,
         constraint egroup_pk primary key(c_id,egroup)
    insert into egroup values('AF','Pashtun', 42 );
    insert into egroup values('AF','Tajik',27 );
    insert into egroup values('AF','Hazara',9 );
    insert into egroup values('AF','Uzbek',9 );
    insert into egroup values('AF','Aimak',4 );
    insert into egroup values('AF','Turkmen',3 );
    insert into egroup values('AF','Baloch',2 );
    insert into egroup values('AF','other',4 );
    insert into egroup values('AL','Albanian', 95 );
    insert into egroup values('AL','Greek',3 );
    insert into egroup values('AL','other',2 );
    insert into egroup values('AG','Arab-Berber', 99 );
    insert into egroup values('AG','European',1 );
    insert into egroup values('AQ','Samoan (Polynesian)', 89 );
    insert into egroup values('AQ','Caucasian',2 );

  • Why am I unable to use the Adobe Send application

    I am unable to fill in forms, add text or send a form, whereas I used to be able to do this.  I have an Adobe Account with a User ID and password.  Isn't Adobe a Certified Document Service?

    mspacmn wrote:
    Am I unable to use the text messaging feature on my 2014 Honda CRV with my Iphone 6?
    Yes, you are unable to use text messaging feature with your iPhone.
    -> http://owners.honda.com/vehicles/information/2014/CR-V/features/SMS-Text-Message -Function/3
    "The system is currently compatible with select Blackberry® phones with Bluetooth"

  • Installing oracle on Linux using the SAP version of oracle software

    Hello All,
    I am trying to install 32bit oracle software on Linux 32 bit os using the SAP version of Oracle Install Software downloaded from marketplace. I have downloaded the required exe and rar files and unpacked them on my PC. The unpacked folder is uploaded in bin mode to the respective server under a common mountpoint. In the folder i have 4 .SAR files with other label files etc.  I want to unarchive these .SAR files to get the runInstaller but running in to issues.
    Here are the steps I tried:
    1. I copied the SAPCAR exe from exe directory and tried to unpack the 4 .SAR files but got permission error. All these 4 .SAR files are owned by ora<sid> user id. I tried to do all these under root user still it fails.
    ora<sid>@xxxyysapdbXX:/sapdata//Oracle32/51031674> SAPCAR -xvf OR110232.SAR
    -bash: ./SAPCAR: cannot execute binary file
    what am i missing?
    Any help is greatly appreciated.

    If you have a 32bit OS then you need to use the 32bit binaries of SAPCAR - yes.
    And:
    Usually those SAR files are unpacked by the installation program sapinst, why do you unpack them manually?
    Markus

Maybe you are looking for