What this problem? table(cast(array))

exits in databse one type
" type InNumberTab is table of number;"
declare
v_tbseq_trans:= InNumberTab(null);
select count(*) into v_cont
from dados_propriedade dp
where dp.num_pessoa=p_num_pessoa
group by num_nirf;
v_tbseq_trans.EXTEND(SQL%ROWCOUNT);
v_cont:=0;
for v_cs in
(select to_number(replace(dp.num_nirf,'-','')) nirf, max(dp.seq_transacao) seq_transacao
from dados_propriedade dp
where dp.num_pessoa=p_num_pessoa
group by dp.num_nirf) loop
v_tbseq_trans(v_cont):=v_cs.seq_transacao;
v_cont:=v_cont+1;
END LOOP;
open p_cursor_prop for
select
from dados_propriedade dp
where dp.seq_transacao in (SELECT column_value FROM TABLE(CAST(v_tbseq_trans as InNumberTab)));

I'll try to guess what you mean.
If you need to use object or collection type in SQL query you should declare in in SQL server not in PL/SQL code:
SQL> declare
  2   type na is table of number;
  3   nat na := na(1,2,3);
  4  begin
  5   for x in (select column_value y from table(cast(nat as na))) loop
  6     dbms_output.put_line(x.y);
  7   end loop;
  8  end;
  9  /
for x in (select column_value y from table(cast(nat as na))) loop
ERROR at line 5:
ORA-06550: line 5, column 56:
PL/SQL: ORA-00902: invalid datatype
ORA-06550: line 5, column 11:
PL/SQL: SQL Statement ignored
ORA-06550: line 6, column 25:
PLS-00364: loop index variable 'X' use is invalid
ORA-06550: line 6, column 4:
PL/SQL: Statement ignored
SQL> set serveroutput on
SQL> create type na is table of number;
  2  /
Type created.
SQL> declare
  2   nat na := na(1,2,3);
  3  begin
  4   for x in (select column_value y from table(cast(nat as na))) loop
  5     dbms_output.put_line(x.y);
  6   end loop;
  7  end;
  8  /
1
2
3
PL/SQL procedure successfully completed.Is it your problem ?
Rgds.

