Pipelined function..please help

hi all...
i need a fuction which will split the data n insert into the table...
i created a fuction like this :
CREATE OR REPLACE FUNCTION FN_SPLIT(text      IN VARCHAR2 DEFAULT NULL,delimiter      IN VARCHAR2 DEFAULT ' ')
RETURN SPLIT_TYPE_TABLE PIPELINED
IS
PRAGMA AUTONOMOUS_TRANSACTION;
TYPE ref0 is REF CURSOR;
myCursor ref0;
out_rec SPLIT_TYPE := SPLIT_TYPE(null, null);
--CURSOR MSTFRC IS SELECT * FROM TEMP_SPLIT;
index_      NUMBER(10,0);
BEGIN
     BEGIN
          /*index_ := -1;
          cnt:=0;
          l_str:=text;
          loop
l_n := instr( l_str, delimiter );
exit when (nvl(l_n,0) = 0);
               cnt:=cnt+1;
               INSERT INTO TEMP_SPLIT (ID,NAME)
                         VALUES (cnt,ltrim(rtrim(substr(l_str,1,l_n-1))));
l_str := substr( l_str, l_n+1 );
end loop;*/
          Load_Temp_Splitting(text,delimiter);
          open myCursor for select * from temp_split;
          LOOP FETCH myCursor into out_rec.ID,out_rec.NAME;
               EXIT WHEN myCursor%NOTFOUND;
               PIPE ROW(out_rec);
          END LOOP;
          CLOSE myCursor;
          RETURN;
END;
END FN_SPLIT;
it created succesfully without errors but when i run this function it showing an error like cannot evaluate pipelined function..
my requirement is to split the data like 'as,af,er,yt' split this by comma n insert into the table with row id like
1 as
2 af
3 er
like...
please help friends....
thnks in advance...
lol
Neethu

> when i run this function it showing an error like cannot evaluate pipelined
function.
And that is one of the most important pieces of the puzzle - the actual error displayed. What is it? (full error, i.e. number + message)
As for the code in the function. That looks a bit like an ugly hack to me. Why the INSERT into table? Why not simply use a local collection or array?
And why a pipelined table function specifically?
The following code demonstrates a string split function:
SQL> create or replace type TStrings as table of varchar2(4000);
2 /
Type created.
SQL>
SQL> create or replace function tokenise( cString varchar2, cSeparator varchar2 DEFAULT ',' ) return TStrings AUTHID CURRENT_USER is
2 strList TStrings;
3 str varchar2(4000);
4 i integer;
5 l integer;
6
7 procedure AddString( cLine varchar2 ) is
8 begin
9 strList.Extend(1);
10 strList( strList.Count ) := cLine;
11 end;
12
13 begin
14 strList := new TStrings();
15
16 str := cString;
17 loop
18 l := LENGTH( str );
19 i := INSTR( str, cSeparator );
20
21 if i = 0 then
22 AddString( str );
23 else
24 AddString( SUBSTR( str, 1, i-1 ) );
25 str := SUBSTR( str, i+1 );
26 end if;
27
28 -- if the separator was on the last char of the line, there is
29 -- a trailing null column which we need to add manually
30 if i = l then
31 AddString( null );
32 end if;
33
34 exit when str is NULL;
35 exit when i = 0;
36 end loop;
37
38 return( strList );
39 end;
40 /
Function created.
SQL>
SQL> select tokenise( 'as,af,er,yt' ) from dual;
TOKENISE('AS,AF,ER,YT')
TSTRINGS('as', 'af', 'er', 'yt')
SQL>
SQL> select * from TABLE( tokenise( 'as,af,er,yt' ) );
COLUMN_VALUE
as
af
er
yt
SQL>

