Need procedure for the function

Hi
Can any one create a procedure
for the following
Following is a function i need a procedure
which basically Converts the values in the a Column to no of rows
Example : Column Name: USA; Canada; Japan;
in to 3 rows : USA
Canada
Japan
create
or replace function f_get_row_vals(V_column_value VARCHAR2)
return T_LIST_OF_VALS PIPELINED
as
n_str_length NUMBER := 0;
N_START_CHAR NUMBER := 1;
N_END_CHAR NUMBER := 0;
n_counter NUMBER := 1;
v_value VARCHAR2(50) := NULL;
begin
IF V_column_value IS NULL
THEN
RETURN;
END IF;
n_str_length := LENGTH(V_column_value);
LOOP
N_END_CHAR := INSTR(V_column_value,';',1,n_counter);
IF N_END_CHAR = 0
THEN
v_value := SUBSTR(V_column_value, N_START_CHAR, n_str_length - N_START_CHAR + 1);
ELSE
v_value := SUBSTR(V_column_value, N_START_CHAR, N_END_CHAR-N_START_CHAR);
END IF;
n_counter := n_counter + 1;
N_START_CHAR := N_END_CHAR + 1;
pipe row(v_value);
EXIT WHEN N_END_CHAR = 0 ;
END LOOP;
RETURN;
END;
Thanks

This is the procedure they are using previously.
This procedure is calling the above function. I need like this
CREATE
OR REPLACE PROCEDURE P_EXPAND_USER_ACCESS_REV_MART
IS
rec_ODS_USER_ACCESS_REV_MART ODS.ODS_USER_ACCESS_REV_MART%ROWTYPE;
CURSOR c_getrows
IS
select * from ODS.ODS_USER_ACCESS_REV_MART;
BEGIN
OPEN c_getrows;
LOOP
FETCH c_getrows INTO rec_ODS_USER_ACCESS_REV_MART;
EXIT WHEN c_getrows%NOTFOUND;
DBMS_OUTPUT.put_line(rec_ODS_USER_ACCESS_REV_MART.wwfo_area);
DBMS_OUTPUT.put_line(rec_ODS_USER_ACCESS_REV_MART.soln_division);
INSERT INTO DW_USER_ACCESS_REV_MART
user_id,
wwfo_area,
soln_division
SELECT rec_ODS_USER_ACCESS_REV_MART.user_id,
area_tab.column_vaLue,
soln_tab.column_value
FROM TABLE(CAST(f_get_row_vals(rec_ODS_USER_ACCESS_REV_MART.wwfo_area)AS T_LIST_OF_VALS) ) area_tab,
TABLE(CAST(f_get_row_vals(rec_ODS_USER_ACCESS_REV_MART.soln_division)AS T_LIST_OF_VALS)) soln_tab
END LOOP;
CLOSE c_getrows;
COMMIT;
END;