Similar Messages

  • I cant understand what this problem... and How to create two channel

    i have try solve this problem and there are still happen again....and someone can help me... the another one..there are have solution to design 2 physical channel in my project. Someone can give me advice, any idea and suggestion...t.Q 
    Now i have attach my final project.vi
    Attachments:
    Oscilloscope_B.llb ‏130 KB

    OK this is by no means a finnished product. I added a state machine and tried to show you how to do some of the things that you are looking for.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    Oscilloscope.zip ‏119 KB

  • Can anyone help me understand what this problem is with Desktop Manager that I am having???

    Hi everyone! I have downloaded the Desktop Manager Software on to my desktop. I've clicked on the "media"  option in the main menu.
    I am brought to a screen that has 2 options. "Media Manager" and " Blackberry Media Sync".
    Now, I want to download themes and wallpaper,  but in order to do that, I need to select "Media Manager" correct? ... Unfortunately this option is not available. I have my blackberry on, and is connected to the USB port. I am able to click "start" on the "Blackberry Media Sync" option, but not on Media Manager. If anyone could help me out, this would be greatly appreciated. I am going absolutely insane trying to figure this out! Thx for your help!!!!
    Much appreciated
    ~Linz

    It seems clear to me that if you unplug your AirPort Extreme and those Wi-Fi networks still appear, they are not being created by your Extreme but by someone else's router. They won't be useful to you.
    To eliminate confusion, open System Preferences > Network, and select Wi-Fi from the left column. Click the Advanced... button. In the "Preferred Networks" list, select each Network Name and click the "–" (minus) button. Check the box "Remember networks this computer has joined". Click OK, then Apply.
    Then select your PalmSprings network in your Mac's Wi-Fi menu. Ignore any others that may appear there.
    If you still have funky problems, try renaming your AirPort Extreme's network to something other than PalmSprings. Use "Palm Springs" (including the space character - spaces are OK) or something else. Other networks with similar or identical names will just confuse things.
    Use a non-trivial WPA/WPA2 password for your Wi-Fi network. Give your Extreme base station a non-trivial password as well. These ought to be different from one another, but are not required to be. Doing so will preclude any concern about your network being "hacked".

  • What is this problem? Please Help!

    I would look for earlier topics about this, but I dont even know what this problem is called. The picture should tell something. The left one is .dv footage played on Quicktime. So I want to edit it and I import my footage into Premiere CS5, where it does this weird effect (right one). I tried to export it out with pal and ntsc, and then it stays the same (right one). Please help me!!

    Read Bill Hunt on a file type as WRAPPER http://forums.adobe.com/thread/440037
    What is a CODEC... a Primer http://forums.adobe.com/thread/546811
    What CODEC is INSIDE that file? http://forums.adobe.com/thread/440037
    Report back with the codec details of your file, use the programs below
    For PC http://www.headbands.com/gspot/ or http://mediainfo.sourceforge.net/en
    For Mac http://mediainfo.massanti.com/
    http://blogs.adobe.com/premiereprotraining/2011/02/red-yellow-and-green-render-bars.html
    Once you know exactly what it is you are editing, report back with that information... and your project setting, and if there is a red line above the video in the timeline, which indicates a mismatch between video and project
    See 2nd post for picture of NEW ITEM process http://forums.adobe.com/thread/872666 to be sure your project matches your video

  • Casting Arrays

    Is there anything particularly bad with casting Arrays? For convenience, I store some instances of a class in a LinkedList. Now, when I want to get them in a nice Array, I tried this:
    ("Creature" being a class of mine)
    Creature[] creatureArray = (Creature[]) CreatureList.toArray();That resulted in a splendid ClassCastException.
    However, this works:
    Object[] creatureArray = CreatureList.toArray();
    for (int i = 0; i < creatureArray.length; i++)
        Creature name = (Creature) creatureArray;
    So, is there generally a problem with casting Arrays or is there something else that might be the problem?
    Thank you for any suggestions!

    This may be more be more efficient:
    Creature [] array = (Creature[]) creatureList.toArray( new Creature[creatureList.size()] );

  • Problem with Cast and table operator

    Hi ,
    Am using Table and cast opertor to fetch the data from a collection using a ref cursor as follows
    OPEN test_cur for
    SELECT first_name, Last_name from table(cast( V_Test_collection as Test_Array));
    This works but when i tried to fetch the date using following query and ref cursor then i received ORA-00604 and ORA 01003.
    I used string containg the query like follows
    V_SQL:= ' SELECT first_name, Last_name from table(cast( V_Test_collection as Test_Array))';
    OPEN test_cur for V_SQL;
    I want to pass this V_SQL variable to another procedure that will use it to apply some business logic.Please help me how to resolve this problem.

    Hi, Current procedure is as follows but as per new requirement i have to pass the processed data from this procedure to a common procedure that accepts the string containing the query(Say IN_QUERY) and applies the business logic by fetching the data from this query(IN_QUERY)
    CREATE OR REPLACE PROCEDURE GET_USER_INFO_PRC(USER_ID IN NUMBER,
    TEST_CUR OUT COMMOM_PKG.OUT_REF_CUR,
    O_ERROR_CODE OUT NUMBER,
    O_ERROR_LOCATION OUT VARCHAR2,
    O_ERROR_MESSAGE OUT VARCHAR2) IS
    V_TEST_COLLECTION COMMOM_PKG.WI_INS_SEARCH_ARR_OBJ := WI_INS_SEARCH_ARR_OBJ();
    BEGIN
    Some buniess logic is applied on V_Test_collection to fetch the date in this block
    OPEN TEST_CUR FOR
    SELECT FIRST_NAME, LAST_NAME
    FROM TABLE(CAST(V_TEST_COLLECTION AS TEST_ARRAY));
    Exception handler
    END;

  • Problems using table (cast as)

    Hi
    I have some code like this:
    declare
    TYPE t_forall_bags IS TABLE OF misbag.bags%ROWTYPE;
    l_forall_bags t_forall_bags := t_forall_bags ();
    begin
    open c2;
    FETCH c2 BULK COLLECT INTO l_forall_bags LIMIT v_array_size;
    if l_forall_bags.COUNT > 0 then
    begin
    merge into misbag.bags dest
    using (select col1,
    col2,
    colx
    from TABLE( cast( l_forall_bags as t_forall_bags ) ) ) src
    on (dest.bag_id = src.bag_id )
    when matched then
    --do update stuff
    when not matched then
    --do insert stuff;
    end;
    end if;
    end;
    on compilation I am getting an ora-00902 invalid datatype seemingly on the t_forall_bags in side the cast (as highlighted in bold)
    I thought I had the syntax correct, but maybe not.
    rgds
    Tony

    BluShadow wrote:Why are you querying data from the database into a collection (in expensive PGA memory) to then pass that back down to the SQL engine to be treated as a table (and incidently one without any indexes or the other benefits of a database table).Well that is a very good question.
    The task is to take a generally smaller number of very recent rows from one table and apply them to a similar table in another schema. This task will run very frequently (ie every second or two) so generally will have a smallish number fo rows (ie 100-200) each time it runs. Some rows are updates and some rows are inserts.
    If there is a delay on running the task, we don't necessarily want to process all of the outstanding rows in one go, but to take them in chunks until is catches up.
    One way to do this would be to perform multiple queries on the original data to check how many rows where outstanding, then to select which ones were to be merged, then go ahead and do the merge (with both main tables as you propose). This alternate idea (that I was looking at here) was to bulk collect the first n rows from the table into the array (up to the defined limit) and then to merge this list of rows into the destination table. The goal was to perform fewer data accesses and make the process least expensive in I/O. By bulk selecting up to N rows into the array, it was felt that there was less I/O on the source table, and probably the same amount of I/O on the destination table.
    The very first method of writing was to bulk select the first N rows into an array, delete any that already existed in the dest table then to "forall" insert the array contents into the destination table. This seemed to work quite well, we wanted to compare the merge version and see how it compared in speed and I/O usage.
    Tony
    rgds
    Tony

  • Problem with table(cast..)) clause - timeout

    Hello,
    I've in shared memory one query in multiple copies - one differences between copies is in arguments count given with in clause. For example, in shared memory i have:
    select name from a where id in (?);
    select name from a where id in (?,?);
    select name from a where id in (?,?,?);
    I try to minimize size of shared memory by change this query as in example:
    select name from a where id in (select * from table(cast(? as seqintegertable)))
    In this case my shared memory is ok, but I have problem with timeout exception:
    - time of executing query without cast is about 250 ms
    - with cast: about 10560 ms and sometimes I get ORA-01652
    Why this time is so long? Can I reduce it? Maybe I should change something other?

    user13241971 wrote:
    Why this time is so long? Can I reduce it? Maybe I should change something other?To know why your query takes so long: {thread:id=501834}
    Likely it's because of wrong cardinalities, to which this excellent article gives possible solutions: http://www.oracle-developer.net/display.php?id=427
    Regards,
    Rob.

  • Problem about casting in internal tables

    Hello,
    TYPES:
      BEGIN OF ts_matnr,
        matnr TYPE matnr,
        objct TYPE cuobj,
      END   OF ts_matnr.
      tables: mara.
    DATA:
      myStatus(20) type c,
      mySTANDARDCLASS(20) type c,
      gt_matnr TYPE STANDARD TABLE OF ts_matnr WITH DEFAULT KEY,
      gs_matnr LIKE LINE OF gt_matnr,
      gs_mara  TYPE mara.
    SELECT-OPTIONS:
      pr_matnr FOR gs_mara-matnr.
    START-OF-SELECTION.
    SELECT matnr
           matnr AS objct
           FROM mara
           INTO CORRESPONDING FIELDS OF TABLE gt_matnr WHERE matnr IN pr_matnr.
    I want to write both the normal String and the value as object  into the table. But there is a error at the select saying the fields can't be converted to target field.
    I don't know what the problem is. Can you see it?
    Edited by: Daniel Gerne on Apr 23, 2008 2:31 PM

    unfortunately, I just saw that I just walked around my problem instead of solving it. The reason I want to have this MATNR is that I need to use it as Objectkey for a BAPI call:
    LOOP AT gt_matnr INTO gs_matnr.
    CALL FUNCTION 'BAPI_OBJCL_GETDETAIL_KEY'
      EXPORTING
    *    CLOBJECTKEY           = gt_matnr-objct "nicht Tabelle, sondern Arbeitsbereich
        CLOBJECTKEY           = gs_matnr-objct "hat Typ OBJCT <=> BAPI1003_KEY-OBJECT_GUID
        CLASSNUM              = 'FARBIGE_UNTERLAGEN'
    *   KEYDATE               = SY-DATUM
    *   LANGUAGE              = SY-LANGU
    IMPORTING
       STATUS                = myStatus
       STANDARDCLASS         = mySTANDARDCLASS.
    *  TABLES
    *    ALLOCVALUESNUM        =
    *    ALLOCVALUESCHAR       =
    *    ALLOCVALUESCURR       =
    *    RETURN                =.
    ENDLOOP.
    But with the type from Shiva's code the debugger says that the given parameter has a wrong type.I just can't get this BAPI to work. I want to use it to get the classification information about a material.

  • Please find solution for this problem ...pl/sql table problem

    Hi
    I am using forms 6i. Now i am having a form to insert purpose. which contain 70 fields to enter. that is there are 10 screens contain 10 fields each. Each screen contains two buttons 'next' and 'previousscreen'. Now what my problem is after entering the 20 fields and i am entering 27th field in 3rd screen i noticed that i did a mistake in 2nd field value which is in 2nd screen. when i moved from third scrren to first screen by using pushbutton previous screen. all data in second and third screen has gone. For this i used a pl/sql table and put the code in 'nextscreen' button. the code is
    declare
    type emptabtype is table of :emp%rowtype
    index by binary_integer;
    emptab emptabtype;
    begin
    insert into emptab values(:emp.eno,:emp.ename.....so on);
    commit;
    end;
    The above is the approach i used. but not successful. Is the approach followed by me is correct (I strongly believe that some mistake is there). If not, pls tell me what to do for my problem. What my ultimate requirement is i should not loss the data entered in the fields even when i modify any data on any screen.
    I hope you people understand my problem
    Thanks in Advance,
    bigginner in forms
    prasanth a.s.

    Hi there,
    I have a form which has over 150 fields (from 4 tables). I have used a tab-canvas form to handle all the input - 2 screens for the fields from the first table and 1 screen each for the remaining 3 tables. I can navigate between the tabs without trouble. When everything is done, the contents of the screens are saved to the database via a menu item. Most of the fields are database items.
    My point is that Oracle Form has no problems in handling
    such processing and I am only using its normal default capabilities.
    What type of canvas are you using? There should be no reason to use buttons to navigate betweeen screens if you are using a tab-canvas form. You should not have to use PL/SQL table to handle the data if the fields are normal database columns.
    Regards,
    John

  • I bought my iphone 5s a week before and now its volume "up" button is not working when pressed.Does anybody know what to do to make it work?I have a one year warranty.Should i give it to apple retail shop or is there any way to solve this problem?

    I bought my iphone 5s a week before and now its volume "up" button is not working when pressed.Does anybody know what to do to make it work?I have a one year warranty.Should i give it to apple retail shop or is there any way to solve this problem?

    IF it is a manufacturing defect and you bought the device from Apple or an authorized Apple retailer, then take it into Apple.

  • I have just downloaded OSX Mavericks and am having a lot of problems with my iCloud account. I get a message "this iMac can't connect to iCloud because of a problem with (and then it quoted my e-mail address) Does anybody know what the problem could be??

    As mentioned above I have just downloaded OSX Maverick to my iMac. I am now having a lot of problems with iCloud. I get the message that "This iMac can't connect to iCloud because of a problem with, and then it goes on to quote my e-mail address. It then says to open iCloud preferences to fix this problem.
    I do this and no matter what I seem to do this message continues to return.
    Can anybody explain how to resolve this problem (please bear in mind that I am noy very computer literate).
    Many thanks
    Mike

    Hello John
    Sorry I haven't got back to you sooner.
    Thanks very much for your help, your solution solved my problem.
    Thanks again and kind regards
    Mike

  • HT201303 was just having this problem until today. It is now all sorted and I can explain what to do very simply and easily.

    I was just having this problem until today. It is now all sorted and I can explain what to do very simply and easily.
    I remembered the answers to my questions, I just forgot "EXACTLY" how I entered the text - so I had to have them reset. The easiest way is to sign in through www.appleid.com. Then on the right click the "Manage your Account" link and sign in. Easy so far right. Then, as others have said, look on the left of the screen you will see a link called "Password and Security" - click on this. Now this is where the confusion begins. Some people have a link located directly under the existing questions that looks like this "Forgot your answers? Send reset security info email to blah blah blah email . If you see this click it and it will send an email to the "Rescue Email" address that you entered when you originally entered your answers. Follow the instructions contained in this email and you are done. If you cannot remember this email address or you have since closed it, you will need to go to the Itunes Express lane and send an email to Apple requesting them to reset your answers.
    HOWEVER IF YOU DO NOT SEE A THIS LINK UNDER THE QUESTIONS - this means that you DID NOT enter a Rescue email address when you originally set your questions. The only way you can now reset your Security Questions and Answers is to go to the Itunes Express lane and email Apple asking to have these reset. I have 2 apple accounts, one for myself and one for my daughter - as I did not include a rescue email I had to email apple. On both occasions, these questions were reset and an email sent to me exactly 24 hours after I sent them the request. I entered the new details, WROTE THEM DOWN EXACTLY AS I ENTERED THEM THIS TIME, entered a Rescue Email this time and I am good to go again. Simple. Now when I log in and click on "Password and Security" I do have the reset link visable. Apple support are good, they just take a bit of time to get things done, but they always seem to get there in the end. I just wish someone had taken the time to explain this somewhere else in the forum as it would have saved me much time and angst.
    To get to the Itunes Express Lane go to this website www.appleid.com make sure the correct country is displayed top right, if not change it. Once this is saved go to the tabs at the top of the screen and click Support. Then halfway down the next page you will see a photo of two random people with a title of Contact Apple Support - Click this. Scroll down until you see the itunes logo, to the right of this you will see the link Express Lane for iTunes Player and iTunes Store - click on this. One the right hand side of the next page click on the link "itunes Store". On the next page click the link "Account Management" check the radio button beside "itunes store account security", select your country from the drop down box and click "Continue". Under the heading MORE OPTIONS, you will see a clickable link called email - click this. Fill in your name, Apple ID and country. Then in the text box, write "I have forgotten the answers to my Security questions, would you kindly please reset them. Thank-You". Then Click Continue, you will be given a reference number and an email is sent to your address advising that generally someone will attend to your request within 24 hours. Like I said previously, I had to do this twice and both times it was reset however it was done within about 5 minutes of the 24 hour cut off, so you will have to be patient. I know 100% that this works for Australia - I am guessing other countries should be similar. Hope this helps someone somewhere!

    Standard troubleshooting...
    1. Try a Restart by pressing the sleep/lock button until you see the slider.  Slide to power off.  Restart by pressing the sleep/lock button until you see the Apple logo.
    2. Try a Reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider if it comes up. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    3. Remove apps from Recently Used list...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Swipe up on the app preview card
    - Press the home button when done.
    4. If still a problem restore with your backup.
    5. If still a problem restore as new, i.e. without your backup. See how it runs with nothing synced to it.
    6. If still a problem, it's likely a hardware issue.

  • I have problem with 4s and my car 2011 passant cc always drob after I connect phone to car . What Can I do to solve this problem ?

    I have the same problem with my car passat cc 2011 and my phone 4s that drob connection and  calls after time so what can I do to solve this problem ?

    It's a really bad idea to post your email address - it's an invitation to spam - and I've asked the Hosts to remove it.
    If a second-hand iOS device has been 'Activation locked' then only the previous owner - effectively the shop in this case - can unlock it, either by providing you with the account ID and password, or by removing it from his list of devices (as he should have done before selling it) - please see http://support.apple.com/kb/ts4515
    If you are unable to contact them to do this then I'm afraid you will not be able to use the device - there is no other way of unlocking it at all. Apple cannot unlock it for you.

  • Every Time that I try ot download my songs that I have purchased from Itunes and error message come up, "error 450." Make sure that your network connection is open and try again. What can I do to fix this problem?

    Every time that I try to download my music from I tunes an error message comes up it says, ( err = 450) Make sure that your network connetion is active and try again.  What can I do to fix this problem, I have tried everthing that I-tunes has told me but with no luck. Thanks

    Try disabling your parental controls. Does that help with the 450?
    iTunes: Using Parental Controls

Maybe you are looking for

  • Netflix on iPhone AND...iPad

    Does anyone know the future of Netflix streaming on the iPhone and if this will be possible on iPad. Thanks, Nile.

  • Smartforms - template printing on the wrong page

    Greetings, everyone. I've been searching the SAP library and the forum, but haven't come across a solution. I created a form in Smartforms, with two pages defined: "first_page" (with the "main" window, 15 cm high, and some secondary windows), and "ot

  • Saved jpg image has magenta hue in browser - help please

    Hi, folks: [running photoshop cs3 under windows XP Pro/SP2] I've been saving jpg files for years with no problems. Now I have one that has me stumped! I have a psd file with about 14 layers, a few of which are hidden. I merge layers and then save as

  • Why no accelometer/landscape support?

    Why has Apple neglected these applications for landscape support? It seems like having landscape for all of the applications would be very helpful, including mail, sms, calendar, and contacts. A lot of phones use landscape for writing texts (and e-ma

  • Problem wih delivery address on print preview

    Dear experts, I have a problem with the delivery address on the print preview. When i create my PO and i attahced the storage location my delivery address in good in the PO and in the print preview. When i'm not attaching the storage location the del