Help in finding the error

Hi All,
I have executed the folloowing scripts
create or replace function aj_dump_csv( p_query in varchar2,
p_separator in varchar2
default ',',
p_dir in varchar2 ,
p_filename in varchar2 )
return number
AUTHID CURRENT_USER
is
l_output utl_file.file_type;
l_theCursor integer default dbms_sql.open_cursor;
l_columnValue varchar2(2000);
l_status integer;
l_colCnt number default 0;
l_separator varchar2(10) default '';
l_cnt number default 0;
begin
l_output := utl_file.fopen( p_dir, p_filename, 'w' );
dbms_sql.parse( l_theCursor, p_query, dbms_sql.native );
for i in 1 .. 255 loop
begin
dbms_sql.define_column( l_theCursor, i,
l_columnValue, 2000 );
l_colCnt := i;
exception
when others then
if ( sqlcode = -1007 ) then exit;
else
raise;
end if;
end;
end loop;
dbms_sql.define_column( l_theCursor, 1, l_columnValue,
2000 );
l_status := dbms_sql.execute(l_theCursor);
loop
exit when ( dbms_sql.fetch_rows(l_theCursor) <= 0 );
l_separator := '';
for i in 1 .. l_colCnt loop
dbms_sql.column_value( l_theCursor, i,
l_columnValue );
utl_file.put( l_output, l_separator ||
l_columnValue );
l_separator := p_separator;
end loop;
utl_file.new_line( l_output );
l_cnt := l_cnt+1;
end loop;
dbms_sql.close_cursor(l_theCursor);
utl_file.fclose( l_output );
return l_cnt;
end dump_csv;
The above script runs successfully
then I run the following script
create or replace procedure aj_test_dump_csv
as
l_rows number;
begin
l_rows := dump_csv( 'select *
from all_users
where rownum < 25',
',', 'C:\Documents and Settings\amit_jaiswal01\My Documents\amit\Stuff\Pl-SQL', 'aj_from_rec.csv' );
end;
I get the error script executed with compile errors
Can anyone help?
Regards.

Run the two scripts seperately.
SQL> create or replace procedure aj_test_dump_csv
as
l_rows number;
begin
l_rows := aj_dump_csv( 'select *
from all_users
where rownum < 25',
',', 'C:\Documents and Settings\amit_jaiswal01\My Documents\amit\Stuff\Pl-SQL', 'aj_from_rec.csv' );
end;
If this gives you any error, then run the below statement to view the error,
SQL>SHOW ERROR
Copy the error message which you get and update us.