Similar Messages

  • Need help for the Function Module 'PFL_GET_PARAMETER_INFO'

    Hi Experts,
    The FM 'PFL_GET_PARAMETER_INFO'  returns the value for Profile Parameters for a system .
    The inputs required for this FM are :
      1.   Parameter name  : ( eg . login/min_password_lng etc. )                   
      2 . Parameter Type
    I am not sure about what the value of Parameter Type should be .
    Its a mandatory field.
    I have tried to search but could not find anything.
    Can you please help me on this?
    Thanks in Advance,
    Harshit Rungta
    Edited by: harshit rungta on May 27, 2011 8:15 AM

    What exactly is the use-case for this?
    Many developers "c-call" the params and neglect this feature of the type - also whether it is static or dynamic. Some params are even dynamic as system profiles in one direction but static as instance parameters in the other direction when changing the value.
    As you cannot create your own system profile parameters, I do not see the use-case for why you are wanting to check it in advance, because the application APIs should do this.
    What you are possibly looking for is function module SUSR_GENERATE_PASSWORD in this case. It will respect "the rules" in the params.
    Do not use the legacy function RSEC_GENERATE_PASSWORD directly.
    Cheers,
    Julius

  • *UPDATED 7/15/04* Complete guide to bioses, drivers, and needed files for the MSI K8N Neo Platinum

    Complete newbie's guide to bioses, drivers, and needed files for the MSI K8N Neo Platinum:
    Last Updated: Thursday July 15th, 2004
    Bioses:
    (In order of date released.)
    1.1b3 - (Download)
    - Pre-1.1, given to reviewers to use in their reviews and benchmarks.
    - Less stable, but supposedly you get slightly better overclocks.
    1.1 Official - (Download)
    1. This is AWARD BIOS release
    2. This BIOS fixes the following problems of the previous version:
    - Memory always run DDR 200 when install single side DDR on DIMM2 & DIMM3.
    - Windows 2000 can't format the RAID IDE HDD when plug in Promise 378 controller.
    1.2b5 - (Download)
    1.2b7 - (No Download Yet)
    1.2b10 - (Download)
    - First attempt to fix false temperature readings. Fixes it for some people with Newcastle cores and doesn't fix it for anybody with Clawhammer cores.
    1.2b12 - (Download)
    - Second attempt to fix false temperature readings. Fixes it for some people with Newcastle cores and some people with Clawhammer cores.
    1.3b1 - (Download)
    - Another attempt to fix temperature problems?
    - Possibly fixes cold boot/power light issues?
    1.2 Official - (Download)
    1. This is AWARD BIOS release
    2. This BIOS fixes the following problems of the previous version:
    - System can't resume from S3 sometimes when install USB device.
    - Support K8 Sempron CPU.
    - Turn off keyboard LED in S3.
    --Quick Guide for flashing BIOS, provided by MSI--
    1. Create a MS-DOS boot diskette, then copy the the .exe and the bios file to the floppy disk. Both of these files can be found in the package you downloaded.
    2. Press "Delete" and go to BIOS setup while computer bootup.
    Check BIOS advanced features and see if BIOS flash write control is enabled
    (This option must be enabled. If you can not find this setting, it means the BIOS can be
    flashed.)
    3. Boot from MS-DOS boot diskette and get a:\> prompt.
    4. Type "", then press ENTER
    5. The flash program will then ask "Do you want to save BIOS?", please press "N" for no. The when you see Press 'Y' to program or 'N' to Exit, please press "Y" to continue.
    6. After flashing complete, remove floppy and reset the system .
    7. Press DELETE or F1 when prompted at first reboot after flashing.
    8. Load BIOS optimized defaults, then save settings and exits.
    Drivers & Needed Files:
    (Note: All these drivers are for Windows XP.)
    Leaked Nvidia nForce3 Chipset Drivers Version 4.40
    (Please use at your own risk, these are LEAKED drivers. Password for the .zip file is "ocworkbench rules". Also, you will need to rename the WinXP_2K folder in IDE to either WinXP or Win2K else the installer doesn't pick it up.) Thanks for the link Wonkanoby!
    *NEW* Leaked Nvidia nForce3 Chipset Drivers Version 5.03
    More leaked drivers? Seems some parts of the drivers are older and some are newer.
    1. Windows XP Service Pack 1A (Web Install) -or- Windows XP Service Pack 1A (Full Install)
    2. Microsoft DirectX 9.0b (Web Install) -or- Microsoft DirectX 9.0b (Full Install)
    3. Nvidia nForce3 Chipset Drivers Version 4.24
    4. AMD Athlon 64 Processor Driver Version 1.1.0.14
    5. Nvidia Video Card Driver Version 56.72 -or- Omega Nvidia Video Card Driver Version v1.5303
    (The Omega drivers are third party drivers optimized for gaming, most prefer these over the standard Nvidia drivers.)
    5. ATI Video Card Driver Version 4.7 -or- Omega ATI Video Card Driver Version 2.5.51
    (The Omega drivers are third party drivers optimized for gaming, most prefer these over the standard ATI drivers.)
    6. Onboard Sound Driver (Realtek AC'97 Audio Codec) Version A3.61
    It is HIGHLY reccomended that you install the drivers/needed files in the order listed above. Please note that there are two #5's because you either install one or the other depending on your video card, do not install both of them.
    You will come across a problem here though. You can't install the chipset drivers without installing the Windows service pack and DirectX first, but the Windows service pack and DirectX installs need the internet to download files and you won't have working internet until you install the chipset drivers. Here's what I did to get around this. Instead of downloading the web install versions of Windows service pack and DirectX, download the full version and and put them along with all the other drivers on a backup hard drive or burn them to a CD, this way you will have all the drivers you need when it's time to install them and none of them will require the internet to download files.
    Another note when installing drivers. Apparently the Nvidia chipset drivers also come with drivers for the onboard sound, but people seem to agree that the Realtek onboard sound drivers are better. When you are installing the Nvidia chipset drivers, just be sure to uncheck the box for sound drivers when it asks you which drivers you would like to install. Now you can safely install the Realtek drivers without any chance of conflicting sound drivers. Thanks for the tip Wonkanoby!

    Quote
    Originally posted by RLiu818
    Quote
    Originally posted by Deviation56
    Quote
    Originally posted by RLiu818
    You CAN install the nforce drivers BEFORE installing SP1.  The only requirement to install the nforce drivers is DX9.
    So is SP1 still recommended to install before the nforce drivers?
    The installer still reccomends to install it beforehand for full USB 2.0 functionality... I would have put what you said in there but I wanted to keep it as simple as possible.  
    oh.  IIRC the installer just says USB 2.0 will be fully functional after SP1 is installed.  So after you install SP1 you go into device manager and u click update driver and it will auto search and update the driver.
    Simplicity-wise, i guess its pretty much equal.  It might take less preparation to just copy DX9 full onto a CD and install that first, then nforce driver, then right away you have yoru internet connection.
    but i dunno.. i guess i will try it your way this time when my RMA"d board comes.
    i will be fomratting and doing a fresh install later on today and will let you know if i come across any problems

  • 2 pricing procedures for the same sales area

    Hi Gurus.,
                  My client requirement is the client requires 2 pricing procedures for the combination of Same sales areaDEocument Pricing procedurecustomer pricing procedure in OVKK
    He doesnt want to use new sales area or new document pricing procedure or new customer pricing procedure,I know that in standard SAP it is not possible.
    Can any of the gurus throw some light on this.Some work around is required here,So can u please say the required changes in Standard functionality.
    Thanks & Regards
    Narayana
    Message was edited by:
            manam narayana
    Message was edited by:
            manam narayana
    Message was edited by:
            manam narayana

    Hi Gurus.,
                   First of all thank you very much for giving me so tremendous response, But my client requirement is,
                  He has one customer and for that customer when raising an order ,for some orders Tax shouldnot caliculate and for some orders Tax should be caliculated,
            For example :  If he gives price 100,Then the base price should be 100,For some orders he  gives price as 130 rs which is inclusive of tax like 110 should be the base price and 20 rs tax should get caliculated
               So i have tried in the pricing procedures and we have standard pricing procedure RVAA01 & RVAB01 ,In which RVAB01 is the price inclusive of tax procedure,We can assighn different pricing procedures if any of the combination in OVKK is changed,But he dont want to change the combination in OVKK.
            So client asks now when he raise an order he decides how the price should be caliculated, i.e the price may be he give price or price inclusive tax,of which the pricing procedure should automatically split the tax and price accordingly,He is asking in the way like when we raise a sales order we should do like a pop up box should appear asking which pricing procedure should be selected,So on selecting the pricing procedure the order should caliculate based on the selected pricing procedure
    Thanks & Regards
    Narayana

  • Why can I not use the channel name, which is obtained from the function of DAQmx Task, as the input of the channel name for the function of Get Channel Information of DAQ?

    Why can I not use the channel name, which is obtained from the function of DAQmx Task, as the input of the channel name for the function of Get Channel Information of DAQ?

    Not a lot of details here, but my guess is this isn't working for you because you are wiring in the task to the Active Channels Property and not the actual Channel Name. I have attatched a screenshot of what I believe you are trying to do. The Task has 2 channels in it, so I need to index off one of the channels and wire it into the active channels input of the Channel Property node. Then I can read information about that channel
    Attachments:
    channel_name.JPG ‏69 KB

  • Pricing procedure for the calculation of VAT

    Dear all,
    We require one new tax structure.
    Assessable value + service tax & VAT for the sum of Assessable value + service tax.
    Kindly give us the pricing procedure for the above requirement.
    Regards
    Mahalingam sarathi

    >
    Mahalingam Sarathi wrote:
    > Dear all,
    >
    > We require one new tax structure.
    >
    > Assessable value + service tax & VAT for the sum of Assessable value + service tax.
    >
    > Kindly give us the pricing procedure for the above requirement.
    >
    > Regards
    >
    > Mahalingam sarathi
    Let me try to fit in this requirement for you (with a small demonstration, you will also have to use the appropriate accounting keys)
    400           assessable value  350 390 
    410 JSRT  Service tax            400
    420 JEC3  ECEss on Srv tax   410
    430 JSE3  Secess on SrvTax 410
    440           ***. val + Srv Tax 400  430
    450 JIVP   VAT                        440

  • HT1349 My Macbook Pro was stolen and I need the serial number. How would I find this? I need it for the police report so if I could get answers soon that would be great, thanks :)

    How would I find this? I need it for the police report so if I could get answers soon that would be great, thanks

    Lanlani wrote:
    ... It there any other solution ?
    Consider using this site: http://www.stolenlostfound.org/
    This is Apple's official word on the subject:
    Reporting a lost or stolen Apple product
    If you have lost or found an Apple product, please contact your local law enforcement agency to report it. Although Apple does not have a process to track or flag lost or stolen product, you can use My Support Profile to find a list of serial numbers for items purchased or registered with your Apple ID.

  • I would like to upgrade my OS to the latest version.  I now have 10.6.8 and my machine has 1Gb of memory.  Need 2Gb for the new OS.  Is is possible (and practical) to add memory to a machine that's five years old?

    I would like to upgrade my OS to the latest version.  I now have 10.6.8 and my machine has 1Gb of memory.  Need 2Gb for the new OS.  Is is possible (and practical) to add memory to a machine that's five years old?

    You can put two 2gb RAM sticks in your model 2,1 but it can only use 3,3gb. This is a hardware limitation and cannot be changed.
    http://en.wikipedia.org/wiki/3_GB_barrier
    http://www.everymac.com/systems/apple/macbook_pro/faq/macbook-pro-core-2-duo-3-g b-memory-limitation-details.html
    OWC tests have found that there is a slight speed increase with having two 2gb sticks in rather than one 1gb and one 2gb. Your model is in the gray lines at the bottom of the graph. http://eshop.macsales.com/shop/Memory_Benchmark/Apple_MacBook/
    You can buy Lion for $29 from the App Store witht a model 2,1 MacBook. Lion will require at least 2gb of RAM but really needs 4gb to run smoothly. As for programs see this list for compatibility with 10.7 http://roaringapps.com/apps:table
    Lion doesn't run any Power PC programs. To see if you have any Power PC programs go to the Apple in the upper left corner and select About This Mac, then click on More Info. When System Profiler comes up select Applications under Software. Then look under Kind to see if any of your applications are listed as Power PC. Universal and Intel will run under Lion.
    Before Mac switched to Intel processors they used Power PC processors from 1994 to 2005. Power PC 601 through 604, G3, G4 and G5. Applications written for the Power PC processors need the application called Rosetta to run on Intel processors. This was part of the Operating System in 10.4 and 10.5 but was an optional install in 10.6. With 10.7 Lion Apple dropped all support for Power PC applications.
    These are good online stores for Mac compatible RAM
    OWC http://eshop.macsales.com/shop/memory/MacBook/DDR2/ - They offer Mac tested RAM at very good prices.
    Crucial Memory http://www.crucial.com/ - good place to buy RAM from all over the world. They also have an excellent memory selector that allows you to choose memory based on your computer's model
    Data Memory Systems http://www.datamemorysystems.com/apple-memory.asp - another good, cheap place to buying RAM if you live in the U.S.
    Here are instructions on replacing RAM in a MacBook with a removable battery. http://homeoffice.consumerelectronicsnet.com/articles/viewarticle.jsp?id=44404
    If you don’t have the tools to open up the MacBook OWC has a set for $5
    http://eshop.macsales.com/item/OWC/TOOLKITMHD/

  • I have a macbook pro 1175 its a 2006 model which boot camp will work i tried 4.03 but it says this boot camp is not for this machine thats the oldest one i found here please help i have windows 7 32 bit installed but need drivers for the sound

    i have a 2006 mackbook pro running windows 7 32 bit i need drivers for the sound and the earliest bootcamp on here is 4.03 my machine says its not for this system please help which version of boot camp can i use

    Read this. You need to be running Snow Leopard or later.
    http://support.apple.com/kb/ht3986

  • Need solution for the following sync error: "iTunes could not sync calendars to the iPad "iPad name" because an error occurred while sending data from the iPad"

    Need solution for the following sync error: "iTunes could not sync calendars to the iPad "iPad name" because an error occurred while sending data from the iPad"

    I want to add that I deleted all the old back-ups and created a new back-up without any issues except sync problem.

  • Need help for the $200 promo rebate for trade-in of I Phone 4

    Need help for the $200 promo rebate for trade-in of I Phone 4.  Unable to preregister when I ordered the new 6  in September.  Now can not contact VZW recycle program regarding.

    When I ordered my phone on Sept. 13th in a Verizon store, I had to ask the salesman how I went about getting the $200 rebate. He said shipping materials would come with the new phones. When I received the confirmation e-mail of my order, it contained a link for the rebate. Fortunately I clicked on the link, filled out the form online, and received the packing materials to send my phone in shortly after. My phones came in on Oct. 14th and I sent 3 of them back. So far I have received a gift card for $200 for 2 of the phones; the other is showing not received. I don't know what your situation is, but I think the promotion ended Oct. 15th. If I had listened to the salesman I think I would be out of luck as well. I hope I am wrong for your sake.

  • I Need Help for the popup message every time I go to safari: "Warning! Old version of Adobe Flash Player detected. Please download new version."???

    I Need Help for the popup message every time I go to safari: "Warning! Old version of Adobe Flash Player detected. Please download new version."???

    If you are talking about Safari on the iPad, there is no version of Adobe Flash for iOS and there never has been. Clear Safari, close the app and reset the iPad.
    Go to Settings>Safari>Clear History and Website Data
    In order to close apps, you have to drag the app up from the multitasking display. Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
    If you are talking about Safari on your Mac, you are in the wrong forum. But I would still clear the cache, quit Safari and restart the Mac.

  • By asking for the function seek and replace [apple F] i get no display - so see nothing except the upper stroke. what is going on? and what can i do about it?

    by asking for the function seek and replace [apple F] i get no display - so see nothing except the upper grey line. what is going on? and what can i do about it?
    restarting doesn't work

    Does trashing the preferences help? See Replace Your Preferences

  • URGENT HELP ME OUT !!! NO FILED DEFINED FOR THE FUNCTION CODE

    hello friends,
                       I am working with module programming t-se80,
    i have made a simple screen with some filed on it.Along with this i have made gui staus with 2 icons create and display and i have assiged text to them also , also they appear in screen when i run the t-code.
    problem is that when i click on any of icon i am unable to debug my code and system prompts an information message
    "NO FILED DEFINED FOR THE FUNCTION CODE ".
    In the screen elements with elemnt ok if have assigned ok_code in the screen and also a data statement in the code.
    Still i m unable to monitor the debuger.
    when ever i run the t-code and on the debuger and when i click on the create icon nothing happens?/
    kindly help me urgently
    with thanks
    sam

    Hi,
    It seems you have not assigned Function codes to your buttons in GUI. Assign them d relevant fct codes in Screen Painter (if u've created 2 push buttons) or menu painter.
    Hope this wil soleve your problem.
    Reward points if helpful.
    Thnx
    Pradipta K Mishra

  • Approval procedure for the creation of a new item

    I would like to have an approval procedure for the creation of new items. In that when one gets added, it gets placed on hold immediately and an alert gets sent to a manager.
    thx, Richard

    The solution would be the combination of SBO_SP_TransactionNotification stored procedure allowing only for some authorized persons to add an item with not ‘On Hold’ status, and an alert to the authorized persons.

Maybe you are looking for

  • Doesn't Time Machine delete old backups when it needs more space?

    I've had time machine running for a long time now. It worked flawlessly for quite some time. Today it gave me the error that there was not enough free space on the disk to complete the backup (the error message says something like there is 360 GB of

  • I have an iphone 3gs that i loaded ia gift card, how do i shift the gift card to a new iphone 4?

    I loaded a gift card on an iphone 3gs and bought a new iphone 4, how do I move the gift card to the iphone 4?

  • Open another users exchange profile

    In exchange 2007 which we are migrating from, I could log into my workstation with my domain admin account, create a new outlook profile and open up any users mailbox because I have rights to them.  This is useful when troubleshooting outlook issues

  • How to delete emails

    Email: can't delete email or see 'trash' after upgrade to ios5.1  Any suggestions?

  • Call Divert on 3330

    Hi, I've got an old 3330 on Orange Pay as You Go.It has come up with the call divert icon on the main screen. I cannot recall setting this option. According to the manual I should go to menu 7 to turn it off. Unfortunately, my menus go from 6 to 8 wi