Help in solving this pl/sql block
Hi
Could some one help me in solving my problem
i want some data to be extracted by a sql its not fetching it so i prefered to write a pl/sql block for it ...
the block is as follows
begin
cursor opunit is
select code from fmg_operating_units;
cursor pak_code is --- those are the 3 codes which i require
select 'BNL' from dual
union select 'HNA' from dual
union select 'HNL' from dual;
cursor data1(opunit,pak_code) is
select mas.name ,
cl.id ,
opup.oun_code ,
fmg_phone_no(mas.id),
clpk.pak_code ,
clpk.id
from fmg_op_unit_positions opup,
fmg_clients cl,
fmg_client_paks clpk,
fmg_masters mas,
fmg_policies po,
fmg_policy_items pi
where mas.id=cl.mas_id
and cl.id=clpk.cli_id
and clpk.oup_id=opup.id
and opup.oun_code = opunit
and clpk.id=po.ctp_id
and po.id=pi.pol_id
and pi.current_status='AC'
and clpk.pak_code = pak_code;
loop opunits
loop pak_code
open data1
fetch data1(opunit,pak_code) ;
end loop;
end loop;
could some one help me in extracting the data and put it on the CSV file ...
i would be very thank full to you if some one take some time to full fill this task..
thanks in advance
Declare
cursor opunit is
select distinct code
from fmg_operating_units;
cursor pak_code is --- those are the 3 codes which i require
select 'BNL' codes from dual
union
select 'HNA' codes from dual
union
select 'HNL' codes from dual;
cursor data1(opunit,pak_code) is
select mas.name ,
cl.id ,
opup.oun_code ,
fmg_phone_no(mas.id),
clpk.pak_code ,
clpk.id
from fmg_op_unit_positions opup,
fmg_clients cl,
fmg_client_paks clpk,
fmg_masters mas,
fmg_policies po,
fmg_policy_items pi
where mas.id = cl.mas_id
and cl.id = clpk.cli_id
and clpk.oup_id = opup.id
and opup.oun_code = opunit
and clpk.id = po.ctp_id
and po.id = pi.pol_id
and pi.current_status= 'AC'
and clpk.pak_code = pak_code;
begin
FOR opunits IN opunit LOOP
FOR pak_codes IN pak_code LOOP
OPEN data1;
fetch data1(opunits.code,pak_codes.codes) ;
EXIT WHEN data1%NOTFOUND;
< Rest of your code here > -- You can insert processed data into a temp table &
-- extract data from that table afterwards via select statement
-- & saving the data in a .cvs file extension.
CLOSE data1;
END LOOP;
END LOOP;
<Some more code here if applicable>
EXCEPTION
<Exception handling code section here>
END;
Similar Messages
-
Question
I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
'''(in English)'''Hi Danny,
Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
but not 180, right?
I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
=COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
or
=SUM(IIF(Fields!TICKET_STATUS=4,1,0))
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
My icloud activation lock is on my iphone, which requires an activation login to access the homescreen, but when i log in with the apple ID on the phone, it says the apple ID is not meant to unclock this iphone 5 ios 8.0.2. please help me solve this.
Yes the phone belongs to me. It was purchased from United Kingdom Vodafone to West Africa, i had to factory unlock to use any sim in it. so it belongs to me. I did the activation myself, now after updating my iphone to the latest update, it required a user id and password to activate the phone, but anytime i enter the details, it tells me the user Id is not correct but the password is correct..
-
What is the wrong in this PL/SQL block
Hi a...
Can you please tell what is the wrong in this pl/sql block.
declare
TYPE TYP_NT_NUM IS TABLE OF NUMBER ;
v_tab TYP_NT_NUM := TYP_NT_NUM();
TYPE uname is VARRAY(30) of varchar2(100) ;
usr uname := uname ( 'u1','u2','u3','u4' );
TYPE pwd is VARRAY(30) of varchar2(100) ;
psw pwd := pwd('p1','p2','p3','p4');
x number(10):=0;
Cursor fcid IS Select distinct FC_ID From FCMASTER ;
Begin
Open fcid ;
--for ii in usr.first .. usr.last loop
Loop
Fetch fcid Into x ;
Exit When fcid%NOTFOUND ;
v_tab(fcid%ROWCOUNT) := x ;
End loop ;
For iii IN v_tab.FIRST .. v_tab.LAST Loop
dbms_output.put_line(v_tab(iii).FC_ID) ;
End loop ;
End loop; End of outer loop
End;
The error is
Error
[row:28,col:36] ORA-06550: line 28, column 36:
PLS-00487: Invalid reference to variable 'NUMBER'
ORA-06550: line 28, column 4:
PL/SQL: Statement ignored
Thanks in advance,
Palv_tab(iii).FC_ID
declare
type typ_nt_num is table of number;
v_tab typ_nt_num;
begin
select distinct object_id bulk collect into v_tab from all_objects where rownum <= 10;
for i in 1 .. v_tab.count loop
dbms_output.put_line(v_tab(i)) ;
end loop ;
end;
/ -
Calendar and Time showing in arabic but my phone's language is English. I bought my phone from DU in UAE , Dubai. Please help me solve this issue while keeping the Region to United Arab Emirates
Valentine350z wrote:
while keeping the Region to United Arab Emirates
Not possible, I think. Tell Apple how you feel about this at
http://www.apple.com/feedback/iphone.html -
I am trying to capture using firewire 800 to 400 adaptor through a Sony HDV VTR. The VTR is not recognizing can some body help me solve this problem.
I am using FCP7 and IMAC with 10.6.8 version os
I dont have a 6 pin or 400 firewire port in the systemLet's start with basics.
Does your computer recognize that there is a VTR attached?
• Open up system profiler>Hardware>FireWire. Does your machine show up?
If no, you need to figure out if the problem lies with the VTR, the cable, the adapter or your computer.
My guess is with the adapter. A number of people have expressed frustration getting fw400 device to work through fw800 ports.
If that's your problem, see if you can find an older Mac w/ fw400 ports or a dedicated fw800 to 400 cable.
good luck,
x
ps - In "locking the barn after the paddle has been lost upstream" mode, this is why non-expandable computers like the iMac are so problematic. A MacBookPro with the expresscard 34 slot or a MacPro with 3 slots can work around these kind of issues. A closed box like the iMac is a dead end. Sorry. -
I updated my Iphone 4s to IOS 7, now it reboots after every 2 minutes, I tried to restore, but the reboot gets it disconnected from PC, help me solve this reboot issue..
See Here > http://support.apple.com/kb/HT1808
You may need to try this More than Once...
Be sure to Follow ALL the Steps...
But... if the Device has been Modified... this will Not necessarily work. -
my Numbers file sent to somebody. He is not able to open in Excel can anybody help to solve this problem?
Numbers files are not compatible with MS Excel. To share a Numbers file with Excel you need to export you Numbers file in MS Excel format. To do this:
1) Open you Numbers document
2) select the menu item "File > Export..."
3) select "Excel" for the target output
4) click next and select where to save the file.
5) email the file you saved -
i found an old gift card that i got with my ipod from spain
i have a canadian account. when i tried using the gift card it said i couldn't use the spanish gift card with my canadian account. can someone help me solve this problem
the gift card is 15 eurosSorry, but you cannot use that card with a Canadian iTunes Store account. A gift card is valid only in the country of purchase. You'll need to give or sell that card to someone in Spain.
Regards. -
Used Migration Assistant to successfully transfer PC files to Mini. However file creation or modified date does not transfer. Date of creation is listed as day of transfer. I would gratefully appreciate any help in solving this?
I have the same problem; used Migration Assistant to transfer all my pix from PC to MacbookPro, however dates of pix were not transferred. Date created as the date of transfer. Cannot sort my pix according to date.
Anybody has an answer? -
The nice man Joseph Shen helped me with my google problem on my iPhone and worked for 2 days and now not working again please help me solve this problem were I can retrieve my messages on the I phone when I am not at home on my wi Fi is the only time it works correct. Bill. [email protected] 708 752 3667
http://lifehacker.com/5852948/what-to-do-if-youve-forgotten-your-iphones-passcod e
-
I am unable to sync my Ipod Nano (4th generation I believe) because my computer does not recognize my device. Can anyone help me solve this problem?
Reset the AMDS > How to restart the Apple Mobile Device Service (AMDS) on Windows
-
Some of the pdf files I work with (receive) come up with a comment: “Cannot find or create the font ‘WP-MathA’. Some characters may not display or print correctly.” Who can help me solve this problem?
Thank you in advance for your time.
MarlenHello Anubha,
I am having a similar problem on my machine. I was using Word 2008 and I created a PDF inside Word.
I am opening the file on the system itself and I am running Windows 8.1. I am using Version 11 of Reader.
When the PDF I created (my resume) attempts to open, it says: cannot find or create the file Times, Bold. Some characters may not display or print correctly.
However, the entire Reader keeps freezing and will not allow me to open or test print the document. Also, it is not displaying any of the Bold Times New Roman Print. Can you please help? Thanks. -
Captivate 4 crashes while working with Power Builder projects..Can anyone help to solve this issue??
Yes but there's no point doing it here. As the Terms of Use make quite clear this is a User to User forum. It's Users like you talking to other Users. It's not a channel to communicate with Apple.
Regards
TD -
i have iphone 3gs and it keeps shut dowm by itself every two minutes idunno if this problem related to the battery life or what? please help me solve this problem
See Here for Device continually restarts...
http://support.apple.com/kb/HT1808
Maybe you are looking for
-
Report problem directly in iTunes has been disabled?
I had understood that it was possible to report a problem on a purchase directly from within iTunes, by going to my account, history then selcting the ourchase that had the problem. However the "Report a Problem"link now just boots me off to the Appl
-
Where should I keep my music?
I have an external drive with most of all of my music on it and some of that music is actually on the hard drive. I just ripped a bunch of cd's to my external drive and put them in my library and numerous songs have the ! so I locate them, when I sea
-
Hi All Could you please tell at what level ( level 5 or level 9 ) are the profit centers maintained in SAP. For example how to find the level of FRBs in the table BSIS. Also if anybody can explain me the concept of cost centers, profit centers and co
-
How many computers can I put CS5 Production Premium on?
How many computer can I put CS5 Production Premium on if I were to buy it for my company?
-
Hi I have elements 8 installed on my old PC can I buy elements 12 upgrade and load it onto my new PC or do I have to buy the full version of elements 12