Hey Guys, I need some help here

Im doing some create view and create procedures for my work.
In creating view, its just done perfectly.
However with create procedures work, I got some problem with the result.
So here is the coding:
create or replace
PROCEDURE "USP_EDW_CASH_MARGIN"
result_cursor          OUT     TYPES.cursor_type
AS
CURSOR v_cursor IS
SELECT
to_char (CM100,'99999999999999.99'),
to_char (CM101,'99999999999999.99'),
to_char (CM200,'99999999999999.99'),
to_char (CM300,'99999999999999.99'),
to_char (CM301,'99999999999999.99'),
to_char (CM310,'99999999999999.99'),
to_char (CM320,'99999999999999.99'),
to_char (CM400,'99999999999999.99'),
to_char (CM401,'99999999999999.99'),
to_char (CM402,'99999999999999.99'),
to_char (CM500,'99999999999999.99'),
to_char (CM720,'99999999999999.99'),
to_char (CM730,'99999999999999.99'),
to_char (CM740,'99999999999999.99'),
to_char (CM999,'99999999999999.99')
FROM VW_CASH_MARGIN a;
v_id varchar2(100);
v_row varchar2(4000);
v_clob CLOB;
v_buffer varchar2(10000);
BEGIN
v_id := 'EDW_CASH_MARGIN';
DELETE FROM TBL_INTERFACE_DATA WHERE cd = v_id;
INSERT INTO TBL_INTERFACE_DATA (CD,INT_DATA,DT_CREATED)
VALUES (v_id,EMPTY_CLOB(),(SELECT CURR_PROC_DATE FROM TBL_PROC_DATE));
SELECT INT_DATA INTO v_clob
FROM TBL_INTERFACE_DATA
WHERE CD = v_id
FOR UPDATE;
OPEN v_cursor;
v_buffer := '';
dbms_output.put_line(LENGTH(v_buffer));
LOOP
FETCH v_cursor INTO v_row;
EXIT WHEN v_cursor%NOTFOUND;
if (length(v_buffer) + length(v_row)) < 10000 or v_buffer is null then
v_buffer := v_buffer || v_row;
else
DBMS_LOB.WRITEAPPEND(v_clob, LENGTH(v_buffer), v_buffer);
v_buffer := v_row;
end if;
END LOOP;
if LENGTH(v_buffer) > 0 then
DBMS_LOB.WRITEAPPEND(v_clob, LENGTH(v_buffer)-1, v_buffer);
end if;
CLOSE v_cursor;
OPEN result_cursor FOR
SELECT 'success' AS status FROM dual;
END;
After i run this coding.
I got these errors :
1)Error(46,5): PL/SQL: SQL Statement ignored.
2)Error(46,5): PLS-00394: wrong number of values in the INTO list of a FETCH statement
It says that the error is with this code "FETCH v_cursor INTO v_row;"
Can someone please help me.

ok let me explain with emp table.
DECLARE
CURSOR c IS SELECT ename,sal FROM emp;
v_ename VARCHAR2(2000);
BEGIN
OPEN c;
LOOP
FETCH c INTO v_ename;
EXIT WHEN c%NOTFOUND;
Dbms_Output.put_line(v_name);
END LOOP;
CLOSE c;
END;Here i'm selecting 2 columns in the cursor and getting into one variable.
So i'm getting error like this
ORA-06550: line 7, column 1:
PLS-00394: wrong number of values in the INTO list of a FETCH statement
ORA-06550: line 7, column 1:
PL/SQL: SQL Statement ignored
DECLARE
CURSOR c IS SELECT ename,sal FROM emp;
v_ename VARCHAR2(2000);
v_sal NUMBER(10);
BEGIN
OPEN c;
LOOP
FETCH c INTO v_ename,v_sal;
EXIT WHEN c%NOTFOUND;
Dbms_Output.put_line(v_ename||v_sal);
END LOOP;
CLOSE c;
END;Here i'm selecting 2 columns in the cursor and getting into two different variables.so no error.
DECLARE
CURSOR c IS SELECT ename,sal FROM emp;
v_row c%rowtype; -->record type declaration
BEGIN
OPEN c;
LOOP
FETCH c INTO v_row;
EXIT WHEN c%NOTFOUND;
Dbms_Output.put_line(v_row.ename||v_row.sal);---> Here i'm mentioning which column to be printed
END LOOP;
CLOSE c;
END;Same thing i'm getting all columns variable into the records so no error.
and also pls read this
How to ask question
SQL and PL/SQL FAQ

