Code does not-don't know why...

Hi all:

I have a program 'Oracle' (I wouldn't call it that, but just a code for a single move data). I use TORA as the interface for Oracle. I don't have a copy of the TOAD. But for some reason, when I run this code, it takes all of 0.003 second and actually don't move not any data. Here is a copy of the code. If I take the query to be used in the cursor, it returns data and takes about 1.5 seconds to run, but trying to run this code, it takes 1/10th of that time, if I'm doing something wrong, but I can't understand that.

I also tried to copy this code in SQLPlus, but who doesn't. Can anyone spot what I'm doing wrong? I don't know if it's my environment and how I'm trying to run this or the code itself is wrong.

DECLARE
-----------------------------------------------------------------------------------------------
-Local Variables
-----------------------------------------------------------------------------------------------
l_gm_master_label VARCHAR2 (20);
l_active_flag VARCHAR2 (1);
l_currdate DATE;
l_comp_id VARCHAR2 (2);
l_site_id VARCHAR2 (2);
l_gm_master_id NUMBER;
c_serial_number VARCHAR (40);
c_creation_date DATE;
c_interface_date DATE;
c_ebiz_sku_no NUMBER;
c_ebiz_ord_no NUMBER;
-----------------------------------------------------------------------------------------------
-The cursor
-----------------------------------------------------------------------------------------------
CURSOR serial_number_data IS
SELECT
S.Serial_number,
S.CREATION_DATE,
S.interface_date,
S.ebiz_sku_no,
O.ebiz_ord_no
Of
dmlogic.trn_rm_serial_number S
INNER JOIN ebiznet.trn_ordhead O ON S.ord_no is O.ord_no;.
BEGIN
DBMS_OUTPUT. ENABLE (2000);
-----------------------------------------------------------------------------------------------
-Set default values
-----------------------------------------------------------------------------------------------
l_gm_master_label: = 'DMLogic001 ';
l_active_flag: = 'n';
l_currdate: = SYSDATE;
l_comp_id: = 'XE ';
l_site_id: = "OHIO."
l_gm_master_id: = 0;
-----------------------------------------------------------------------------------------------
-Get the next value
-----------------------------------------------------------------------------------------------
SELECT
trn_gm_master_seq. NEXTVAL
IN
l_gm_master_id
Of
Double;
-----------------------------------------------------------------------------------------------
-Insert generic Gray number master record who will join all the serial numbers DMLogic
-----------------------------------------------------------------------------------------------
INSERT INTO trn_gm_master
(gm_master_id,
gm_master_label,
active_flag,
CURRDATE,
identifiant_composant,
Site_ID)
VALUES
(l_gm_master_id,
l_gm_master_label,
l_active_flag,
l_currdate,
l_comp_id,
l_site_id);
-----------------------------------------------------------------------------------------------
-Open the cursor
-----------------------------------------------------------------------------------------------
OPEN serial_number_data.
LOOP
-------------------------------------------------------------------------------------------
-Fetch values
-------------------------------------------------------------------------------------------
EXTRACT the serial_number_data IN c_serial_number, c_creation_date, c_interface_date, c_ebiz_sku_no, c_ebiz_ord_no;
EXIT WHEN serial_number_data % NOTFOUND;
INSERT INTO ebiznet.trn_gm_serial_number
(gm_serial_number_id,
gm_master_id,
gm_serial_number,
received_by,
received_date,
picked_by,
picked_date,
ebiz_sku_no,
identifiant_composant,
Site_ID,
ebiz_ord_no,
interface_date)
VALUES
(trn_gm_serial_number_seq. NEXTVAL,
l_gm_master_id,
c_serial_number,
1,
c_creation_date,
1,
c_creation_date,
c_ebiz_sku_no,
l_comp_id,
l_site_id,
c_ebiz_ord_no,
c_interface_date);
EXIT WHEN serial_number_data % NOTFOUND;
END LOOP;
CLOSE Serial_number_data;
----------------------------------------------------------------------------------------------
-Commit the changes
----------------------------------------------------------------------------------------------
COMMIT;
-----------------------------------------------------------------------------------------------
-Rollback If an error occurred
-----------------------------------------------------------------------------------------------
EXCEPTION
WHILE OTHERS THEN
ROLLBACK;
DBMS_OUTPUT. PUT_LINE ("A ERROR OCCURRED");
END;

Hello

First and foremost, I would like to get rid of this track together and run it again

EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE('ERROR HAS OCCURED');

It is not helping you in anyway shape and hides just any error that might occur.

David

Tags: Database

Similar Questions

  • Recent programs on the start menu is not - don't know why?

    I read the other posts and have not used "CCleaner", but have used other registry cleaner products. Any ideas how can I fix?

    Hi K_Wallett,

    There may be not much that can be done for this, if the registry has been modified or corrupted/damaged. You can try one of the options is to perform a repair installation: http://support.microsoft.com/kb/917964 however, before this just so that there is no other issue you will want to make sure you have all your programs, files, folders, and everything you don't want to lose saved on an external device. (just to be sure that your data are safe).

  • Don't know why sound does not play when I read my slides in Captivate 5.5?

    I don't know why but all of a sudden when I'm working on a project in Captivate and record to the slide, and then click Play move it I play the Visual, but I can't hear the voice recording.  If I only click on the audio icon on the slide to play the record I can hear him, but he doesn't play with the slide.  Any ideas why this might be happening?

    Thanks in advance.

    Hello

    Please check if you have accidentally selected the mute button controls on the timeline.

    You'll find it here-

    Thank you!

    Anjaneai

  • When I put pictures on my Mac, I chose my Aperture library. Now there is no pictures in Photos or Aperture! They are all in the photo library, but I don't know why they are not in the pictures when I open it?

    When I put pictures on my Mac, I chose my Aperture library. Now there is no pictures in Photos or Aperture! They are all in the photo library, but I don't know why they are not in the pictures when I open it?

    Sorry try again - your post does not calculate

    They are all in the photo library, but I don't know why they are not in pictures

    What version of the operating system and Photos you have? Explain what exactly you're actually seeing and what has changed since it worked

    LN

  • Apple Watch: can I receive all messages from whatsapp on my Apple Watch, but not the Group whatsapp messages, don't know why... Help, please. Besides, my watch is custom in Spanish, but only answer messages Whatsapp understands English... someone kn

    I can receive all messages from whatsapp on my Apple Watch, but not the Group whatsapp messages, don't know why... Help, please.

    Besides, my watch is custom in Spanish, but only answer messages Whatsapp understands English... anyone know why? Thanks to you all!

    Hello

    To change the language for a response on your watch: Press answer > firmly press the screen > press on choose language > select Spanish.

  • Google chrome not working anymore I don't know why it was ok 2 months ago

    Google chrome not working anymore I don't know why it was ok 2 months ago

    Hello

    1. what operating system is installed on the computer?

    2 are you able to use Internet Explorer on the computer?

    3. do you get an error message? If Yes, what is the full and exact error message?

    If you are facing problems with Google Chrome, check out the link for the support of Google Chrome:

    http://www.Google.com/support/chrome/

  • My security firewall keeps goes off. I don't know why, it is not in all programs

    I get a security warning that my firewall security is disabled.

    * original title - my security firewall keeps goes off. I don't know why. It is not listed in my Programs.com* all

    Hello ChristieEvans,

    You are referring to the Windows Firewall or you use a third-party software?  I have included a link below that I hope will help to ask a question.

    Microsoft KB:

    http://support.Microsoft.com/kb/555375

    Thank you

  • Hi, I don't know why, why the Edit/Perspective option is not active. I cnnot use it.

    Hi, I don't know why, why the Edit/Perspective option is not active. I can't use it. This is a simple job: on the wall in perspectiwe I want to put the logo (point of view of Pentecost). I use grit in perspective and then want to use the option change/Perspective. The comends are grey (not active). I don't know why.

    I can't help you with questions of the Illustrator.  Maybe post in the Illustrator forum instead of the generic Cloud creative forum:

    Illustrator

  • Why my license code does not work on lightroom 6 for mac?

    Why my license code does not work on lightroom 6 for mac? My os x is "el capitan".

    Please try the steps to serialize Lightroom CC trial to activate like Lightroom 6 mentioned on: https://helpx.adobe.com/lightroom/kb/serialize-lightroom-cc-trial-to-activate-as-lightroom - 6.html

    You can also try: error "serial number is not valid for this product". Creative Suite

  • Hello! I tried everything, but I can change the COUNTRY in my account ID /... don't know why but it's of the U.S.., instead of BRASIL, it is where I live.  I want to buy the first Pro app and I can not because of that... Help me!!!

    Hello! I tried everything, but I can change the "COUNTRY" element in my account ID /...

    don't know why, but it's the USA instead of BRASIL, it is where I live.  I want to buy the first Pro app and I can not because of that... Help me!!!

    Fabrizio,

    The country store & the Adobe ID, payment details must be same.

    For tax reasons, it is not possible to change the country associated with an existing Adobe ID. To work around the problem, you can create a new Adobe ID to the e-mail address associated with your existing Adobe ID see the link for instructions:

    Change the country associated with your Adobe ID

    If you wish to contact our support group for assistance, please visit this link: (be sure to connect to adobe.com with your Adobe ID first)

    CC_membership-account-payment-support

    Guinot

  • iTunes will not install and I don't know why.

    I tried to install iTunes for some time, but it still seems to fail. I don't know why. When I get to install it says I can't access it for some reason or another. Can someone help me?

    I tried to install iTunes for some time, but it still seems to fail. I don't know why. When I get to install it says I can't access it for some reason or another. Can someone help me?

    Perhaps you would consider as asking questions of itunes in Apple Support communities like forums below:

    Communities in support of Apple - itunes for Windows

    https://discussions.Apple.com/community/iTunes/itunes_for_windows

    Problem installing itunes for Windows

    http://support.Apple.com/kb/HT1926

  • Why my registration code does not work?

    I just bought Adobe Photo Shop Elements for MAC and provided in the box registration code does not work.  Now, I can't find my serial number.  I got the purchase at Best Buy and they told me that since it was open, I call Adobe.  I was not able to find the phone numbers for support and all redirects me here.  I really want to use this product before the weekend and now I'm beyond frustrated.  I did research on research and nothing helped.

    Can you help me?

    AA I mentioned above, I tried everything recommended on Adobe's Support site. I was not able to find something that works with your link above.

  • BlackBerry Smartphones USSD code does not work on my BB 9650

    Hi all! All codes USSD (* # 566, * 123 # etc) does not work on my BB 9650. How to solve this problem? I use the grameenphone GSM network in Bangladesh.
    Anyone facing this problem?
    Please answer this... BB admins

    Well, I fixed it! This problem occurs mainly when I turn on data services. Otherwise, it works fine, after that I change the SIM card with another.
    As soon as I turn the "Data Services" on WE, USSD codes do not respond. A call is made by the BB device rather than request a response from the network.
    I don't know WHY. Better not ask you sort

  • jQuery code does not work in phonegap

    Someone gave me a code https://jsfiddle.net/adeneo/2uod274d/ jsfiddle

    It works well in jsfiddle, but when I put the code in my Xcode and amended to incorporate my code and run it in the Simulator, the code does not work at all (i.e., no data is stored in the local storage)

    I am building an app for iOS with phonegap. JS:

    <script type="text/javascript" src="cordova.js"></script>
      
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
      
    <script type="text/javascript" src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js"></script>

      
    <script type="text/javascript">
      document.addEventListener("deviceready",onDeviceReady,false);

      function onDeviceReady() {

      document.getElementById("btnSave").addEventListener("click",saveData,false);
      document.getElementById("btnShow").addEventListener("click",showData,false);
    }

      function saveData(){
      var data = window.localStorage.getItem("date");

      var dates = data ? JSON.parse(data) : [];

      dates.push( new Date() );

      window.localStorage.setItem("date", JSON.stringify(dates));

      alert("Your data is stored");
      }

      function showData() {
      var data = JSON.parse(window.localStorage.getItem("date"));
      console.log(data);
      $('#res').html(JSON.stringify(data));
      $(this).html('Update result');
      }

    < /script >

    HTML:

    <button id="btnSave"> Save Data </button>

      
    <button id="btnShow"> Show Data </button>

    I don't know what is happening because the code works well in jsfiddle, but for some reason any just does not work in my phonegap.

    My version of phonegap 5.3.6 cordova version 5.3.3

    Post edited by: Fang Kerry, I added my complete code is easier to see the problem (if any)

    jQuery has nothing to do with this, as far as I can tell (so not sure why it is in your title). The problem is that the result of JSON.parse (data) is not an array, what you think it is, it's a chain. The chain respond well to 'push '. I get that when you use this code in jsfiddle he is somehow coming out as a table, but I think it must be because of something done jsfiddle. When I do the same commands in the console of my browser, I get a string, not a table, so your problem.

    Instead:

    function deserializeDates() {
        var data = window.localStorage.getItem("date");
        var dates = []; // worst case, we'll return an empty array.
        if (data) {
            try {
                dates = JSON.parse(data);
                 // handle the case that dates is a single item and not an array
                if (!(dates instanceof Array)) {
                    dates = [dates];
                }
            } catch (err) {
                 // the stored dates failed to parse for some reason; you might want to do something about it
                 console.log("Failed to parse " + data);
             }
        }
        return dates;
    }
    
    function serializeDates(dates) {
        window.localStorage.setItem("date", JSON.stringify(dates));
    }
    
    function saveData(){
         var dates = deserializeDates();
        dates.push( new Date() );
         serializeDates(dates);
        alert("Your data is stored");
    }
    
    function showData() {
         var dates = deserializeDates();
        console.log(dates);
        ...
      }
    
  • Try to get the first sentence only - code does not

    It makes me crazy - code works on a single page, but not on another, and I can't understand why. The code I use to get out of the first sentence of a field is as follows:

    < cfset variables.firstsentence = Find (".", #get_spotlight.description #) >

    < cfoutput query = "get_spotlight" >
    < p > < #title # < br / >
    #Left (description, variables.firstsentence) # (< a href = "database_spotlight.cfm? link_id = #link_id #" > learn more < /a >) < /p > < / cfoutput >

    It works here: http://www.richland.lib.sc.us/research.cfm

    I try to use the same code on another similar page, and the same code does not work. It takes only the first 40 characters or more and I don't know why. I guess it's something to do with the surrounding code, but I don't see what. Can someone enlighten us on that before go me crazy?
    Here's the page I'm working on: http://www.richland.lib.sc.us/sample/linkstest6.cfm?subjecttype_id=16
    And here's all the code (in case something else is causing the problem)

    < cfquery name = "get_links()" datasource = "links_1", dbtype = "ODBC" >
    SELECT links.link_id, links.title, links.link, links.description, links.url_home, links.icon, links.url_tutorial, links.discus,
    Links.Subscription, subjecttype.subject_name, subject.link_id, subjecttype.subjecttype_id, subject.subjecttype_id
    Links, subjecttype, subject
    WHERE links.link_id = subject.link_id
    AND subjecttype.subjecttype_id = subject.subjecttype_id
    AND (subject.subjecttype_id = #url.subjecttype_id #)
    ORDER BY title
    < / cfquery >

    < cfset variables.firstsentence = Find (".", #get_links.description #, 0) >

    Output (with some HTML stranger deleted - sorry for the lengthy code - I'm sure there's probably a shorter, more elegant way to do..):

    < cfoutput query = "get_links()" >
    < cfif subscription IS "Yes" >
    < cfif IS 'Home' icon >
    < cfif url_home IS "" > <!-> the same in-house/remote url ".
    < p > < img src = "" #icon #4.gif "alt ="database icon"width ="20"height ="20"align ="absmiddle"/ >"
    < span class = "bold" > #TRIM (title) # </span > < cfif get_links.discus IS 'YES' >
    "" < img src = "... / pictures/discus_logo.gif" alt = "DISCUS" width = "61" height = "17" align = "absmiddle" / > < / cfif > < br / >
    #Left (description, variables.firstsentence) # < br / > < a href = "#link #" title = "#TRIM (title) #-inside the library" > inside the library < /a > |
    < a href = "" #link # "title =" #TRIM (title) #-home access "> home access < /a >"
    | < a href = "database_spotlight.cfm? link_id = #link_id #" > < img src = "moreinfo4.gif" alt = "More information" width = "20" height = "20" align = "absmiddle" / > < /a > "
    < cfif url_tutorial IS NOT "" > | "."
    "< a href ="... /... "/PDF/ #url_tutorial #" > < img src = "tutorial4.gif" alt = "Tutorial" width = "20" height = "20" align = "absmiddle" / > < /a > "
    < / cfif > < / p >

    < cfelse > <!--> two show internal URL / remote
    < p > < img src = "" #icon #4.gif "alt ="database icon"width ="20"height ="20"align ="absmiddle"/ >"
    < span class = "bold" > #TRIM (title) # </span > < cfif get_links.discus IS 'YES' >
    "" < img src = "... / pictures/discus_logo.gif" alt = "DISCUS" width = "61" height = "17" align = "absmiddle" / > < / cfif > < br / >
    #Left (description, variables.firstsentence) # < br / > < a href = "#link #" title = "#TRIM (title) #-inside the library" > inside the library < /a > |
    < a href = "" #url_home # "title =" #TRIM (title) #-home access "> home access < /a > |" < a href = "database_spotlight.cfm? link_id = #link_id #" > < img src = "moreinfo4.gif" alt = "More information" width = "20" height = "20" align = "absmiddle" / > < /a > "

    < cfif url_tutorial IS NOT "" > | "."
    "< a href ="... /... "/PDF/ #url_tutorial #" > < img src = "tutorial4.gif" alt = "Tutorial" width = "20" height = "20" align = "absmiddle" / > < /a > "
    < / cfif >
    < /p >
    < / cfif >
    < cfelseif icon is "inhouse" > <!--see the internal url-->
    < p > < img src = "" #icon #4.gif "alt ="icon of the database"align ="absmiddle"/ >"
    < span class = "bold" > #TRIM (title) # </span > < br / >
    #Left (description, variables.firstsentence) # < br / > < a href = "#link #" title = "#TRIM (title) #-inside the library" > inside the library < /a > | < a href = "database_spotlight.cfm? link_id = #link_id #" > < img src = "moreinfo4.gif" alt = "More information" width = "20" height = "20" align = "absmiddle" / > < /a > "

    < cfif url_tutorial IS NOT "" > | "."
    "< a href ="... /... "/PDF/ #url_tutorial #" > < img src = "tutorial4.gif" alt = "Tutorial" width = "20" height = "20" align = "absmiddle" / > < /a > "
    < / cfif > < / p >
    < / cfif >
    < / cfif >
    < / cfoutput >
    < p > < / p >
    < h3 > librarian - selection of Web Sites < / h3 >
    < cfoutput query = "get_links()" > <! - no subscription sites - >
    < cfif subscription IS 'No' >
    < p > < img src = "" #icon #4.gif "alt ="icon of the database"align ="absmiddle"/ >"
    < a href = "" #link # "title =" #TRIM (title) #"> #TRIM (title) # < /a > < br / >"
    #Left (description, variables.firstsentence) # < br / >
    < a href = "database_spotlight.cfm? link_id = #link_id #" > < img src = "moreinfo4.gif" alt = "More information" width = "20" height = "20" align = "absmiddle" / > < /a > < /p > "
    < / cfif >
    < / cfoutput >

    Thank you for reading this day and for any help or suggestion.

    YES! That's all--woohoo! Thank you very much. In addition, this explains why the same piece of code works on another page - this page I only shot one record instead of many. I looked up the ListFirst function and I understand that - but I never would have thought it myself.

    Thank you very much for coming up with the answer - and thanks to everyone who took the time to try it - I really appreciate it.

    Quote:
    Posted by: Swift
    Hi Michelle,

    If I'm right, then it is a simple problem. The simplest are good. :)

    That's what you have:


    <>

    #Left (description, variables.firstsentence) # (read more...)

    What you have done is in the position of the period off the first record in the data base by base and then applied to all records in the database. So you're cutting posted on 40 every time, because you will find that the first record in the database should be cut to the 40 position. Instead, you simply calculate the position each time inside the loop. In addition, we will just go ahead and make it even easier by using ListFirst...


    <>

    #ListFirst (description, ".") # (read more...)

    That should do it. By the way, if you really want the period appear (which I imagine you do), then just use:

    #ListFirst (description, ".") #.

    Instead of

    #ListFirst (description, ".") #.

    HTH,
    SWIFT

Maybe you are looking for