Similar Messages

  • Please help me find the error in the annex VI,access

    Hello, everyone, this is a program about ACCESS, please help me find the error in the annex VI, why do I always run time error. Thank you very much.
    Attachments:
    write access test.vi ‏22 KB

    Thank you for your reply, I have an attachment process map, could you help me change it, I just want to put my number in the array can continue to update the database. And I want to create a table.
    this is my msn :[email protected]
    Waiting for your reply on line
    谢谢你的回复,我的附件中有程序图,能不能帮我改一下,我只是希望,把我的数组中的数能够持续的更新在数据库中。并且创建一个我想要的表。

  • Please help in finding the error in this code

    Dear Friends,
    I am trying to make the value of 'Shift' on the basis of  BLDAT CPUDT & CPUTM of MKPF but I am doing something wrong. Kindly have a look at the following code, especially the IF..ELSEIF section and help me in finding the error.
    Regards,
    Alok.
    SELECT MBLNR MJAHR BKTXT BUDAT BLDAT CPUDT CPUTM USNAM
    INTO CORRESPONDING FIELDS OF TABLE I_MKPF1
    FROM MKPF
    WHERE
    BUDAT EQ S_BUDAT AND
    TCODE2 EQ 'MFBF'.
    ********************************************************ALOK 01.02.07
    LOOP AT I_MKPF1.
           I_MKPF-MBLNR = I_MKPF1-MBLNR.
           I_MKPF-MJAHR = I_MKPF1-MJAHR.
           I_MKPF-BKTXT = I_MKPF1-BKTXT.
           I_MKPF-BUDAT = I_MKPF1-BUDAT.
           I_MKPF-BLDAT = I_MKPF1-BLDAT.
           I_MKPF-CPUDT = I_MKPF1-CPUDT.
           I_MKPF-CPUTM = I_MKPF1-CPUTM.
           I_MKPF-USNAM = I_MKPF1-USNAM.
    IF   ( ( I_MKPF1-CPUTM >= '090000' AND I_MKPF1-CPUTM < '160000' )
    AND   ( I_MKPF1-BLDAT = I_MKPF1-CPUDT ) ).
    I_MKPF-SHIFT = 'A'.
    ELSEIF ( ( I_MKPF1-CPUTM >= '090000' AND I_MKPF1-CPUTM <= '110000' )
       AND  ( I_MKPF1-BLDAT <>  I_MKPF1-CPUDT ) ).
    I_MKPF-SHIFT = 'C'.
    ELSEIF ( ( I_MKPF1-CPUTM >= '160000' AND I_MKPF1-CPUTM < '000000' )
      AND  ( I_MKPF1-BLDAT = I_MKPF1-CPUDT ) ).
    I_MKPF-SHIFT = 'B'.
    ENDIF.
    APPEND I_MKPF.
    CLEAR I_MKPF.
    ENDLOOP.

    Hi.
    IF (  I_MKPF1-CPUTM >= '090000' AND I_MKPF1-CPUTM < '160000' )
           AND ( I_MKPF1-BLDAT = I_MKPF1-CPUDT ) .
    I_MKPF-SHIFT = 'A'.
    ELSEIF  ( I_MKPF1-CPUTM >= '090000' AND I_MKPF1-CPUTM <= '110000' )
    AND ( I_MKPF1-BLDAT <> I_MKPF1-CPUDT ) .
    I_MKPF-SHIFT = 'C'.
    ELSEIF ( I_MKPF1-CPUTM >= '160000' AND I_MKPF1-CPUTM < '000000' )
    AND ( I_MKPF1-BLDAT = I_MKPF1-CPUDT ) .
    I_MKPF-SHIFT = 'B'.
    ENDIF.
    Try the above code ..
    Regards
    Sudheer

  • Bad game performance: "Tibia" - need help to find the error

    hi
    im playing a game called tibia (www.tibia.com) for a long time, back on windows i had no problems with the programm(except that windows itself crashed sometimes while playing ;P).
    since some time they made an linux client again and i tryed it on my pc, running arch with all updates.
    my problem is that sometimes when (probably to much) pictures like garbage and player are shown on the screen(its an 2d mud inspired by ultima) i get performence issues, the program is freezing 2 seconds before i can view another level, just to say an example.
    via "top" i watched what kicks in that uses my cpu so much and it is X.
    ok, now i dont realy know where this post belongs, more here or into newbie's corner, but:
    as i said before i have every possible update for arch and the installed programms.
    i got an geforce fx 5200 with the newest driver(manualy installed because the installer via pacman whont have the new driver because of an outdatet kernel, atleast that was what i remember).
    my problem now is that i just dont know where the error is.
    i know of people, using the same client as i that dont have that issues.
    i already bugged the support forums but as far as i saw they dont realy like arch user, atleast they dont answer to their questions. ;P
    i whant to know if MAYBE someone is here who plays tibia and can tell me that he got the same problems like i do or not.
    or you could give me hints what i could try to solve this problem.
    to write it in one short line:
    the problem is that the process "X" sometimes kicks in, using 100% of the cpu, this happens only while playing "tibia"
    thank you

    Look at Steps #4, #6, #9 and #12.
    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html
    Nancy O.

  • Please help to find the error  in the following code

    REPORT ZTESTSAMPLE.
    CLASS C1 DEFINITION.
    PUBLIC SECTION.
    METHODS M1.
    ENDCLASS.
    CLASS C1 IMPLEMENTATION.
    METHOD M1.
    WRITE: /'HELLO'.
    endmethod.
    endclass.
    DATA OREF TYPE REF TO C1.
    *CREATE OBJECT OREF.
    OREF->M1().

    Hi,
    here is the solution
    CLASS C1 DEFINITION
    CLASS c1 DEFINITION.
    PUBLIC SECTION.
    METHODS m1.
    ENDCLASS. "C1 DEFINITION
    CLASS C1 IMPLEMENTATION
    CLASS c1 IMPLEMENTATION.
    METHOD m1.
    WRITE: /'HELLO'.
    ENDMETHOD. "M1
    ENDCLASS. "C1 IMPLEMENTATION
    DATA : oref TYPE REF TO c1.
    START-OF-SELECTION.
    CREATE OBJECT : oref.
    CALL METHOD oref->m1.
    reward if helpful

  • Not able to find the Error in code !

    please help me to find the error in my code. When I Added x1~kondm its not giving anything i.e
    *join t178t as x1
    *on   p1kondm = x1kondm
    in the SQL part !
    REPORT YINTERACTIVEPROGRAM01.
    TABLES:VBAP,
           VBPA,
           VBRP,
           VBRK,
           KNA1,
           ADRC,
           TPAR,
           TVKGG,
           TVM1T,
           TVM2T,
           TVM3T,
           TVM4T,
           VBKD,
           SZA1_D0100,
           T178T.
    TYPES:BEGIN OF TY_TAB,
             VBELN LIKE VBAK-VBELN,
             VKORG LIKE VBAK-VKORG,
             ERDAT LIKE VBAK-ERDAT,
             AUGRU LIKE VBAK-AUGRU,
             BSTDK LIKE VBKD-BSTDK,
             BSTDK_E LIKE VBKD-BSTDK_E,
             spart like vbap-spart,
             kondm like vbap-kondm,
             waerk like vbap-waerk,
             netwr like vbap-netwr,
             kwmeng like vbap-kwmeng,
             vkaus like vbap-vkaus,
             land1 like vbpa-land1,
             nrart like tpar-nrart,
           vtext like tpar-vtext,
             parvw like tpar-parvw,
             name1 like adrc-name1,
             name2 like adrc-name2,
             name3 like adrc-name3,
             name4 like adrc-name4,
             ort01 like kna1-ort01,
             pstlz like kna1-pstlz,
             vtext like t178t-vtext,
          END  OF TY_TAB.
    DATA: ITAB TYPE STANDARD TABLE OF TY_TAB WITH HEADER LINE.
    parameters:salesno like itab-vbeln.
    select s1~vbeln
           s1~vkorg
           s1~erdat
           s1~augru
           k1~BSTDK
           k1~BSTDK_E
           p1~spart
           p1~kondm
           p1~waerk
           p1~netwr
           p1~kwmeng
           p1~vkaus
           r1~land1
           t1~nrart
          t1~vtext
           t1~parvw
           n1~name1
           n1~name2
           n1~name3
           n1~name4
           c1~ort01
           c1~pstlz
           x1~vtext
    into corresponding fields of table itab
    from  vbak as s1
    join  VBKD as k1
    on   s1vbeln = k1VBELN
    join vbap as p1
    on   k1vbeln = p1vbeln
    *join t178t as x1
    *on   p1kondm = x1kondm
    join vbpa as r1
    on   p1vbeln = r1vbeln
    join tpar as t1
    on   r1parvw = t1parvw
    join ADRC as n1
    on   r1adrnr = n1addrnumber
    join kna1 as c1
    on   r1land1 = c1land1
    where k1vbeln = salesno and  s1vbeln = salesno and p1~vbeln = salesno
    and  r1~vbeln = salesno.
    loop AT ITAB.
      WRITE : /(30)'VBELN: ',  ITAB-VBELN,
              /(30)'VKORG: ',  ITAB-VKORG,
              /(30)'ERDAT: ',  ITAB-ERDAT,
              /(30)'AUGRU: ',  ITAB-AUGRU,
              /(30)'BSTDK: ',  ITAB-BSTDK,
              /(30)'BSTDK_E:', ITAB-BSTDK_E,
              /(30)'SPART: ',  itab-spart,
              /(30)'KONDM: ',  itab-kondm,
              /(30)'WAERK: ',  itab-waerk,
              /(18)'NETWR: ' , itab-netwr,
              /(18)'KWMENG: ', itab-kwmeng,
              /(10)'VKAUS:',   itab-vkaus,
              /(30)'LAND1:',   itab-land1,
              /(30)'NRART:',   itab-nrart,
              /(30)'PARVW:',   itab-parvw,
              /(30)'ADDR1:',   itab-name1,
              /(30)'ADDR2:',   itab-name2,
              /(30)'ADDR3:',   itab-name3,
              /(30)'ADDR4:',   itab-name4,
              /(30)'PSTLZ:',   itab-pstlz,
              /(30)'ORT01:',   itab-ort01,
              /(30)'Compiler desc:',   itab-vtext.
               uline.
    ENDLOOP.
                if sy-subrc <> 0.
                write : / 'No data found'.
                endif.

    hi,
      u failed to check relationship between tables and as well as mandatory fields need to be checked, i noticed following
    from vbak as s1
    join VBKD as k1
    on s1vbeln = k1VBELN
    join vbap as p1
    on k1vbeln = p1vbeln and k1posnr = p1posnr
    *join t178t as x1
    *on p1kondm = x1kondm
    join vbpa as r1
    on p1vbeln = r1vbeln   <b>and p1posnt = r1posnr </b> join tpar as t1
    on r1parvw = t1parvw
    join ADRC as n1
    on r1adrnr = n1addrnumber     <b> * No relation between these two tables/b]     
    join kna1 as c1
    on r1land1 = c1land1 <b>and r1kunnr = c1kunnr</b> <i>'here u need to check mandatory fields also</i>
    where k1vbeln = salesno and s1vbeln = salesno and p1~vbeln = salesno
    and r1~vbeln = salesno.
    anyway, in performance point of view, writeing code with this much joins is not acceptable.
    comeback if you need any further help
    regards,
    pavan
    Message was edited by:
            pavan kumar pisipati

  • Jdbc scenario .. where to find the error msg

    Hi,
    I am working on a scenario,
    abap proxy->jdbc adapter->MsSql server.
    Whle testing,
    i sent the payload xml from the sproxy test sceen.
    After that, i checked the "Monitor for processed xml messages" screen (SXI_MONITOR).
    There it shows the status "Processed successfully" for the message that i sent.
    But when i checked the sqlserver database, the record is not inserted.
    Where can i find, if anything gone wrong at Jdbc adapter, or there after.
    Thanks in advance,
    Ganesh

    Hi
    apart from this communication channel you can see the message in adapter engine
    to do this take the id of the message fromSXI_MONITOR
    then go to transaction sxmb_ifr
    inside this go to message  Monitoring
    under drop down select adapter engine and inside the window give the iD of your message which you have taken from MONI
    if you are not getting the filter for message ID then click on additional filter and give the iD
    after this you can see your message
    select the radio butten inside your message and click on details
    here you will get the log of each and every step which have been followed in processing the message and you can find the error exactly
    regards
    sandeep
    If helpful reward points

  • What table where i can find the errors in Sales Order

    hi,
    what table where i can find the errors in Sales Order. here's my situations, I need to create a abap report of CRM sales order not replicated to R/3 and show what's the error. I can't find the actual error in CRMD_ORDDERADM_H and CRMD_ORDERADM_I. I also tried calling program "CRM_ORDER_READ" but the program doesn't display/returns error's on header and item level.
    please help.
    earl g. faren

    hi,
    what i need is a table where i can find the sales transaction errors. I'm doing a abap report to list down sales transactions with error(s). I checked the table CRMD_ORDERADM_H and CRMD_ORDERADM_I but there's no field for transaction errors.
    please help me find a table where I can link the tables above to get the specific errors for a sales transactions.
    thanks alot.

  • Can Someone Help Me Find The Right KVM?

    I have a tough set-up and I'm finding the search to be overwhelming. I'm hoping someone who's been through this before can help me find the best KVM for my needs. Here's what I have:
    Apple Dual 553mHz G4
    • Upgraded dual montior video PCI card (ADC and DVI ports)
    Apple G5 QUAD
    • Stock dual DVI ported video PCI Express card
    Monitors
    • 2 Apple 17" displays (ADC)
    • 1 Wacom 18" Display (DVI)
    I also have 1 Apple DVI to ADC Display Adapter
    Can I find a dual monitor KVM to use between these 2-machines and leave the third monitor on the G5 only? How about 3-monitor KVM? What are my options here? I'm so confused by all of this.
    i really want the G5 to be able to use all three monitors at once. It doesn't matter to me how many the G4 gets. If the KVM doesn't work I'm just going to suck it up and buy a second video card for the G5 (and DVI adapter) and run all 3 monitors on the G5 and use Remote Access for the G4.

    with respects to the dual DVI KVM... there are a couple of options out there.
    as far as 3 monitor KVM, there really are no such products, however, there are DVI matrix swtiches that will allow you to manually (or through presets) switch any input to any output, to include mirroring monitors on various inputs. however, with anything DVI, there may potentially be hot switch issues with resolution and synch, handshake, peripheral control, etc...
    let me just shoot you a couple of links...
    for dual DVI KVM...
    http://www.linkskey.com/detail.php?Productid=140&ProductName=LDV-DM02ESK
    http://www.linkskey.com/detail.php?Productid=139&ProductName=LDV-DM04ESK
    http://www.cablestogo.com/product.asp?cat%5Fid=518&sku=32562
    http://www.networktechinc.com/srvsw-pc-dvi.html
    DVI matrix switchers (any input to any output - very expensive)
    http://www.gefen.com/kvm/product.jsp?prod_id=1464
    http://www.digitalprojection.com/content/view/88/91/
    sorry to just shoot a bunch of links to you. in my experience, i've generally just used VGA for KVM setups and also there are many pitfalls with compatibility in certain setups that are almost impossible to avoid without trial and error and blind luck.

  • I have bought 12 songs from iTunes on my I phone and would now like to record them on a CD.  When I open my Itunes on my desktop and go to what I've purchased it shows only 7 songs bought????  Can anyone help me find the other's so I can burn a CD?

    I have an IPhone 4 and downloaded 12 songs from the Itunes store on my phone.  I want to burn a CD but when I go into my ITunes on my desktop which is Windows XP there are only 7 listed not the 12 I bought.  Can anyone help me find the others?????

    Connect iPhone, then go to iTunes > File > Transfer purchases...

  • When i try to open photoshop this shows up Please uninstall and reinstall the product.  If this problem still occurs, please contact Adobe technical support for help, and mention the error code shown at the bottom of this screen.  Error: 16

    i had to take my photoshop file into a hardrive because my dad was going to give me a new Mac and when things didn't work out and went back to my old one i use the time capsule thing to save everything before but didn't give me photoshop so i physically moved the file and tried to open it but then this error shows up
    Please uninstall and reinstall the product.
    If this problem still occurs, please contact Adobe technical support for help, and mention the error code shown at the bottom of this screen.
    Error: 16
    and when i click the uninstall app on the file it tells me this
    The alias “Uninstall Adobe Photoshop CS6 2” can’t be opened because the original item can’t be found
    and when i click fix alias i click on photoshop and the app just turns into photoshop and i just run in circles
    please help thank you

    Run the cleaner tool and reinstall.
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    Download CS6 products
    Mylenium

  • Hi.I need help.my iphone was Stolen .how can I get back my iphone. Serial No.DX*****PMW.could you help me find my iphone.thank you very much.could you send me the ICCID number to help me find the iphone

    Hi.I need help.my iphone was Stolen .how can I get back my iphone.  Serial No.DX******PMW.could you help me find my iphone.thank you very much.could you send me the ICCID number to help me find the iphone.if you can help me.
    <Personal Information Edited by Host>
                                                                                                                                                                   Sincerely a Chinese girl really need your help

    Sorry we are all users on this User  Community No Apple Staff
    Read this .
    http://support.apple.com/kb/HT2526
    Apple do not and cannot assist in finding stolen property ,that is the responsility of your Police

  • Can anyone help me find the output option in Bridge CC?

    Can anyone help me find the output option in Bridge CC?

    http://helpx.adobe.com/bridge/kb/install-output-module-bridge-cc.html

  • I upgraded from Dreamweaver CS4 to CS6. but now "an TFP error occured - cannot make connection to host". I spent hours with the host technician and we cant find the error. I reinstalled DW4 and it connects to host perfectly. Anyone else seen this problem?

    I upgraded from Dreamweaver CS4 to CS6. but now when I want to upload I get "an TFP error occured - cannot make connection to host". I spent hours with the host technician and we cant find the error. I reinstalled DW4 and it connects to host perfectly. Anyone else seen this problem?
    Mac OS 10.8.5
    None of these issues are causing the error in DW CS6. We have double checked all of them and we have everything exactly right. Also I have exactly the same SiteSetup in DW CS4 and that works perfectly well. Could there must be factor in 6 that didn't exist in 4? Something that isnt in the SiteSetup but in some hidden dialog box ?
    I can also upload to my host using Fetch, a third party FTP. And as I said DW CS4 works fine. So the problem is not with my host, its with DW CS6 in particular.

    Thank you Jon, that fixed it perfectly. You have saved me from going crazy. The only difference I see now is in "Server Name" it changed what I had entered (my ftp address) to "Remote Server"; which seems odd -- but it works!   Although I know there maybe also some other dialog box I have never seen
    Of course I saw that menu item "Import"  and but I thought thats obviously not for me: "Why would I want to import an entire website?". I did not however see "Export the selected site" for thats only a tiny icon in the footer. However I would have thought the same:  "Why would I want to export my entire website?".
    An observation: I've seen this problem in a lot of Adobe software, the menu-names of items are  obscure, non descriptive. What would be better would be for the menu names or popups to say "Export Site Setup settings" and "Import Site Setup settings"

  • Why doesn't my iPhone 4 have an 'Internet tethering' options? Is it carrier related or iOs related? Please help me find the solution for this. thanx

    Why doesn't my iPhone 4 have an 'Internet tethering' options? Is it carrier related or iOs related? Please help me find the solution for this. thanx

    Personal Hot spot
    http://support.apple.com/kb/HT3574
    Understanding
    http://support.apple.com/kb/HT4517
    Trouble Shooting
    http://support.apple.com/kb/TS2756

Maybe you are looking for

  • Printing issues from InDesign CS4 pdf file

    Good morning, Could you help explain and possibly resolve an issue I'm having with an InDesign CS4 pdf file where the text and image drop shadows (40%) are printing as solid black blocked shapes from a large format printer. The file encompasses 1 ove

  • Cancel incoming payment

    please i entered the incoming payment through the transaction code F-28 after saving i guess that i made a mistake regarding the bank account ,it is for another company, i want to cancel the incoming payment many thanks in advance

  • Why won't imovie '11 finalize or prepare my project??

    why won't imovie '11 finalize or prepare my project?? Just an error message. I've made many videos before with NO issues.

  • IProcurement Requisition screens

    Hi All, I have to throw an error message in the iProcurement Requisition "Edit lines" page based on some values in the requisition distributions assocaited to the line. I have extended the controller of the "Edit Lines" page and am trying to run thro

  • Spotlight not finding files plainly visible on the desktop

    Spotlight won't find a PDF file that I can plainly see on my desktop. I have had this problem repeatedly recently.  It doesn't matter whether I set search to look on the desktop or "all files".  It just doesn't find them.  This is fairly frustrating.