Similar Messages

  • Alright guys I need some help here with itunes and my music files

         Basically, I've had two apple accounts in the past like 4 years.  One day I connect my Ipod touch to my computer and downloaded an update from Itunes, not knowing that it erases all your content.  I didnt have my music files backed up either, so I ended up losing over $300 worth of music and apps.  Ever since then I never updated my touch, from the fear of losing my music.  Now that I have my own apple account, I have music files from the first account and my account.  My question is how can I back both of these groups of files up and update my ipod without losing any of this content!?  I would really appreciate a step by step process etc.  Thanks guys for helping me out!
    -Colin Wagner

    You can always redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    You can transfer iTunes purchases to your computer by:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer

  • Hey guys i need some help!!!

    I have a slow iMovie4 but only when I am in timeline view.

    sometimes, when a project gets a degree of 'complexity' it could start to behave odd...
    how long is your project?
    have you done 'zillions of trial & error edits'?
    is it possible for your workflow, to export the whole project to tape, and re-import into a new iM project (=no quality loss...)? that 'consolidates' the internal files of a iM project and it is a 'fresh' start...
    and set iM's prefs for Playback to 'Standard' ....

  • Hi, Someone Know why my charger is not working properly but always it was been working good but now when conect my iphone (3gs) shows a yellow triangle saying : Charging is not supported with this accessory. Please I need some help here. Thanks =D

    Hi Someone Know why my charger is not working properly but always it was been working good but now when conect my iphone (3gs) appears a golden triangle saying :Charging is not Supported with this accessory. Please I Need Some Help Here. Thanks =D

    sounds like the cable or the iphone connector are somehow damaged

  • Need some help here on the proper settings for quicktime exporting from imovie that won't degredate the footage from my handycam

    need some help here on the proper setting for quicktime exporting that won't denegrate my footage from handycam canon fs200

    What are the existing settings iMovie?
    Al

  • Cannot get slide show in full screen mode to come up on secondary monitor regardless of how I set up show it always opens on primary screen.  Need some help here.

    Slide show in PowerPosint for mac 2011 on iMac will not open full screen mode on secondary monitor.  Regardless of how I set the slide show preferences it always opens on primary monior with secondardy monitor having totally balck screen.  Need some help if anyone else has run into this problem.

    You should contact Microsoft for Mac Support  and/or post in their forums.

  • Need Some Help Here From The Pros....

    Hi all...Im new here you see. I have some questions here..
    1) May I ask if anyone could just tell me how to actually create a partition like Windows do in Mac OS? I need the partition to do my backups and save some of my important documents.
    2) Can we actually create a password to secure certain of my files so that anyone wants to browse it will have to enter the password? Is it possible to do that?
    3) Im also trying to use Visor(i cant remember the name, it's a software to enable Mac to run windows without the boot camp) but i tried on my friend's Macbook, I cant use the MSN camera function... Anybody have any idea??? Or it's not compatible with the camera built-in.
    4) I want to use "3D Studio Max", its it compatible with Mac OS??? and will it be laggish if i uses macbook 13" white?
    Please help....

    Hi!
    1) May I ask if anyone could just tell me how to actually create a partition like Windows do in Mac OS? I need the partition to do my backups and save some of my important documents.
    With your external drive attached, open Disk Utility, found in Applications/Utilities. Choose your drive on the left, and use the Partition tab to set up the number and type of partitions. Partitioning will delete all data on the drive.
    2) Can we actually create a password to secure certain of my files so that anyone wants to browse it will have to enter the password? Is it possible to do that?
    Don't forget that the Mac, just like Windows, is multi-user. You can set up a user for yourself and one for guests or specific people. Nobody can see anybody else's files. You can lock your computer when you go away from the desk if you want absolute privacy.
    Or, you can create an encrypted disk image (also using Disk Utility) to store private files if you really want to stick with one user account.
    3) Im also trying to use Visor(i cant remember the name, it's a software to enable Mac to run windows without the boot camp) but i tried on my friend's Macbook, I cant use the MSN camera function... Anybody have any idea??? Or it's not compatible with the camera built-in.
    Do you mean VMWare Fusion? I believe iSight support is included in the VMWare Tools - when you're running Fusion, there's a menu option to install/update those tools.
    4) I want to use "3D Studio Max", its it compatible with Mac OS??? and will it be laggish if i uses macbook 13" white?
    I believe it's Mac only, so you should check the Windows specs (RAM requirements, graphic card VRAM, etc) to see if you can run it within a virtual Windows on your Macbook.
    Matt

  • I really need some help here....Please?

    Hey guys i have posted numerous threads regarding this issue but to no avail so im going to try one last time.
    Basically, Itunes works fine UNTIL i start to sync, Then it freezes up for a while then starts to sync a little bit...Then freezes and syncs a little bit..And so on..
    It took me 2 WHOLE days to sync 15 episodes of southpark.
    I transfered some movies and songs to my wifes laptop and it sync'd everything in around 50 seconds flat, So its now obvious that it must be my PC.
    I have USB 2 and i have 6 slots, I have tried ALL the different USB slots and it stays the same.
    Does anyone have ANY idea what this could be?
    I spoke to the guy who built my PC and he is changing the USB ports, He also said if that doesn't work he will change my motherboard..
    Is there a simple solution to this? Am i going to have to change Motherboard? ANY help would really be greatful.

    Hold your horses....
    Have you done some "rule out" testing? How do you know that the USBs are bad? How do you know that the MB is bad?
    1/ do all ports work when you plug a mouse in them?
    2/ what is a throughput when you plug a flash drive into these USBs (try 1 at a time) and copy a large file onto it? Test all the ports and compare speeds - are they at least 5-10 MB per sec? If yeah, then they are OK - system wise.
    If the USBs don't work and it's a PCI card, look for drivers and if no luck, buy a new card.
    If the USBs are built into the MB, then you have no other choice but to replace it, but only as the very last resort. Seems to me that he's trying ot hose you, my friend.....
    IN any case, it could be the drivers! Or..iTunes. Did you try to remove & reinstall?

  • My new K7N2-Delta need some help here!

    Recently i bought a brand new k7n2 delta L and i need some advice on how to overclock with this new mobo, with the km2m it was piece of cake but this is a little bit more complete. I will appreciate the help and tips in this matter more over because my first attempt resulted on a non responsive system :P no post to be more clear.
    Thanks in advance.
    By the way my cpu is an athlon xp 2000+ tbred (i don't know if it is unlocked)

    read all this first
    https://forum-en.msi.com/index.php?threadid=40413&sid=
    https://forum-en.msi.com/index.php?threadid=32088&sid=
    https://forum-en.msi.com/index.php?threadid=38822&sid=

  • Songs aren't playing through...need some help here

    Hey guys,
    All of sudden, my songs won't play through like a playlist anymore. Like, once the song finishes, Itunes just doesn't go to the next one. It stops. Now I have to manually click the new song on the list every time I want to hear something. It's getting very frustrating and I was wondering if anyone new how to fix this.

    Regarding the songs not playing through, I noticed none of the songs in my library had the little tick mark beside them. I ticked a few of them and they played from one to another. I went through my whole library, ticking everysong and no the problem is fixed. I only have 733 songs so it didn't take me too long. I don't know of a short way of doing it.

  • Hey I need a code for an Itunes 25$ gift card because when I scratched with a coin like it says it scratched the code right of and its unreadable. I need some help here.

    What I want is a code so I can buy my Lord of the Rings Extended Edition Videos because its upseting to see how easy it is to ruin these codes. The code was for 25$ for Itunes and now its ruined please help me its Christmas and I just got my Ipod Touch.

    iTunes Store: Invalid, inactive, or illegible codes
    http://support.apple.com/kb/TS1292

  • Hey fellows...need some help here....please..!!!

    OK, this is what I have....;javax.swing.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Interface extends JFrame implements ActionListener{
    Queue queue;
    JButton QButton;
    JLable QLabel;
    public Interface(){
    window = new JFrame("practice");
    window.setBounds(0,0,250,200);
    window.getContentPane().setLayout(null);
    queue = new Queue(); The error I get is:
    java.awt.Queue is not public in java.awt; cannot be accessed from outside package
    Any ideas!!!

    Okay, first point I notice is that the first line should be "import javax.swing.*" not "javax.swing.*"
    The reason for the error is that you are using your own 'Queue' class (I presume), and yet there is a Queue class also in the awt package (which is not intended for developer use). This means the compiler does not know which Queue class to pick. Removing the 'import java.awt.*' should get rid of this error. However, if you are using any of the classes in the awt package (such as Button, BorderLayout, etc), you will need to import them individually (e.g. import java.awt.Button;).

  • GS60 2PE Hopeless really need some help here!!!

    Hey MSIer, I just did a complete wipe on my hard drive and  now there's totally nothing left on the drive like really nothing so what I wanna ask is that how do I get back all the pre installed software including windows 8.1 itself, how?
    Does anyone out there don't mind taking some time to help list down a guide on how to get back to how the laptop originally was(all the pre installed software including windows 8.1 iitself)? Your help is really much much much muchhhh appreciated!!! T_T

    Quote from: Syrellaris;112053
    You should be able to restore using the Recovery Discs you made(if you made them..) or by pressing the F3 key during bootup.
    Though, if you wiped all partitions on the hard drive, including the normally hidden recovery partition you are kind of screwed.. in that case you need to send it in for repair, but it will not be fixed under warranty.(if you dont have Recovery disc's)
    Quote from: JakeSully;112055
    Yeah best option when getting a new laptop it is to create a recovery dic or USB recovery and atleast .iso recovery to that way incase you wipe everything on hard disk you can restore every partitions that was wiped including recovery partition that has copy of windows 8.1 64 bit that comes pre-installed.
    I didn't do any recovery disc and have yet to try the F3 button that you mention. So let say even if the F3 is not working I'm totally screwed right?

  • I need some help here please!

    i am working on a website thats going to be a friend loop
    such as facebook myspace classmate etc. im in the proccess of
    making the site now and i was wondering what i need to to to enable
    useres to be able to login and create a profile page on my site?
    how can i do this using DW2004 what am i looking at here? also
    anyone who would be interested in helping e-mail
    [email protected] we have the site up on a server but we are
    far from done

    > such as facebook
    > myspace classmate etc. im in the proccess of making the
    site now and i was
    > wondering what i need to to to enable useres to be able
    to login and create a
    > profile page on my site?
    hire a team of skilled programmers, put them in a cage and
    toss money at
    them.
    or spend a lot of time learning how to do it yourself.
    or try a free or commercial pre-written application
    http://www.hotscripts.com/search/?q=myspace&cat=All&page=1&sort=&license_typ
    e=free
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Really need some help here to try and get Fios services in my building

    I have been trying to convince my landlord for months to get Fios in the building.  Here is a recent email exchange with him.  Does anyone know if any of this is true, about the install damages?  If it is true, then Verizon needs to get their act together! 
    Here is the email exchange. 
    D-
    I am sorry but we have no plans to let Verizon in to this building. They do
    a lot of damage to the building and do not make the repairs after or pay for
    any damages they do.
    Thanks,
    Steven
    -----Original Message-----
    From: D
    Sent: Tuesday, April 24, 2012 12:19 PM
    To: {edited for privacy}
    Subject: Question
    Hey Steve,
    Could you please do me a favor and speak with the building owner once again
    about Fios?  I know you mentioned he wasn't to keen on the idea of them
    doing the install but it would really make a big difference.  As of right
    now my iPad's cellular connected internet is faster for $30/mo than the
    $120/mo I'm paying Time Warner.  On top of that, I can't even watch HD
    movies on demand.  I've had TWC out here twice in the last four months and
    every time they claim nothing is wrong.  Its very frustrating.  I'll do
    almost anything I can to assist in this.  Please let me know if you can do
    anything.
    Thank you as always!

    james211 wrote:
    I have been trying to convince my landlord for months to get Fios in the building.   
    If your landlord doesn't want FIOS in the building, then it's not going to happen.
    Vote with your wallet and move.

Maybe you are looking for

  • IPod has more than just music on it !

    Ok, this is gonna sound weird, but my brother just bought a video iPod and he downloaded his music onto it from iTunes. Now when he plays it, between EVERY song there are people's voices talking. All of them are in a foreign language also. Does anyon

  • Image Preview Export automatically creates new "images" folder?

    Whenever I create an image within Fireworks CS4, I do so by following this procedure: Image Preview > Export (and then select either .jpg or .gif). If I want to place the image (to be named filename.jpg) within the following local directory: My Docum

  • I tried to back up my music and pictures using cloud and received an error code 4001

    I tried to back up my LG G2 pictures and music using Cloud.  It promoted an error message: Verizon cloud operation failed error code 4001. Please help!

  • RDLC - Group Header Continued on next page...

    Hi All, I have a requirment in RDLC, if the group rows exceeds more than one page, I need to add a content at the bottom of page and next page first row, like below Group              ------Recrods-----------              ------Recrods----------- Gro

  • Money overflow error

    Hi, When updating  a Purchase order we are getting Money overflow error but we are not changing any figures we are trying to add only remark so why are we getting this error please help regards