Similar Messages

  • Photoshop CS6 Stops Functioning Please Help

    System Information
    Windows 8 x64
    AOC 2243fW 1920x1080 monitor (x2)
    Processor: Intel Core i3 2120 3.40GHz (Dual Core)
    Ram: 6GB
    GPU: nVidia geForce GTX 760 TI 2GB DDR5
    Notes:
    Photoshop is up to date.
    Performance settings in photoshop are set correctly.
    Monitor Profiles are not defective.
    Images/Files are not corrupted.
    Issue:
    After a fresh restart of my PC Photoshop will function as normal for a short while (1hr appx.) after that it ceases to import/export or do any of it's intended functions. I CANNOT import ANY files. I am not presented with any error messages and it simply doesn't work. Buttons appear to highlight and the toolbars are still accessible, however I cannot continue with my work. If I then restart my computer it will function for a short while again then this will happen.
    Things I have done:
    Reinstalled Photoshop CS6
    Deleted Preferences (Multiple Times)
    Contacted Adobe Support in which case they failed to fix the problem.
    I am at a null and I don't know what to do and it is costing me money. Someone please help.

    Do you have any third party plugins? Have you tried disabling them?
    What utility programs and system extensions are you using? Have you tried disabling them?
    The fact that it requires you to restart the system means that the problem is almost certainly at the system level (utilities, drivers, system extensions, etc.).

  • While editing photos in Aperture, I'm trying to make an "auto" adjustment to the exposure but the button is grayed out and consequently doesn't perform any function, please help! Thank you, Mike

    While editing photos in Aperture, I trying to make an "auto" adjustment to the exposure,
    but the "auto" button is grayed out and will not allow any auto function to take place.
    Please help!
    Thank you,
    Mike

    Mike, are you working with raw images?
    For some raw images auto exposure is not available, have a look at this manual page:
    http://documentation.apple.com/en/aperture/usermanual/index.html#chapter=18%26se ction=9%26tasks=true
    Note: Automatic exposure adjustment is available for Aperture-supported RAW images only. If you want to adjust the exposure of another file type, such as JPEG or TIFF, see Working with the Exposure Controls. For a list of supported RAW file types, go to the Apple website at http://www.apple.com/aperture/specs.

  • HT3678 i did all this and it changed to the Pro symbol yet i still cant do any of the pro functions please help

    Please help! i cant do any of the QuickTime player 7 pro functions yet it accepted my registration

    Edit: ive even tried resyncing it.

  • F Buttons (eg. F1, F2) have lost usual functions please help!

    Bought my MacBook a few days ago and today I think I've done something inadvertently which has knocked all the shortcuts out of whack. For example, F1 has a sign on it to decrease the brightness on screen, F2 has one to increase, F3 I think is something to do with Expose and F4 has a dashboard thing on it, then F7 to F9 are various controls to fastforward/rewind things and F9,10 & 11 are sound related...however, none of these work now, they do different things and I don't know how to get them to go back to doing what I want. When I hold down the fn button they work but it's a pain because I can't turn my sound on and off otherwise, PLEASE help, I'm getting really frustrated!

    Open System Preferences.
    Select "Keyboard & Mouse".
    Select "Keyboard".
    Uncheck the box labeled "Use all F1, F2, etc. keys as standard function keys".
    That should do it.

  • HT201210 hi i dropped my iphone3 it landed on its back screen is not broke but all i get now is white screen no apps no functions please help regards

    hi i droppoed my iphone3 screen not broke just stays white no apps no functions need help regards

    Sounds like you broke it. Get it replaced for $149 or buy a new phone.

  • Fitting Package (Fit Function) - Please help!

    Hey I'm a noob and I want someone to explain or give me links or just any info regarding:
    Fitting Package (Fit Function) - If anyone knows anything about thise please tell me!
    Thanks in advance!

    Hello,
    I am not sure what Fitting Package you are referring to.  In general, if you are looking for resources to study curve fitting (which I presume is the functionality underlying the Fitting Package you mention), you may want to look at the following site:
    http://mathworld.wolfram.com/search/index.cgi?num=&q=curve+fitting
    Google is bound to return some useful results by searching relevant keywords as well!
    I hope this helps and best of luck!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • HT4623 I have just updated to the latest ipad setting and my search engine no longer functions, please help.

    I should like to know if this may be a problem with the latest update iOS 7.1 and how can I correct it ,please. Thank you for your help.Rensah

    Hi JimHdk
    I was attempting to use google to find information.  Google stopped working for at least half an hour. I decided to plug the ipad in to recharge as the battery was below 50% and left it. Later, On restarting the ipad I discovered that the search engine was, and still is, working.
    I have heard that previous updates have caused problems to iPads etc and considered that this might have happened with this update, despite being unaffected on previous updates.
    My ipad is fully working now but I am curious to know why it happened as it has never stopped working since I purchased the ipad 18 months ago.
    I appreciate your contacting me I order to help. Many thanks, Rensah

  • CASE Statement error in function -- Please help!

    Hi All,
    I created a function in my report.
    It has a SQL query similar to the one below. The query works fine in SQL plus.
    It has a CASE statement. I am getting error at line4 at the select statement. Error is: "Encountered symbol 'SELECT'....."
    Can we use CASE statements like this in reports that use SELECT statements for RETURN EXPRESSIONS. Do we have to do any special?
    Can someone help me out of this trouble?
    THanks in advance.
    SELECT PARENT_id,
         CASE WHEN EXISTS (SELECT PARENT_id FROM CHILD CH1 WHERE CH1.PARENT_id = PARENT.PARENT_id AND UPPER(CH1.description) LIKE '%ABC%') THEN
              (SELECT CH2.MOD_id FROM CHILD CH2 WHERE CH2.PARENT_id = PARENT.PARENT_id AND UPPER(CH2.description) LIKE '%ABC%')
         ELSE
              (SELECT MOD_id FROM
              (SELECT MOD_id,PARENT_id FROM CHILD CH3 ORDER BY started) MOD2 WHERE MOD2.PARENT_id = PARENT.PARENT_id AND ROWNUM = 1
         END
    ) MOD_ID
    FROM PARENT;

    take out the parentheses after the PARENT_ID and see
    like below
    SELECT parent_id,
           CASE
              WHEN EXISTS (
                     SELECT parent_id
                       FROM CHILD ch1
                      WHERE ch1.parent_id = PARENT.parent_id
                        AND UPPER (ch1.description) LIKE '%ABC%')
                 THEN (SELECT ch2.mod_id
                         FROM CHILD ch2
                        WHERE ch2.parent_id = PARENT.parent_id
                          AND UPPER (ch2.description) LIKE '%ABC%')
              ELSE (SELECT mod_id
                      FROM (SELECT   mod_id, parent_id
                                FROM CHILD ch3
                            ORDER BY started) mod2
                     WHERE mod2.parent_id = PARENT.parent_id AND ROWNUM = 1)
           END AS mod_id
      FROM PARENT;       

  • Problem with CLIENT_OLE2 functions, please help

    Hi all,
    I´m trying to create a new excel document on client side, filled with data from database tables.
    When server tries to execute the following line:
    aplicacion     := CLIENT_OLE2.CREATE_OBJ('Excel.Application');
    it hangs up and in the Java console appears the following trace:
    "Exception occurred during event dispatching:
    java.lang.NoClassDefFoundError
    at oracle.forms.webutil.ole.OleFunctions.create_obj(OleFunctions.java:513)
    at oracle.forms.webutil.ole.OleFunctions.getProperty(OleFunctions.java:218)
    at oracle.forms.handler.UICommon.onGet(Unknown Source)
    at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
    at oracle.forms.engine.Runform.processMessage(Unknown Source)
    at oracle.forms.engine.Runform.processSet(Unknown Source)
    at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
    at oracle.forms.engine.Runform.onMessage(Unknown Source)
    at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
    at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
    at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)"
    I think webutil configuration is right, because other webutil functions like "client_get_file_name" work correctly... and the same code worked fine in my test server.
    More info:
    Test server: Windows XP, Oracle 10g, Forms 9.0
    Final server: Unix, Oracle 10g, Forms 9.0
    Any help?
    Thanks in advance.

    Have you got the Jacob files installed on the application server? These are not part of webutil, you will need to do a web search to find them.
    See section 2.3 of the Webutil Users Guide.

  • How to achive this using analytical function-- please help

    version 10g.
    this code works just fine with my requirement. i am tyring to learn analytical functions and implement that in the below query. i tried using row_number ,
    but i could nt achive the desired results. please give me some ideas.
    SELECT c.tax_idntfctn_nmbr irs_number, c.legal_name irs_name,
           f.prvdr_lctn_iid
      FROM tax_entity_detail c,
           provider_detail e,
           provider_location f,
           provider_location_detail pld
    WHERE c.tax_entity_sid = e.tax_entity_sid
       AND e.prvdr_sid = f.prvdr_sid
       AND pld.prvdr_lctn_iid = f.prvdr_lctn_iid
       AND c.oprtnl_flag = 'A'
       AND c.status_cid = 2
       AND e.oprtnl_flag = 'A'
       AND e.status_cid = 2
       AND (c.from_date) =
              (SELECT MAX (c1.from_date)
                 FROM tax_entity_detail c1
                WHERE c1.tax_entity_sid = c.tax_entity_sid
                  AND c1.oprtnl_flag = 'A'
                  AND c1.status_cid = 2)
       AND (e.from_date) =
              (SELECT MAX (c1.from_date)
                 FROM provider_detail c1
                WHERE c1.prvdr_sid = e.prvdr_sid
                  AND c1.oprtnl_flag = 'A'
                  AND c1.status_cid = 2)
       AND pld.oprtnl_flag = 'A'
       AND pld.status_cid = 2
       AND (pld.from_date) =
              (SELECT MAX (a1.from_date)
                 FROM provider_location_detail a1
                WHERE a1.prvdr_lctn_iid = pld.prvdr_lctn_iid
                  AND a1.oprtnl_flag = 'A'
                  AND a1.status_cid = 2)thanks
    Edited by: new learner on May 24, 2010 7:53 AM
    Edited by: new learner on May 24, 2010 10:50 AM

    May be like this not tested...
    select *
    from
    SELECT c.tax_idntfctn_nmbr irs_number, c.legal_name irs_name,
    f.prvdr_lctn_iid, c.from_date as c_from_date, max(c.from_date) over(partition by c.tax_entity_sid) as max_c_from_date,
    e.from_date as e_from_date, max(e.from_date) over(partition by e.prvdr_sid) as max_e_from_date,
    pld.from_date as pld_from_date, max(pld.from_date) over(partition by pld.prvdr_lctn_iid) as max_pld_from_date
    FROM tax_entity_detail c,
    provider_detail e,
    provider_location f,
    provider_location_detail pld
    WHERE c.tax_entity_sid = e.tax_entity_sid
    AND e.prvdr_sid = f.prvdr_sid
    AND pld.prvdr_lctn_iid = f.prvdr_lctn_iid
    AND c.oprtnl_flag = 'A'
    AND c.status_cid = 2
    AND e.oprtnl_flag = 'A'
    AND e.status_cid = 2
    AND pld.oprtnl_flag = 'A'
    AND pld.status_cid = 2
    )X
    where c_from_date=max_c_from_date AND e_from_date =max_e_from_date AND
    pld_from_date=max_pld_from_date

  • Error when calling SOAP Runtime functions - Please help!

    Hi,
    Very new to SAP. I just installed SAPNW7.0ABAPTrialSP12 (sandbox server, with default options) and setup the
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/db/7c623cf568896be10000000a11405a/content.htm">Flight Data</a>.
    I wanted to invoke some of the Flight Data functions through SOAP. So I invoked the following URL:
    http://localhost:8000/sap/bc/srt/rfc/sap/BAPI_FLIGHT_GETDETAIL?sap-client=000&wsdl=1.1
    I get the following error:
      The following error text was processed in the system NSP : Error when calling SOAP Runtime functions
    The error occurred on the application server hs_NSP_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
          Method: HANDLE_REQUEST of program CL_SOAP_TRANSPORT_EXTENSN_ROOTCP
          Method: HANDLE_REQUEST of program CL_SOAP_HTTP_EXTENSION========CP
          Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_SOAP_HTTP_EXTENSION========CP
          Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
          Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
          Module: %_HTTP_START of program SAPMHTTP
    FROM Runtime Error Log:
    Runtime Errors                     UNCAUGHT_EXCEPTION                                                          
    Exception                          CX_SOAP_CORE
           Termination occurred in the ABAP program "CL_SOAP_TRANSPORT_EXTENSN_ROOTCP" -                
               in "HANDLE_REQUEST".                                                                               
    The main program was "SAPMHTTP ".                                                                               
    In the source code you have the termination point in line 37                                 
              of the (Include) program "CL_SOAP_TRANSPORT_EXTENSN_ROOTCM004".
    Does anyone have any ideas on what is going on? Thanks in advance.

    Hi,
    Have a look at this blog from Michal Krawczyk to find a solution:
    The specified item was not found.
    Hope this helps,
    Grzegorz

  • NI-VISA Library and C program functions PLEASE HELP

    I'm currently coding in "C" and using VISA.h. I wrote a program that will talk to a spectrum analyzer, determine certian spurious frequencies, and record those frequencies to a plain text file, which is all performed over a GPIB bus. I'm now trying to clean up some of the code and am having a problem with putting sections of the code into function calls. I was wondering if someone can show me what a simple funtion prototype would look like in C using the visa.h style of coding. In other words, what parameters do I need to pass to a function that would allow me to talk to the GPIB connected device while inside that function? For example, if I had spectrum analyzer connected via GPIB, and I wanted to make a function call
    in my code that would set the center frequency to 3 MHz, other then the 3 MHz, what additional parameters do I need to pass to the function to allow it to send the command "ENS:FREQ:CENT 3 MHz" over the GPIB bus. This function would return VOID.
    Thanks for any help with this
    Mike

    Hey Mike,
    First of all I wouldn't recommend returning VOID for your function. All of the VISA/GPIB functions return a status that lets you know whether or not the function completed. Therefore, I would suggest that your function return the status of the VISA commands so your main application knows if your function worked.
    I would suggest creating functions that require you to pass the instrument handle (Object Handle) that is returned from viOpen and then any other information needed to modify an attribute or send a value. There are thousands of examples on our website. Check out www.ni.com/idnet.
    This link has all of the instrument drivers that we have created. I would suggest looking at the instrument drivers made for CVI.
    I hope this helps out.
    JoshuaP
    National Instruments

  • Need help about general functionality- please help reminders/contacts

    Hello All
    I am currently working on putting together an informational email on the new features with IOS 5, my biggest drawback is that the group IPAD device is currently not available so this is a big roadblock for verifying information.
    I basically have two questions, what do reminders consist of now with the new IOS5, it was my understanding that reminders are different then calendar items in that on the outlook side they are considered to be Tasks/To-do items and now this feature. Now how does this differ from a calendar reminder for say an appt you have coming in the next hour, does that stay in the calendar view or does the reminder pop up show up somewhere in reminders? I hope I am being clear if not please let me know.
    Secondly, when a person has an existing device and contacts. How do their existing contacts blend in with contacts they have on their firm accounts? Do they get showed seperately (Business, Personal) Any help you can provide is greatly appreciated.

    So how many tweets at night? FB messages?
    Try this: Charge it to 100% but also put it in Airport Mode. If you are still close to 100% in the morning something is using cell time, next you'll just have to narrow down what it is.

  • The google feeling lucky app from the address bar is not working, a program called vshare performs a search instead and I am unable to restore the original function. please help

    I do not know how but vshare, has been performing a search everytime I type something in the address bar that is not a complete website i.e. facebook instead of facebook.com
    this is very annoying and I am unable to uninstall vshare, I have even tried uninstalling firefox and reinstalling it

    I had this problem too, and just fixed it, and found a great website that helped.
    1. In Firefox type about:config in the address bar and press ENTER.
    2. Locate and double-click the entry for keyword.URL
    3. Set the value based on which search provider you would like to use for your address bar searches. Here are a few search strings you can use.
    Yahoo: http://search.yahoo.com/search?p=
    Ask: http://www.ask.com/web?q=
    Google: http://www.google.com/search?&q=
    ChaCha: http://search.chacha.com/search/query?searchwithguide=0&query=
    source: http://www.technipages.com/firefox-change-address-bar-search-provider.html
    And if you want the I'm Feeling Lucky search, instead of just the Google page search, then put:
    http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=
    instead of: http://www.google.com/search?&q=
    I just did that, and it worked for me. I had to go through a bunch of the different options, but I found one that worked.
    Source: http://www.google.com/support/forum/p/Chrome/thread?tid=25cf5ea2bc5a2744&hl=en

  • Touchpad Not Functioning-PLEASE help!

    The touchpad had ceased to function on our Officejet Pro 8500 Premier.  We're holding out a few months to replace it if we can.  Is there a key sequence that can be entered for "OK", since there is no OK button and Cancel doesn't work.

    This indicates that the digital output has been switched on. Check this thread for a possible solution.
    http://discussions.apple.com/thread.jspa?messageID=5161787&#5161787

