Error-local collection types not allowed in SQL statements

TYPE WEEK_NUM_T  IS VARRAY(10) OF VARCHAR2(10);
vc_weeknum WEEK_NUM_T;
SELECT DISTINCT to_char(y.week_number_in_year) BULK COLLECT INTO vc_weeknum
    FROM DD_TMP x, TIME y
    WHERE x.DATE_TM = y.ORACLE_DATE;
INSERT INTO TMP_HOLD
    (SELECT *
         FROM TMP
         WHERE DATE_TM IN (SELECT * FROM TABLE(vc_weeknum));It seems like the TABLE() function don't work. What is the workaround?

You haven't provided enough of your code to tell, but you are probably trying to use a pl/sql type instead of a sql type. Please see the reproduction of error, then correction below.
-- reprouction of error:
scott@ORA92> CREATE TABLE tmp_hold AS SELECT * FROM dept WHERE 1 = 2
  2  /
Table created.
scott@ORA92> DECLARE
  2    TYPE WEEK_NUM_T     IS VARRAY(10) OF VARCHAR2(10);
  3    vc_weeknum WEEK_NUM_T;
  4  BEGIN
  5    SELECT DISTINCT deptno
  6    BULK   COLLECT INTO vc_weeknum
  7    FROM   emp;
  8 
  9    INSERT INTO TMP_HOLD
10    SELECT *
11    FROM   dept
12    WHERE  deptno IN
13             (SELECT * FROM TABLE(vc_weeknum));
14  END;
15  /
         (SELECT * FROM TABLE(vc_weeknum));
ERROR at line 13:
ORA-06550: line 13, column 31:
PLS-00642: local collection types not allowed in SQL statements
ORA-06550: line 13, column 25:
PL/SQL: ORA-22905: cannot access rows from a non-nested table item
ORA-06550: line 9, column 3:
PL/SQL: SQL Statement ignored
-- correction:
scott@ORA92> CREATE OR REPLACE TYPE WEEK_NUM_T AS TABLE OF VARCHAR2(10);
  2  /
Type created.
scott@ORA92> DECLARE
  2    vc_weeknum WEEK_NUM_T;
  3  BEGIN
  4    SELECT DISTINCT deptno
  5    BULK   COLLECT INTO vc_weeknum
  6    FROM   emp;
  7 
  8    INSERT INTO TMP_HOLD
  9    SELECT *
10    FROM   dept
11    WHERE  deptno IN
12             (SELECT * FROM TABLE (CAST (vc_weeknum AS week_num_t)));
13  END;
14  /
PL/SQL procedure successfully completed.
scott@ORA92> SELECT * FROM tmp_hold
  2  /
    DEPTNO DNAME          LOC
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
scott@ORA92>

Similar Messages

  • PLS-00642: local collection types not allowed in SQL statements

    Hi,
    I want to retrieve empno in plsql table.
    Now based on the empno in plsql table I want to retrieve thier deptno in another plsql table/varray.
    SQL> declare
      2   type vdeptno  is table of number;
      3    v_deptno vdeptno;
      4    TYPE e_tab is table of  PLS_INTEGER INDEX BY PLS_INTEGER;
      5    empno_tab e_tab;
      6   Begin
      7  Select empno bulk collect into empno_tab FROM emp;
      8  FOR i in empno_tab.FIRST..empno_tab.LAST
      9  LOOP
    10   dbms_output.put_line(empno_tab(i));
    11   Select deptno into v_deptno
    12   FROM emp
    13    where empno=empno_tab(i);
    14   END loop;
    15  END;
    16  /
    Select deptno into v_deptno
    ERROR at line 11:
    ORA-06550: line 11, column 21:
    PLS-00642: local collection types not allowed in SQL statementsAny other way to do the same.
    Twinkle

    When you use this method ...
    type vdeptno is table of number;
    v_deptno vdeptno;
    You need to allocate space to the object prior to inserting into it , (use .EXTENDS for this). Or you need to initialize it while declaring it.
    or try the following
    SQL> declare
    2 type vdeptno is table of number;
    3 v_deptno vdeptno;
    4 TYPE e_tab is table of PLS_INTEGER INDEX BY PLS_INTEGER;
    5 empno_tab e_tab;
    6 Begin
    7 Select empno bulk collect into empno_tab FROM emp;
    8 FOR i in empno_tab.FIRST..empno_tab.LAST
    9 LOOP
    10 dbms_output.put_line(empno_tab(i));
    11 Select deptno bulk collect into v_deptno
    12 FROM emp
    13 where empno=empno_tab(i);
    14 END loop;
    15 END;
    16 /
    Edited by: user9276238 on Jun 14, 2010 3:26 AM

  • ESS Business Package Error: Period type not allowed for profile ESS

    Hi,
    We are trying to configure the business package for Employee Self Service on Enterprise Portal 6.0. We followed this SDN contribution <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eb036a-0a01-0010-25a3-b2224432640a">ESS doc guide</a>
    So far we have successfully deployed the business packages and followed all the configurations that were pointed out in the doc guide. Unfortunately when we try to access the Employee Self-Service portal pages (Overview, Employee Search, etc), we encounter this error:
    Critical Error:
    Period type not allowed for profile ESS, error key: RFC_ERROR_SYSTEM_FAILURE
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException:      Period type not allowed for profile ESS, error key: RFC_ERROR_SYSTEM_FAILURE
    Any ideas on how to fix this issue?
    Regards,
    Jojo

    Hi Jojo,
    Have you solved the problem? If yes can you please help me even I am facing the same error.
    this is very help full to me .
    Thanks and Regards,
    Shilpi.

  • Message no. AK005 - Asset is investment measure, transaction type not allow

    Dear All,
    I am getting following error while transfering Investment AuC to Main Asset.
    Message no. AK005 - Asset is investment measure, transaction type not allow
    I searched the Forum and got some input.., but in that I have a clarification.
    Please see my doubt and the forum input.
    Internal Order as Investment Measure:
    Can you explain me Step 10. Settle the amounts to Main Asset from AuC(Prcg type: Full) - KO88 once again.
    How we can give the Receiver Main Asset master in KO88. In KO88 we can only provide the Internal Order. But that Internal Order is already settled to AuC in Step 8.
    Please guide me.
    Thanks.
    Regards,
    nms
    Re: Settlement of cost center to final asset ?
    Posted: Oct 27, 2009 11:40 AM
    Hi,
    Are you doing any settlement using the AUC asset ?
    Normal practice is to Create an Auc Asset and settle cost to Auc. Once the asset is ready for use, finally settle the Auc to final asset.
    This can be done in two ways like - line item settlement / investment measure.
    Below are steps in two scenarios :
    Internal Order as Investment Measure:
    1. Define the AuC Asset Class (with investment measure) - OAOA
    2. Define the Asset Class u2013 for Main Asset - OAOA
    3. Define Investment Profile - OITA
    a. Assign the AuC Asset Class (Step-1) in the investment profile
    4. Assign Investment Profile to Model Order - OITA
    5. Define Order Type (Investment) - KOT2
    a. Settlement Profile - OKO7
    b. Maintain Allocation Structures - OKO6
    c. Planning Profile - OKOS
    d. Budget Profile - OKOB
    6. Create an Internal Order - KO01
    a. With the Investment Profile (Step-2)
    b. AuC automatically created by the system using Asset Class given in the Investment Profile
    7. Post the amounts to IO - FB01
    8. Settle the amounts to AuC from IO (Prcg type: Automatic) - KO88
    9. Create the Main Asset - AS01
    10. Settle the amounts to Main Asset from AuC(Prcg type: Full) - KO88
    AuC using Line Item Settlement:
    1. Define the AuC Asset Class (with Line Item Settlement) - OAOA
    2. Define the Asset Class u2013 for Main Asset - OAOA
    3. Define Order Type (Overhead) - KOT2
    4. Create an AuC-Asset (using Step-1 Asset Class) - AS01
    5. Create an Internal Order - KO01
    a. Assign the AuC u2013 Asset in Settlement Rule in IO
    6. Post the amounts to IO - FB01
    7. Settle the amounts to AuC from IO - KO88
    8. Create Main Asset (using Step-2 Asset Class) - AS01
    9. Assign the Main Asset in IO (Step-5) - KO02
    10. Settlement AuC u2013 Line Item List - AIAB
    11. Settlement AuC - Receiver - AIBU
    VVR

    nms,
    Your message is not very clear - while you have mentioned at what stage are you getting the above-mentioned error message, you haven't mentioned exactly what you were trying to do. The fact that you are getting this error is a straight-forward indication that you are attempting to do something that SAP does expect.
    However, answering your query about how to use KO88, you have to settle the AuC to a FA (fixed asset, with asset class other than AuC ), as that will close the open AuC, transfer the value from the AuC to the FA and from this point onwards, all transactions will happen to this FA. Your statement "in KO88, we can only provide the Internal Order" is incorrect.
    Hope this helps.
    Regards
    Gulshan

  • Idoc Error-Price without service not allowed

    Hi Experts,
    I have a Service PO with Acc.***. P .One service item entered in PO with price.When I go via ME22n & change the Price of Service item under services tab,its fine.
    When this is done via Idoc generation(Msg.Type PORDCH) using standard FM BAPI_IDOC_INPUT1, it creates another service line item for the new price.
    The first line item cannot be deleted via IDOC posting.Gives error "Price without service not allowed"
    This is quite Urgent.Immediate reply is highly appreciable.
    Regards,
    Jagan

    Hi,
    Check in WE42, for the process code, you have assigned this function module and given the correct process code in the partner profile.
    Sujay

  • ERROR: NO_GUEST: Guest login not allowed from client startup

    we are getting the following error with express 6.3.4 when connectting to the express server from Objects using a connection editor.
    The error message is
    Error #12150 in XPCUBE: Non-fatal (0300): Data Manager is unable to generate transmission.
    Error #10300 in XDMRESP: Non-fatal (0300): ERROR: NO_GUEST: Guest login not allowed from client startup
    Encountered similar error while calling from OLAP web application.
    In stored procedure XWD_RAMSTARTUP: The following Express
    Server error occurred: NO_GUEST: Guest login not allowed from
    client startup
    Which I believe is the same reason.
    Can you pls suggest what could be the problem and how can we over come this.

    In the Connection Editor, under "Relational Data-> Settings" did you check the "Personal Configuration" box?
    If you did, you should ensure the Authentication type is not set to "None".

  • MySQL Connection - Select Database - HTTP Error Code 405 Method Not Allowed?

    We've set up a MySQL database with our host and can connect to that, and create, edit, delete tables using HeidiSQL, without a problem.
    However when we attempt to set up the connection in the Databases tab of our Applications panel in Dreamweaver we receive the following error:
    HTTP Error Code 405 Method Not Allowed
    We have entered the following in the MySQL Connection box:
    Name: <name of our connection>
    Server: <IP address of our database>
    Username: <our database username>
    Password: <our database password>
    Database:
    When we click the "Select" option next to the Database field, that's when we receive the above mentioned error.
    We noticed that there was a fix posted by Adobe at:
    http://www.macromedia.com/support/dreamweaver/ts/documents/err405.htm
    ...but that link is long since dead, however it does seem to indicate that Adobe are/were aware of this issue.
    Can anyone help?  We're trying to move from Classic ASP / MSSQL to PHP / MySQL but have hit a barrier right from the off, which isn't very encouraging.  Hope someone can ease our concerns with PHP and MySQL.
    Much appreciated.
    NJ

    Thank you SnakEyez02.
    I had the Testing Server set to Local/Network but didn't have MySQL installed locally.  Changed that setting to FTP and it picked up on the database correctly.
    When using MSSQL it doesn't matter whether you choose Local/Network or FTP it just picks up the online database regardless.  I guess this must just be a difference between it and MySQL.
    Thanks for the advice.  Much appreciated.
    NJ

  • Error Item Category 04000 not allowed in accounting transaction 0300/0001

    When we are posting a Incoming payment document with debit to -bank charges refund and bank account ,got the error Item Category 04000 not allowed in accounting transaction 0300/0001.
    Please advice.
    Edited by: mysap query on Feb 24, 2009 2:56 AM

    Hi
    This issue is related to document splitting.  Unfortunately I don't have access to an ECC6 system today so can't give you the specific solution, however you need to check the config settings in the following path:
    IMG > Financial Accounting (New) > General Ledger Accounting (New) > Business Transactions > Document Splitting > Classify Document Types for Document Splitting
    If you are unable to resolve this, you should ask for assistance from a FI consultant.
    Regards
    Kylie

  • Error in DTP load from PSA to IC - Error - Key figure 0 not allowed for

    HI ALL,
    ERROR - Key figure <> 0 not allowed for unit ' '; see long text
    Diagnosis
        The unit/currency ' Source unit MEIN ' with the value 'space' is
        assigned to the key figure ' Source Key Fig. DIFF ' with the value '
        4240.000- '.
    System Response
        A key figure that is not equal to 0 and for which no unit/currency is
        set has an inconsistent data state. The data record is not processed.
    Procedure
        Correct the source data.
    Procedure for System Administration
    Please guide
    BR
    Prasad

    Hi ,
    First af all identify all such records by creating an error DTP so that the same can be collected in Error stack .
    1. Go to the Update tab of the normal DTP and there you can find the create Error DTP option .Click on that .
    2. This will take you to the Error DTP screen .Use the option 'Valid record updated reporting possible (request green).You can increase the number of errorneous records to be avoided there only .
    3. Please make sure you have activated the option of ' Valid records update reporting possible request green ' both in the Normal and Error DTP .Also the number of errorneous records to be avoided to be mentioned in both the DTP's.
    4. Activate the DTP's (Both Normal and Error) .
    After this can you please run the Normal DTP again .You can check the Error stack to see the errorneous records .When you double click on any record in the error stack it will thrown an error message from where you can find the exact error with those records .You can rectify these records in the errror stack and then run the error DTP to update the same to the data target.
    Ideally these records should be rectified in the Source system .
    Thanks
    Kamal

  • I am trying to update my software through the app store but for some reason an error occurs and will not allow me to do so

    I am trying to update my software through the app store but for some reason an error occurs and will not allow me to do so. And when i go online to log into my apple id account it states that there is an error. Can someone help me solve this issue, its annoying me?

    Apple’s having trouble with the iTunes Store servers right now. Wait for them to resolve the issue.
    (123935)

  • In MIRO screen, if clicked on 'TAX' tab  error 'Entry of tax not allowed in

    Hi,
    In MIRO screen, if clicked on 'TAX' tab  error 'Entry of tax not allowed in current account line' is displayed. Message number FF847. What may be the reason for this error message?
    Entry of tax not allowed in current account line
    Message no. FF847
    Diagnosis
    If you enter a tax amount in the current account line, the system does not allocate the amount to one tax code, but instead to all tax codes that exist in the document. In this case, the amount needs to be split up using the rule-of-three procedure. The sum of the computed taxes of all tax codes is used as the comparison basis. If each of the computed tax amounts of all tax codes equals zero, the system uses the sum of the tax base values as the comparison basis.
    System Response
    If the respective comparison basis equals zero, the system issues an error message.
    Procedure
    Go to the tax screen or tax tab page and enter the appropriate tax amounts for each tax code.

    Hi,
    Please check SAP Note- 1551857  for the same.
    Other terms
    FF707, FF716, FF796, FF847, FB70, SAPLTAX1
    Reason and Prerequisites
    There is a program error.
    Solution
    Implement the program corrections.
    When you choose "Cancel" on the tax screen during posting or simulation, the system returns to FB60 or MIRO again.
    The message FF 847 on the "Basic data" tab page is suppressed for company codes with jurisdiction codes if no expense items exist.
    Hope this will resolve your query.
    Regards,
    Sandesh Sawant

  • IDOC - process code with error "Application Object Type not planned'

    Hi all,
    I am doing an inbound idoc.... in TCODE we42, i trying to put function module which i created, attached to the process code.
    However, when i put my function module ZIDOC_INBOUND to the process code... it comes out error, 'Application Object Type not planned.'
    Why is this so?
    Please advice...
    Thanks and regards...
    William Wilstroth

    HI all,
    I had solved this problem. I should have gone to we57 to tie the function module.
    thanks.
    William Wilstroth

  • When trying to change ringtone I keep getting the error message file type not supported.

    I have downloaded some ringtones fro VZ Tones and when I go to make them the default it gives me the error message file type not supported.  If I go to my storage and try to look at pictures, it tells me the same thing.

        That's definitely odd CrystiDawn, and I understand it can be quite frustrating. Let's get to the bottomof this. What device make and model phone do you have? Did you receive a text message with a link to download the ringtones? If so, once downloaded, please go to all your Apps, locate "Files" and play the ringtone using the media player. You will have the option to set it as ringtone while playing and pressing the menu icon. Were the pictures taken from the phone or transferred using the USB cable?
    AdaS_VZW
    Follow us on Twitter at @VZWSupport 

  • I cannot upload Photoshop Touch jpegs to my Wordpress blog. I get this error message: ´File type not permitted due to security reasons.´

    Images I retouch in Photoshop Touch and save as jpegs won´t upload to my Wordpress blog. I get this error message: ´File type not permitted due to security reasons.´ I never had this issue before when using photoshop cs or gimp. How can I resolve this issue and continue using Photoshop Touch which otherwise works great with my tablet.

    It seems like you might have to rename them to jpg.
    WordPress › Support » Security error when uploading jpeg image using new macbook
    Let me know if it works.
    Thanks,
    Ignacio

  • When trying to make purchase I am asked to improve apple security by setting up 3 questions.  I have tried many times with out success.  Apple always returns an error without identifying what the error is.  Will not allow me to advance without setting up

    Apple is requiring the establishment of 3 security question (increase online security), but coninuously gives an error without identifying the error.  I am not allow to proceed or bypass and cannot use any apple store features.

    Exactly when does this error occur?  What is the exact wording?

Maybe you are looking for

  • How to set two values equal from different recordset?

    I have created a posts recordset and a comments recordset the comments table has a post_id to link the comment to a specific post through setting it equal to the id field in the posts table so that whenever a post loads the comment whos post_id is eq

  • Itunes version on latest Muontain Lion

    is this new version of OS X Mountain Lion includes the latest version of itunes?? because i had problems with iphone USB tethering in the latest itunes version that i had to go through **** to fix it...

  • How does Java store floating point numbers?

    Hello I'm writing a paper about floating point numbers in which I compare an IEEE-754 compatible language [c] with Java. I read that Java can do a conversion decimal->binary->decimal and retain the same value whereas c can't. I found several document

  • EA1 - Double click on package/package body member stopped working?

    SQL Developer version 4.0.0.12, Windows XP Connections -> Packages -> expanding members of package / package body -> double click on package member does nothing (in previous version of SQL Dev it opened package / package body in editor and reposition

  • Guild Wars 2 Digital Download

    i buy GW2 (paypal ) my status is pending and i not reiceved my BETA Code Access anyone help me ?  my email from paypal : {removed per forum guidelines} from bestbuy : {removed per forum guidelines} thanks !