Maybe you are looking for

  • How to configure Oracle jsp engine on OAS4.0.8.1

    1. How to configure Oracle jsp engine on OAS4.0.8.1 for linux 2. How to set the parameter on OAS. The Ojsp document only give examples depict the syntax used when running in an Apache/JServ 1.0 environment

  • Error : 'IDM_DataSource' Can't be created during IDM UI installation

    Dear All, I am installing SAP NW IDM 7.1 on Windows/MSSQL2005.Getting error while creating IDM_DataSource in installation phase of IDM UI. I am using JDBC 2.0 and JDK 1.6 Error java.rmi.RemoteException: com.sap.engine.services.dbpool.exceptions.BaseR

  • How to include security settings into InDesign PDF presets?

    I have prepared an InDesign template for multiple users in my team. Ihave created a set of PDF presets for exporting PDFs to keepconsistency. I want to protect all the PDF files with password and haveto include the password protection in the PDF pres

  • Sharing data

    I have a nokia lumia, but unable to activate network sharing. What size of data package must you purchase in order to use your smartphone as a data hub for your other wireless devices?

  • Error OGG-01168 abending replicat process

    Hello All, Greetings ! I have tables that do not have any unique key in source and target database. Replicat process work fine in this case for some tables but for certain table it stops. and generates error: "ERROR OGG-01168 Encountered an update fo