wind turbine

Hello, I work in the simulation of a model of wind turbine, and the problem is that the energy produced by the wind turbine depends on the power factor, which depends on the speed of the turbine, which I calculate from the integral of electricity. then generates a complex cycle.


Tags: NI Software

Similar Questions

  • consumption of energy. Monitoring of wind turbine

    Wind of 2Kw. have home of a labview U3 interface so that I can have my PC monitor voltage and the incoming power 48 volt battery bank.

    I have two values Measurer in what I'm doing a Labview VI. A current and voltage sensors on my battery and regulator.  To get the power (Watts)

    I have run through a multiplier of Labview (such as volts X wattage = AMPS). That is fine, but I would like to make an electricity meter long term and not only have instant

    power. So what I want to know is does anyone know a function VI or sub-channel (for lack of a better word) which could take as input a Measurer of value which in this case is watts

    and then add second per hour over time to produce a final result of kilowatt-hours? For me, a pretty Labview novice user, this need of the cries for a function of integration (area under the graphic thing).

    I don't have tinkered with Labview integration function but for the moment no chance maybe because I do not know how to feed a significant signal in the upper and lower limits of entry.

    Thanks in advance! This is an awsome Forum.   Greg.

    Use a while loop with a delay (hold function) as 1s configures a Shift Register (SR) in rt - by clicking on the border of the While loop. A digital constant of the appropriate data type of wire to the left terminal of the use of SR. a function Adder to add instant power for every second & stop the while loop after based on logic after a certain amount of timeout. Wire indicator to the right of the RS Terminal, you'll get the total power obtained over a period of time.

  • wind turbine overspeed warning


    A good starting point is just about anywhere in the folder "analysis, Signal Processing and Mathematics" (Yes, the name of the folder is long). Subfolders "Signal Processing", and "Signal and noise Generation" may be what you are looking for. There are many examples in there pulses and transmission of the signal.

    The counter you want to implement may need a bit of clever reflection well.

    Hope that helps!

  • PARE overspeed with Arduino wind turbine

    Hello

    I bought an Arduino uno Council and labveiw bundle to replace VOG (vestas overspeed warning). Basically, I'm looking for a pulse counter that will trigger a relay when needed to the many impulses in a certain period of time. I have no experience with labveiw and on a calendar, can someone help out me?

    Double wire. I posted a reply y.

    Lynn

  • With an average of meter data

    I have a double precision scalar value to a DAC that represents the current measured in a domestic wind turbine application. This value is harvested in a home made circuit that has a little 'noise problem '.  This noise cause fluctuations in the value of more or less 20%, which appears visually in the gauge of the output of my VI as earthquake of the needle.  The value of the DAC is read and displayed 3 times per second.  I thought that there must be a way to display a moving average of the signal on the last bed N or N seconds that would moderate the noise and the hand shake a little.  Tried to play with the built in RMS VI but the data entry type is table and I scalar double-precision. I'm REALLY new to Labview and swimming with ideas of what must certainly be possible but work always on absorbing the incredibly array of features that this software has.

    Thoughts appreciated.

    You can use Point-by-Point screws.

  • How TR/MIN-meter?

    Hello guys,.

    I want to measure my mini wind turbin RPM.

    I have a proximity sensor and I have a device of voltage-frequency.

    And my problem is, I want to use labview to make an RPM meter.

    How to do?

    Thank you

    Hutomo salvation,

    I just noticed that this post has been duplicated several times. I think it will be a better idea to just to keep this topic on a thread, so that we can unite our efforts to help you. Since people have already made the comments here, we'll just stick with this post. In the future, it will be better if you post just once by topic, at National Instruments like us each post, so don't worry your not issues.

    Jason L.

  • Compact Daq or Rio measurement signal and datalog

    Hello

    I'm in a project to create a diagnostic for an offshore wind turbine generator system.

    So I have to choose a material acquisition and make the basic operations with the measured signals.

    The equipment has to work without being connected to a PC, write the data in the internal memory, and then send it via ethernet.

    The CDaq and the controller chassis is cheaper than CRio, but she would work without a PC (with the exception of couse the stand-alone version that is overpriced)? Is it possible to add memory via USB to a CDaq (for datalog)?

    Hello

    If cDAQ standalone chassis is more than your budget, then cRIO is the right/only way to go. The good thing is that they share the modules C-series real connectivity and conditioning of signals is the same. Youneedtohavesomeformoflocalintelligence/processingpowertoevenperform the taskofwritingdatatoaflashdrive "simple."

    This is a technical presentation online that might interest you: measures and monitoring in Offshore Applications

    Let me know if you want me to make a connection with your local technician to NEITHER.

  • How to get to multiple data acquisition voltage signals

    Hi guys,.

    I have to run an event for children to play with different types of energy production, so we have a wind turbine, solar panel and a generator. I have all of them connected to the ports of entry of the C USB DAQ series, I can't seem to find a way to make data acquisition out all three voltages simultaneously, the DAQ assistant in labview won't do it, AFAIK. I need all the outputs of all so that the children can see the reknewables plus and then complete the lack to win with the "power station" generator, so I need them all running at the same time. I had a quick glance at similar problems, but I don't see how they are relatable to my case.

    I have attached the vi below, thanks for your help.

    Amy

    DAQ Assistant allows multiple entries of tension. When the analog channel selection hold down the SHIFT key and then select as many channels available, you want.

  • TCP data flow is interrupted by recording data (text entry)

    Hello, I am currently working on a senior design project where my team is currently developing a control system for a small wind turbine. We are adding sensors and wireless systems to the turbine. The sensor data will be collected and sent over a TCP connection. The Labview will serve as the listener and display the values on the web.

    I have problems with the registration however data.

    I would like for where you put in the time, you the datalogger to be active, then press a button and the data logger records the incoming values on the TCP connection and create a CSV text file.

    Whenever the loop of data logging is running, stops the flow of data from the sensor so all my recorded values are the same for the duration.

    Any input would be appreciated.

    Thank you!


  • Dell XPS 14 Fan Noise

    The fan on my XPS 14 sounds like a A380 jet engine and it comes on when the computer is attempting anything even mildly stressful like a virus scan or when adding two numbers together!!
    
    Is there anything that can be done to prevent this? I was at an international business meeting the other day when the fan started up and everyone turned to look in my direction - I was mortified - had to shut the darn thing down. What can be done? Is there any way I can prevent the kind of cpu usage which results in the internal wind turbine starting up?
    

    I'm going through this process now, cordially you cannot remove the battery on the XPS! They are integrated. Also impossible to open the PC up anyway because of the screw... only real military are able to (unless I want to cancel my warranty 3 years) so basically I can't do the two most likely fixes.

    EDIT: also, my laptop runs only 27% of CPU and 50% (reflects typical usage for me) so I really think it's a harsh that fans are so inadequate and noisy design flaw! Not good when you are in a shared office space.

  • Open a new doc/docx/txt in edit mode

    I do a soft, that creates a doc/docx/txt file (with qfile, open and close the file, so it's an empty file). Right after that the file is created, I invoke docs to go into edit mode to modify the file. But when open app I get this message 'this file is not a valid file .doc' but if I invoke the preview generator, it opens without any problem, what Miss me?

    Here's the function that is called

    void ApplicationUI::newNote( bool docx,QString name)
    {
        QString recString;
        request = new InvokeRequest();
        QVariantMap meta;
        if(name.isEmpty()){
            if(docx){
                recString = "document%1.doc";
                request->setMimeType("application/msword");
            }else{
                recString = "note%1.txt";
                //request->setMimeType("text/plain");
            }
    
         recString=recString.arg(QDateTime::currentDateTime().toString("yyyy-M-d_hh-m-ss"));
        }
        else
            recString = name;
    
        QFile file (QDir::homePath()+"/Notes/"+recString);
            qDebug() << "file exists" << file.exists();
            qDebug() << "File Open" << file.open(QFile::ReadWrite);
            file.close();
    
        request->setTarget("sys.dxtg.stg");
        request->setFileTransferMode(FileTransferMode::CopyReadWrite);
        qDebug() << "Uri file " << QDir::homePath()+"/Notes/"+recString;
    
        request->setUri("file://"+ QDir::homePath()+"/Notes/"+recString);
    
        manager->invoke(*request);
    }
    

    Hi silajim,

    You did nothing other than following what BlackBerry noted in their docs, but unfortunately the official called doc invoking Core Apps has some errors in section Documents To Go, and I never took the time to write to BlackBerry to let them know.

    Fortunately, the errors are pretty obvious if you try to understand what are the target of call used.

    So in your example, you want to call app "Word To Go", which is the text of Documents To Go document Manager. But, if you reduce the application that is opened from your invocation, you will notice that you call in fact "Sheet To Go", the Manager of spreadsheet of Documents To Go. Why?

    Look at the target of call:
    sys.dxtg.STG

    'stg' here means 'Sheet To Go'. What you need to do is to replace "stg" by "wind turbines" (Word To Go).

    So your code is correct, simply change the target:
    sys.dxtg.WTG

    I know, you followed the official docs and it says to use the target of ILI, any other said, I find the docs to be precise, most of the time and I continue to read the docs and follow their examples of code, but sometimes mistakes happen (they are written by humans after all) and I'll try to report these errors to the BlackBerry team once I had the time to test them all.

  • Smartphones blackBerry deleted maps

    I deleted the application Maps Applications in the Advanced Options menu. I can't get it from the Web site. It downloads just what's called lbs_ribbon or something like that.

    Anyone knows how I can get it back?

    I deleted the application Maps Applications in the Advanced Options menu. I can't get it from the Web site. It downloads just what's called lbs_ribbon or something like that.

    Anyone knows how I can get it back?

    Do not know why the station splits to... ignore it.

    Canadian wind TURBINE?

    https://www.BlackBerry.com/downloads/entry.do?code=B27D5296BEDE63B1493A5D321D4E8092

    WIND Hellas:

    https://www.BlackBerry.com/downloads/entry.do?code=3210DDBEAA16948A702B6049B8D9A202

    or Italy? :

    https://www.BlackBerry.com/downloads/entry.do?code=C8758B517083196F05AC29810B924ACA

    Download your carrier above the same operating system.  Then, install on your PC.  Go to C:\program files\common research in motion\apploader and double-click on the file called "Loader.exe."

    When the list of checkboxes, make sure and check the box for BlackBerry Maps.  Then complete the installation.

  • Federal State of emergency - the storm tropical Debby (by calling everything and anyone - Microsoft HELPS!)

    I was on the phone just before tropical storm Debby error due to installation of Windows Update that has been booked to win 8 Preview (does not apply to Windows 7 - all versions) and attempts to roll back has been a complete failure, even if I had backup, because as the registry keys. Couldn't do anything except reinstall Windows 7 Ultimate all over again.

    While I still had power & cable (internet, phone, TV) - tropical storm Debby aka TS Debby took its toll with its constant winds of 50 mph and at night which was "from here to eternity" as we had here nearly 33 inches of rain only, then only officially declared 'State of emergency' by the Governor, and then by the President and then later changed in federal State of emergency due to the extreme damage - tornadoes, floods, damages, death (almost $ 1 billion in damages for the 1st time so there are talks to remove the name of Debby due damages and it will be the first non-ouragan retired). Even at this stage, I have no idea how internet I have before I lose it or power.

    For all that it's like a child playing with a light swich here - on and off, on and off--enough to drive one batty and to the top of the wall. enough, it was that we were without electricity and cable for 33 + hours until power was restored and close to 40 + hours before cable was restored, but even then, he comes and goes like a crazy lunatic.

    What makes it all is the worst, I was in the middle of reinstalling Windows.

    Please tell me I was wrong in trying to install offline when I had the power without the cable, because I stored files (saved) and try to reinstall without cable (as it was out again - no phone, internet or television) as long as several days. * sigh * nothing to see here with more rain, but even with power outages, at least I could go back and do it again (Yes, he was crazy and I must be crazy to do that, but I was determined to get Windows 7 64-bit OS operational return). Everything I had I have has not need internet connection went through just peachy and small files which didn't need internet connection has been set aside.

    Well, I feel like a total (another word for a donkey goes here) - I have some that are pre - SP 1 and some that are SP 1 and my Windows Update doesn't have the slightest idea what to do here. * Blush *.

    I am to be punished for my hopelessness here?  I hope I can win any return because of what I learned at last, the cable arrives today in our region to fix and repair this area (YAY! All the time! But then again - what the co POWER? What of them? Why don't they come too at the same time? HMMM?)

    PLEASE DON'T TELL ME I HAVE TO REINSTALL WINDOWS 7 ULTIMATE ALL OVER AGAIN...

    I've exhausted everything in an attempt to piece together the puzzle, but it doesn't work, it's like the old adage 'put the cart before the horse' - Wahhh!

    :(

    I did FIX IT so many times this DIFFICULTY IT won't FIX IT because he has no idea what to do.  I ran SFC/SCANNOW to CHKDSK/F - in the CMD prompt - you name, I did this - and he can't.

    Enough enough, that I've had to endure this unusual Debby TS as she was, and all this mess and now it seems so my desperation made a mess of my Win 7, all the while and yet I followed what Microsoft Technical Support advised me to reinstall.

    I sincerely hope that others have endured there not like what I did, but I feel bad enough for them who have lost everything - because I'm same housing (we're rotating people here, because they have been completely inundated, lost everything and the help is extremely slow, if something arises here.) For those who want to know... even among those who are not yet known to be a floodplain have flooded too - summer all the way up to halfway to the walls or even higher, taking everyone by surprise total due to rain of Records, the constant winds of one-way that would change not its direction... that would allow not only the valves (dams) to open where they even had called the US Army and other military personnel in other areas to open it. Once they had managed to open it up to halfway, already not flooded areas, now they flooded new areas, making the situation even worse - no choice but to close the doors but two in a place jammed because of the force of the water and winds up in a way that made it virtually impossible, even in manual mode. They had managed to get closure on less than half, but still it flooded areas where flooding is unknown. Regarding tornadoes - we had EF-1 and EF 2, many of those who have had lives, including the famous where the mother protected her own children who took his own life, but spared his own children, but one was found not far offshore, shocking everyone - this city has a special fund to rebuild the House and take care of children , for home theirs one for their mother, she will be buried there. (According to the Mayor, who has judged good and authorized as a memorial, but also a commemorative bronze marker will be nearby. "But it was according to the journalist who was there by reading what the script was and what the villagers said). It's tragic and images itself was much too graphic to display, all donations would be "This is the house that Jack built" like the old nursery rhyme would be. Then there are many who died in the flood, the two men and worse, animals - especially in the kennels and shelters; because it was virtually impossible for anyone to access, even for them, and unfortunately, many themselves are drowned, but those who remained alive were abducted and taken to a very special place. As for humans, we don't know if all of them were in the Gulf of the Mexico, while some are called and reported, others have been found, but the high chances are that they were shot out by excessive flood stage: streams, rivers, marshes, etc... and the force of the water so that many have tried to flee brought them in and they drowned, and at the point where they were found was shining in the Gulf of Mexico where water pours on to. Some of them have been found, as indicated, are drowned in lakes, the reasons were unknown. All around this area, it's really sad. With respect to damages, overturned oak trees 100 years and more, for the first time "up-holes", something that nobody has ever heard or seen before, sinkholes are everywhere, but the holes to the top?  What is - c?  When Earth goes up - for the first taken was actually in the middle of a road of mini-major before a vehicle did not it and * BOOM * ploughed straight through, and top-hole resembles a huge massive donkey back x 100 size up from the ground. There have been other holes to the top not only in roads, but in the middle of a dwelling house for a long time, in the middle of the backyard property, there is a madness so here more strange things have occurred. Many wonders why these old oak trees tumble much more than all the other trees, while others cracked and sank into the houses, cars, business - still unknown yet. the strangest ever was: the impact of the winds were so large that this hotel (the very who has endured so many hurricanes of category 5, including back-to-back hurricanes) really scared the daylights living/night lights out tenants, owners and the nights... He literally ripped OFF the roof and slammed right on vehicles! (No tornado or funnel) Left a huge hole in the roof, where I suppose one can say now "Sky Light View. :-/  Everyone, including the natives like me who are pioneers and those who originate from Colon - were all mortified! How does a wind turbine like this rip literally a wide roof is the question? No matter the question - there are enough photos views which can be found if moderators would allow him to the www.baynews9.com/ where you can see later and the flood is ALWAYS THERE and pictures here are TS Debby damage - but Word of warning, what you see are actual photos and NOW you will understand why it is stated in counties such as the FEDERAL EMERGENCY... (only in specific counties - not all, mine is in this category...) is this link here: http://www.baynews9.com/content/news/baynews9/news/article.html/content/news/articles/bn9/2012/6/29/photo_gallery_bay_ne.html news which includes JUST WHAT DEPTH the flood was and TORNADOES are actually demonstrated and Word of caution - damages shown there are so serious - it's SHOCKING and you would think it was a HURRICANE but still... it was only a tropical storm!    Here is a video of a tornado moving through Pass-A-Grille, the very one who destroyed the famous Marina and then some.  :(  ( http://www.baynews9.com/content/news/baynews9/video.html?clip=http://static.baynews9.com/newsvideo/bn9/web_video/tornado_vo_web.f4v&vtitle=Tornado%20moves%20through%20Pass-A-Grill)

    PS: Thanks Microsoft & moderators to have me post this info at all on TS Debby so everyone can see close up and updated as well and that everything that happens here, I like it a lot... especially for the members of Zune and other Members of Microsoft, including those in beta at WinEqual - at least you will know what happened to everyone and where... it's not just me that's mainly in the Tampa Bay area.

    VIEW ALL: BEWARE OF SCAMS ALL TO COLLECT DONATIONS FOR THE VICTIMS OF THE TROPICAL STORM DEBBY WHO ASK FOR YOUR SSN, DOB, PERSONAL INFORMATION, INCLUDING YOUR CHECKING ACCOUNT AND ROUTING INFORMATION - IF POSSIBLE GET THEIR INFORMATION, PHONE NUMBER (IF YOU HAVE CALLER ID)... NOTIFY YOUR LAW ENFORCEMENT AGENCY AS SOON AS POSSIBLE. IT IS A SCAM AND FRAUD!  RED CROSS, UNITED WAY AND THOSE REPRESENTING "AS LONG AS THE U.S. GOVERNMENT OR THE FEDERAL GOVERNMENT HELP OR ASSISTANCE" - OR WORSE, "ON BEHALF OF PRESIDENT OBAMA - BLAH, BLAH, BLAH...". "- IT IS A SCAM! IF PLEASE IMMEDIATELY COLLECT ALL THE INFORMATION ON THEIR PART AND DOES NOT PROVIDE THE INFORMATION, IF YOU GET INFORMATION BY E-MAIL, EVEN ONCE - INFORM YOUR LOCAL AS SOON AS POSSIBLE LAW ENFORCEMENT AGENCY!  THIS TYPE OF SCAM HAS STARTED TO BECOME FULL BREATH SINCE THE PRESIDENT SAID FEDERAL GRANT TO THIS AREA AND SWINDLERS AND FRAUD AS WELL AS BOILER ROOMS (FLY-BY-NIGHTERS) - ARE TAKING ADVANTAGE OF THIS STRENGTH!

    MICROSOFT - IF POSSIBLE - PLEASE POST THIS ALERT ON MSN, HOTMAIL, AND AL - INCLUDING YOUR HOMEPAGE, ETC. - IT IS A SCAM AND PEOPLE MUST BE COMMUNICATED AS SOON AS POSSIBLE! TYVM!

    Sincerely,

    Sharon - who is stuck here in the Middle problem with Win 7 and made a (bleep) self-esteem trying something without internet!

    :-/

    TYVM Microsoft and please moderators - I appreciate your cooperation as well!   :)

    Here's the official statement from the statement of the President of the federal State of emergency and where it all started: (links are to web design news page)

    http://www.baynews9.com/content/news/baynews9/news/article.HTML/content/news/articles/CFN/2012/6/26/debby_obama_calls_sc.html

    Obama declares disaster area in Florida after Debby

    http://www.baynews9.com/content/news/cfnews13/news/article.HTML/content/news/articles/CFN/2012/7/3/obama_declares_flori.html

    (you would be living in this House?)

    Hello

    1. What is the complete error message you get with Windows Update?
    2. Have you been able to run Windows Update throughout, without interruption?

    What I did was liquidated with this new OS system in mid-June 2012, given that I backup everything, literally - and after an argument with MS Office Rep who implied I had home and student 2010 and unprofessional more (?) - had to roll back through the disks I had and finally found one that worked... it is in offline mode.

    * sigh *.

    It is absurd given MS Office telling me what I have and what I am not, because I was about to call to my credit card (when JP Morgan and Chase had bought the Wa - Mu, but it is still on the records - I contacted them and rechecked, there he stood, paid - MS Office Professional Plus 2010 - but it was damaged;) MS Office was to provide me with a different key and different download due to a corrupt link and the wrong key. Sigh - and which has been studied; Link corrected and new and key had this time with notice as well as Remote Assistance with security bulletins to make copies of the download on flash, DVD-R, etc. - as well as the key; what I've done as well). While the link is annoying, but that's all back and installed where it belongs. Oh for the love of Pete...

    Want to know how far in my files that I had to go to roll back? Way back around the month of March 2010! It's downright absurd - and then put all the puzzles again together, while off line... is absolutely no problem. ANY reason as the old adage goes "fault of a horseshoe the battle is lost... » ; It was because of a critical Windows 7 Ultimate in Windows files were missing and without messing with TM (Trusted Installer); It was a return back, I had to go to get these reviews of the operating system of the files back to where they belong. * sigh *.

    (1) it is not surprising that Windows Update has resulted a failure

    (2) I found out reviewing the other disks that they too, missing files very critical OS, the time when I started to have problems with Windows, Windows Update MS Office - those very files were missing and!

    True, Microsoft (Ohio) sent me a SP 1 of what I had - disc set; to use to install on the motherboard new after literally destroy the card mother original; but it was interesting to the excessive Freedman and the fact that they had marked my State as United States when we were part of the United States before Ohio was - worse, SP 1 edition they had sent me was the European Version (UK) and I found myself with all sorts of problems from there.  Initially for the life of me could not understand why I get all these United Kingdom version this and a European Version of this and worse still have a lot of my Programs stripped Microsoft (I know overseas limited); but it cause my Windows Update is not not able to scan my OS and finally has been installing 64-bit on x 86 (32-bit) on a new motherboard I had just installed in Dec 2011. * sigh *-Microsoft Service Tickets, nobody has been able to reproduce the problems or solve until I realized what they gave me a European Version and the paid postage would be correct if sent overseas mail not the first class in the USA... * sigh *.

    Then turned around and advised to reinstall Windows 7 Ultimate disc of what I already have, but the problem is - my motherboard was ruined; for the European Version is wrecked havoc on everything on my OS completely so I found myself with nothing but had until June to constitute with an OS 64 bit for anyone or sold all x 86 platforms more (32-bit).

    It was really hard to sort this and try to work with Microsoft and everybody else because they have closed the case prematurely when tropical storm Debby hit and I had surgery. With light, turn off / cable, cable - making it very exceeding difficult for anyone (even me) to download whatever it is entirely or if it was, it has been altered due to the interruption of the cable at any given time. Roll back, was a constant option that would drive one to the top of the wall as well as for the support it had been closed even if the region is under a State of emergency federal? It was as if we put the cart before the horse literally.

    With a brand new operating system, having to do it all on my own; I feel insulted and insinuated. Honestly, it's crazy, really, really crazy - they are still working on my phone that still does not work properly or not at all. But for me, on a new 64 bit OS having to go back on an x 86 platform completely new in March 2010 disc for this criticism of missing files in Windows, Win32, WinSys? In other critical Windows files else where - is a tad bit too.  I tell you, I'm surprised I didn't lose the presence of mind because of this crazy here.

    So, this was the ANSWER.

  • Add a link - please help

    Hello.

    Please can someone help me.  I'm working on the update to a flash file and I need to add a hyperlink to a word but I'm having no luck.  Some may help, the forest of the code is:

    but6 = 'renewable energy - solar panels. "

    but6bt = ' installation and the use of the technologies of renewable energy such as wind turbines, solar panels and biomass heaters offer an alternative to fossil fuels. "  It will reduce the energy bill and your homes CO2 and emissions according to the technology, you could even you paid for energy generate or take advantage of the plans that offer some companies. Read more here«;»

    Here, the bold Word is the word that I need to add a hyperlink to.  does anyone know how to do this?

    Thank you

    You does not fix what I said needed fixing.  The link must be in quotes from the assignment of text, and the quotes inside the link must be reduced...

    but5bt = "seal all gaps and draughts around baseboards and between boards. Hardwood floors can be detached by lifting the floor and installation of supported by a net mineral wool insulation between the joists. More information, click http://www.energysavingtrust.org.uk/Home-improvements-and-products/Home-insulation-glazing/hauling of water-proofing\"> here";

  • Procedure failed when using bulk collect clause and works with the cursor

    Hi all

    I use "BULK collect into" clause in my procedure and it is a failure after 21 minutes and gives the error "end of file communication channel.
    After that this error comes when I tried to connect the database it gives following error.

    ORA-01034 - Oracle is not available.
    ORA - 27101-shared memory realm does not exist.
    SVR4 error: 2: no such file or directory.

    When I use the cursor instead of the COLLECTION in BULK IN the clause, it runs successfully.

    Following the code works with the slider.
    procedure work_kiosk_full (an_jobid in number, ac_sqlcode out varchar2, ac_sqlerrm out varchar2) is

    ld_curr_time Date;

    cursor cur_work_kiosk is
    Select distinct jt.jt_id AS jt_id,
    NVL ((ROUND ((jt_date_completed-jt_date_requested) * 24, 2)))
    ),
    0
    ) AS actual_hrs_to_complete,
    NVL ((ROUND ((jt_date_responded-jt_date_requested) * 24, 2)))
    ),
    0
    ) AS actual_hrs_to_respond,
    peo1.peo_name AS agent_name,
    peo1.peo_user_name AS asagent_soe_id,
    Le.lglent_desc AS ap_system,
    "" AS assign_work_request_comment,
    DECODE (jt.jt_bill_id,
    138802, 'BILLABLE CLIENT. "
    138803, "CONTRACTED"
    "138804, ' BILLABLE IN-HOUSE."
    NULL, ' '
    ) Billable.
    BL.bldg_name_cc BUILDING, bl.bldg_id_ls AS building_id,
    DECODE (bl.bldg_active_cc,
    'Y', 'ACTIVE',
    'INACTIVE '.
    ) AS building_status,
    DECODE (jt.jt_wrk_cause_id,
    141521, "STANDARD WEAR."
    141522, "NEGLIGENCE."
    141523, "ACCIDENTAL."
    141524, "MECHANICAL FAILURE."
    141525, "CONTROL."
    141526, "VANDAL."
    141527, 'STANDARD ',.
    141528, "WORK PROJECT",.
    6058229, "TEST."
    NULL, ' '
    ) AS cause_type,
    ' ' AS comments, peo3.peo_name AS completed_by,
    JT.jt_requestor_email AS contact_email,
    JT.jt_requestor_name_first
    || ' '
    || JT.jt_requestor_name_last AS contact_name,
    JT.jt_requestor_phone AS contact_phone,
    CC.cstctrcd_apcode AS corp_code,
    CC.cstctrcd_code AS cost_center,
    JT.jt_date_closed AS date_closed,
    JT.jt_date_completed AS date_completed,
    JT.jt_date_requested AS date_requested,
    JT.jt_date_responded AS date_responded,
    JT.jt_date_response_ecd AS date_response_ecd,
    JT.jt_date_scheduled AS date_scheduled,
    DECODE (jt.jt_def_id,
    139949, "WTG VENDOR RESPONSE."
    139950, "WAITING ON PARTS."
    139951, "AVAILABILITY OF THE HAND ŒUVRE."
    139952, "WORK DEFERRED-HI PRI."
    139953, "APPROVAL OF WIND TURBINES."
    139954, "FUNDING."
    139955, "ACCESS DENIED."
    139956, "WTG MATERIAL."
    NULL, ' '
    ) AS deferral_reason,
    JT.jt_description as description,
    JT.jt_date_resched_ecd IN the development of the young child,
    FMG.facility_manager AS facility_manager,
    FL.floors_text AS FLOOR, gl.genled_desc AS general_ledger,
    '' AS kiosk_date_requested,' ' AS kiosk_dispatch_confirmed.
    "" AS kiosk_dispatched,
    EQP.equip_customer_code AS linked_equipment_alias,
    EQP.equip_id AS linked_equipment_id,
    EQP.equip_text AS linked_equipment_name,
    DECODE (jt_originator_type_id,
    1000, "PROJECT MOVE REQUEST."
    138834, "CUSTOMER OPEN CORRECTION."
    138835, "OPEN REQUEST CUSTOMER."
    138836, "CORRECTIVE MAINTENANCE",.
    138837, "BOOKING CONFERENCE ROOM."
    138838, "PROJECT INITIATED REQUEST."
    138839, "PLANNED PREVENTATIVE MAINTENANCE."
    138840, "COULD START FREE APPLICATION."
    NULL, ' '
    ) AS originator_type,
    "" AS payment_terms, priority_text AS priority_code,
    swoty.sworktype_text AS problem_type,
    Prop.property_name_cc as a property,
    JT.jt_cost_quote_total AS quote_total,
    par.levels_name IN the region,
    DECODE (jt.jt_repdef_id,
    141534, 'ADJUSTED SETTING. "
    141535, "THE TRAINING OF THE END,"
    141536, "NEW REQUEST"
    141537, "NO INVESTIGATION OF REPAIR."
    141538 "REPLACED PARTS."
    141539, 'REPLACE EQUIPMEN.
    1000699, "NEW REQUEST"
    NULL, ' '
    ) AS repair_definitions,
    JT.jt_repairdesc AS MARKED_COR,
    JT.jt_requestor AS applicant, ' ' AS requestor_cost_center.
    JT.jt_requestor_email AS requestor_email,
    JT.jt_requestor_name_first AS requestor_name,
    JT.jt_requestor_phone AS requestor_phone,
    "" LIKE response_time, rm.room_name_cc ROOM,
    P1.peo_provider_code1 AS service_provider,
    P1.peo_address_1 AS service_provider_address,
    peocity.city_text service_provider_city,
    P1.peo_provider_code1 AS service_provider_code,
    peocity.city_country_name AS service_provider_country,
    peocur.currency_text AS service_provider_currency,
    P1.peo_name AS service_provider_description,
    P1.peo_dispatch_method AS serv_prov_dispatc_hmethod,
    P1.peo_rate_double AS serv_prov_double_time_rate,
    P1.peo_email AS service_provider_email,
    P1.peo_emergency_phone AS serv_prov_emergency_phone,
    P1.peo_fax AS service_provider_fax_number,
    P1.peo_home_phone AS service_provider_home_phone,
    P1.peo_rate_hourly AS service_provider_hourly_rate,
    P1.peo_title AS service_provider_job_title,
    P1.peo_method_id AS service_provider_method,
    P1.peo_cell_phone AS service_provider_mobile_phone,
    P1.peo_pager AS service_provider_pager,
    P1.peo_rate_differential AS service_provider_rates,
    P1.peo_rate_differential AS ser_prov_shift_differential,
    peocity.city_state_prov_text AS serv_prov_state_province,
    DECODE (p1.peo_active,
    'Y', 'ACTIVE',
    'INACTIVE '.
    ) AS service_provider_status,
    P1.peo_url AS serv_prov_web_site_address,
    P1.peo_phone AS service_provider_work_phone,
    P1.peo_postal_code AS serv_prov_zip_postal_code, ' ' shift, as.
    ' ' AS skill,.
    DECODE (jt.jt_bigstatus_id,
    138813, «NEWS»,
    138814 "PENDING."
    138815, 'OPEN ',.
    138816, "END."
    138817, 'CLOSED ',.
    138818, "CANCELLED."
    NULL, ' '
    ) The STATUS,
    Lev.levels_name IN the subregion, ' ' IN the trade.
    P1.peo_ls_interface_code1 AS vendor_id,
    P1.peo_fax AS vendor_purchasing_fax,
    P1.peo_vendor_site_code AS vendor_sitecode,
    JT.jt_id AS vendor_ticket, p1.peo_name AS vendor_companyname,
    JT.jt_requestor_vip AS vip, wo.wo_id AS work_order_no,
    JT.jt_id AS work_request,
    JT.jt_class_id AS work_request_class,
    woty.worktype_text AS work_type, ' ' AS wr_cost.
    JT.jt_description AS wr_description,
    "" AS wr_dispatch_method,
    DECODE (jt.jt_bigstatus_id,
    138813, «NEWS»,
    138814 "PENDING."
    138815, 'OPEN ',.
    138816, "END."
    138817, 'CLOSED ',.
    138818, "CANCELLED."
    NULL, ' '
    ) AS wr_status,
    ctrY.country_name as a country
    OF citi.jobticket jt,.
    Citi.Property prop,
    Citi.Bldg bl,
    Citi.bldg_levels bldglvl,
    civil LEVEL lev,
    civil by LEVELS.
    (SELECT crstools.stragg (peo_name) facility_manager,
    bldgcon_bldg_id
    OF citi.bldg_contacts, citi.people
    WHERE bldgcon_peo_id = peo_id
    AND IN bldgcon_contype_id (40181, 10142)
    FMG GROUP BY bldgcon_bldg_id),
    Citi.floors, fl,
    Citi.Room rm,
    Citi.general_ledger gl,
    the Citi.legal_entity
    Citi.cost_center_codes cc,
    Citi.Equipment eqp,
    Citi.workType woty,
    Citi.subworktype swoty,
    Citi.work_order wo,
    Jtwo Citi.jt_workers,
    Citi.Priority,
    Ctry Citi.Country,
    Citi.People p1,
    Citi.People peo3,
    Citi.People peo1,
    Citi.City peocity,
    Citi.Currency peocur
    WHERE jt.jt_bldg_id = bl.bldg_id
    AND bl.bldg_id = bldglvl.bldg_levels_bldg_id
    AND bldglvl.bldg_levels_levels_id = lev.levels_id
    AND lev.levels_parent = par.levels_id (+)
    AND prop.property_id = bl.bldg_property_id
    AND bl.bldg_active_ls <>' n
    AND jt.jt_floors_id = fl.floors_id (+)
    AND jt.jt_room_id = rm.room_id (+)
    AND jt.jt_bldg_id = fmg.bldgcon_bldg_id (+)
    AND jt.jt_genled_id = gl.genled_id (+)
    AND gl.genled_lglent_id = le.lglent_id (+)
    AND jt.jt_cstctrcd_id = cc.cstctrcd_id (+)
    AND jt.jt_equip_id = eqp.equip_id (+)
    AND jt.jt_id = jtwo.jtw_jt_id (+)
    AND jt.jt_worktype_id = woty.worktype_id (+)
    AND jt.jt_sworktype_id = swoty.sworktype_id (+)
    AND jt.jt_wo_id = wo.wo_id
    AND jt.jt_priority_id = priority_id (+)
    - AND jt.jt_date_requested > = ADD_MONTHS (SYSDATE,-12)
    AND jt.jt_last_update > = ADD_MONTHS (ld_curr_time-12)
    AND bl.bldg_country_id = ctry.country_id
    AND jtwo.jtw_peo_id = p1.peo_id (+)
    AND p1.peo_city_id = peocity.city_id (+)
    AND jt.jt_completed_by_peo_id = peo3.peo_id (+)
    AND p1.peo_rate_currency_id = peocur.currency_id (+)
    AND jt.jt_agent_peo_id = peo1.peo_id (+);


    BEGIN
    run immediately 'truncate table crstools.drt_bom_work_kiosk;
    Select sysdate in double ld_curr_time;
    FOR cur_rec in cur_work_kiosk LOOP
    IF MOD (cur_work_kiosk % rowcount, 10000) = 0 then
    COMMIT;
    END IF;

    INSERT INTO crstools.drt_bom_work_kiosk
    (JT_ID
    ACTUAL_HRS_TO_COMPLETE
    ACTUAL_HRS_TO_RESPOND
    AGENT_NAME
    ASAGENT_SOE_ID
    AP_SYSTEM
    ASSIGN_WORK_REQUEST_COMMENT
    BILLABLE
    BUILDING
    BUILDING_ID
    BUILDING_STATUS
    CAUSE_TYPE
    COMMENTS
    COMPLETED_BY
    CONTACT_EMAIL
    CONTACT_NAME
    CONTACT_PHONE
    CORP_CODE
    COST_CENTER
    DATE_CLOSED
    DATE_COMPLETED
    DATE_REQUESTED
    DATE_RESPONDED
    DATE_RESPONSE_ECD
    DATE_SCHEDULED
    DEFERRAL_REASON
    DESCRIPTION
    DPE
    FACILITY_MANAGER
    FLOOR
    GENERAL_LEDGER
    KIOSK_DATE_REQUESTED
    KIOSK_DISPATCH_CONFIRMED
    KIOSK_DISPATCHED
    LINKED_EQUIPMENT_ALIAS
    LINKED_EQUIPMENT_ID
    LINKED_EQUIPMENT_NAME
    ORIGINATOR_TYPE
    PAYMENT_TERMS
    PRIORITY_CODE
    PROBLEM_TYPE
    PROPERTY
    QUOTE_TOTAL
    REGION
    REPAIR_DEFINITIONS
    MARKED_COR
    APPLICANT
    REQUESTOR_COST_CENTER
    REQUESTOR_EMAIL
    REQUESTOR_NAME
    REQUESTOR_PHONE
    RESPONSE_TIME
    ROOM
    SERVICE_PROVIDER
    SERVICE_PROVIDER_ADDRESS
    SERVICE_PROVIDER_CITY
    SERVICE_PROVIDER_CODE
    SERVICE_PROVIDER_COUNTRY
    SERVICE_PROVIDER_CURRENCY
    SERVICE_PROVIDER_DESCRIPTION
    SERV_PROV_DISPATC_HMETHOD
    SERV_PROV_DOUBLE_TIME_RATE
    SERVICE_PROVIDER_EMAIL
    SERV_PROV_EMERGENCY_PHONE
    SERVICE_PROVIDER_FAX_NUMBER
    SERVICE_PROVIDER_HOME_PHONE
    SERVICE_PROVIDER_HOURLY_RATE
    SERVICE_PROVIDER_JOB_TITLE
    SERVICE_PROVIDER_METHOD
    SERVICE_PROVIDER_MOBILE_PHONE
    SERVICE_PROVIDER_PAGER
    SERVICE_PROVIDER_RATES
    SER_PROV_SHIFT_DIFFERENTIAL
    SERV_PROV_STATE_PROVINCE
    SERVICE_PROVIDER_STATUS
    SERV_PROV_WEB_SITE_ADDRESS
    SERVICE_PROVIDER_WORK_PHONE
    SERV_PROV_ZIP_POSTAL_CODE
    MAJ
    SKILLS
    STATUS
    SUBREGION
    TRADE
    VENDOR_ID
    VENDOR_PURCHASING_FAX
    VENDOR_SITECODE
    VENDOR_TICKET
    VENDOR_COMPANYNAME
    VIP
    WORK_ORDER_NO
    WORK_REQUEST
    WORK_REQUEST_CLASS
    WORK_TYPE
    WR_COST
    WR_DESCRIPTION
    WR_DISPATCH_METHOD
    WR_STATUS
    COUNTRY
    CREATE_DATE
    )
    VALUES
    (cur_rec.jt_id
    cur_rec, ACTUAL_HRS_TO_COMPLETE
    cur_rec, ACTUAL_HRS_TO_RESPOND
    cur_rec, AGENT_NAME
    cur_rec, ASAGENT_SOE_ID
    cur_rec, AP_SYSTEM
    cur_rec, ASSIGN_WORK_REQUEST_COMMENT
    BILLABLE cur_rec.
    cur_rec, BUILDING
    cur_rec, BUILDING_ID
    cur_rec, BUILDING_STATUS
    cur_rec, CAUSE_TYPE
    cur_rec.COMMENTS
    cur_rec.COMPLETED_BY
    cur_rec, CONTACT_EMAIL
    cur_rec, CONTACT_NAME
    cur_rec, CONTACT_PHONE
    cur_rec, CORP_CODE
    cur_rec, COST_CENTER
    cur_rec, DATE_CLOSED
    cur_rec, DATE_COMPLETED
    cur_rec, DATE_REQUESTED
    cur_rec, DATE_RESPONDED
    cur_rec, DATE_RESPONSE_ECD
    cur_rec, DATE_SCHEDULED
    cur_rec, DEFERRAL_REASON
    cur_rec, DESCRIPTION
    cur_rec, DEVELOPMENT OF THE YOUNG CHILD
    cur_rec, FACILITY_MANAGER
    cur_rec, FLOOR
    cur_rec, GENERAL_LEDGER
    cur_rec, KIOSK_DATE_REQUESTED
    cur_rec, KIOSK_DISPATCH_CONFIRMED
    cur_rec, KIOSK_DISPATCHED
    cur_rec, LINKED_EQUIPMENT_ALIAS
    cur_rec, LINKED_EQUIPMENT_ID
    cur_rec, LINKED_EQUIPMENT_NAME
    cur_rec, ORIGINATOR_TYPE
    cur_rec, PAYMENT_TERMS
    cur_rec, PRIORITY_CODE
    cur_rec, PROBLEM_TYPE
    cur_rec, PROPERTY
    cur_rec, QUOTE_TOTAL
    cur_rec, REGION
    cur_rec, REPAIR_DEFINITIONS
    cur_rec, MARKED_COR
    cur_rec, APPLICANT
    cur_rec, REQUESTOR_COST_CENTER
    cur_rec, REQUESTOR_EMAIL
    cur_rec, REQUESTOR_NAME
    cur_rec, REQUESTOR_PHONE
    cur_rec, RESPONSE_TIME
    cur_rec, ROOM
    cur_rec, SERVICE_PROVIDER
    cur_rec, SERVICE_PROVIDER_ADDRESS
    cur_rec, SERVICE_PROVIDER_CITY
    cur_rec, SERVICE_PROVIDER_CODE
    cur_rec, SERVICE_PROVIDER_COUNTRY
    cur_rec, SERVICE_PROVIDER_CURRENCY
    cur_rec, SERVICE_PROVIDER_DESCRIPTION
    cur_rec, SERV_PROV_DISPATC_HMETHOD
    cur_rec, SERV_PROV_DOUBLE_TIME_RATE
    cur_rec, SERVICE_PROVIDER_EMAIL
    cur_rec, SERV_PROV_EMERGENCY_PHONE
    cur_rec, SERVICE_PROVIDER_FAX_NUMBER
    cur_rec, SERVICE_PROVIDER_HOME_PHONE
    cur_rec, SERVICE_PROVIDER_HOURLY_RATE
    cur_rec, SERVICE_PROVIDER_JOB_TITLE
    cur_rec, SERVICE_PROVIDER_METHOD
    cur_rec, SERVICE_PROVIDER_MOBILE_PHONE
    cur_rec, SERVICE_PROVIDER_PAGER
    cur_rec, SERVICE_PROVIDER_RATES
    cur_rec, SER_PROV_SHIFT_DIFFERENTIAL
    cur_rec, SERV_PROV_STATE_PROVINCE
    cur_rec, SERVICE_PROVIDER_STATUS
    cur_rec, SERV_PROV_WEB_SITE_ADDRESS
    cur_rec, SERVICE_PROVIDER_WORK_PHONE
    cur_rec, SERV_PROV_ZIP_POSTAL_CODE
    cur_rec, UPDATE
    cur_rec SKILL.
    cur_rec, STATUS
    cur_rec subregion.
    cur_rec, TRADE
    cur_rec, VENDOR_ID
    cur_rec, VENDOR_PURCHASING_FAX
    cur_rec, VENDOR_SITECODE
    cur_rec, VENDOR_TICKET
    cur_rec, VENDOR_COMPANYNAME
    cur_rec, VIP
    cur_rec, WORK_ORDER_NO
    cur_rec, WORK_REQUEST
    cur_rec, WORK_REQUEST_CLASS
    cur_rec, WORK_TYPE
    cur_rec, WR_COST
    cur_rec, WR_DESCRIPTION
    cur_rec, WR_DISPATCH_METHOD
    cur_rec, WR_STATUS
    cur_rec, COUNTRY
    ld_curr_time
    );
    END LOOP;

    COMMIT;

    exception
    while others then
    Rollback;
    dbms_output.put_line('SQLCODE:'||) SQLCODE. "Error :'|| SQLERRM);

    end work_kiosk_full;

    Note: total record inserted 849000.

    The same code does not work with big collect in would adopt.

    Please help me why this is happening.


    Thanks and greetings
    Shyam ~.

    Shyam,

    I agree with Billy.

    Why are you not using an INSERT..SELECT ?
    
    Also, what are you trying to achieve by
    - incremental commits?
    - copying data from one table to another (using expensive I/O)?
    - using dynamic DML?
    
    Most of these approaches are typically wrong - and not recommended for scalable and performant Oracle applications.
    

    I could see you using a CURSOR for LOOP if you change the data inserted so that you could not encapsulate the changes in a query, but you do an insert in right in the table of your cursor. A much more effective way would be to use the following changes I made to your code sample:

    PROCEDURE WORK_KIOSK_FULL(AN_JOBID   IN NUMBER,
                              AC_SQLCODE OUT VARCHAR2,
                              AC_SQLERRM OUT VARCHAR2) IS
    BEGIN
       EXECUTE IMMEDIATE 'truncate table crstools.drt_bom_work_kiosk';
    
       /* Note:  The APPEND hint forces a Direct Path INSERT (see Link below code sample) and is combined with the NOLOGGING Hint */
       /*        To dramtically increase performance.  The Direct Path INSERT inserts records above the High-Water Mark on the table. */
    
       INSERT /*+ APPEND NOLOGGING */ INTO CRSTOOLS.DRT_BOM_WORK_KIOSK
          (JT_ID
          ,ACTUAL_HRS_TO_COMPLETE
          ,ACTUAL_HRS_TO_RESPOND
          ,AGENT_NAME
          ,ASAGENT_SOE_ID
          ,AP_SYSTEM
    --      ,ASSIGN_WORK_REQUEST_COMMENT     /* I commented out this COLUMN because it doesn't make sense to me to insert */
          ,BILLABLE                          /* a couple of space characters into a table.   If the intent is to leave the column NULL */
          ,BUILDING                          /* don't include it in your INSERT statement and it will be NULL.  If there is a valid reason */
          ,BUILDING_ID                       /* for inserting the spaces, then remove the "line comments" from the insert and select statments */
          ,BUILDING_STATUS
          ,CAUSE_TYPE
    --      ,COMMENTS
          ,COMPLETED_BY
          ,CONTACT_EMAIL
          ,CONTACT_NAME
          ,CONTACT_PHONE
          ,CORP_CODE
          ,COST_CENTER
          ,DATE_CLOSED
          ,DATE_COMPLETED
          ,DATE_REQUESTED
          ,DATE_RESPONDED
          ,DATE_RESPONSE_ECD
          ,DATE_SCHEDULED
          ,DEFERRAL_REASON
          ,DESCRIPTION
          ,ECD
          ,FACILITY_MANAGER
          ,FLOOR
          ,GENERAL_LEDGER
    --      ,KIOSK_DATE_REQUESTED
    --      ,KIOSK_DISPATCH_CONFIRMED
    --      ,KIOSK_DISPATCHED
          ,LINKED_EQUIPMENT_ALIAS
          ,LINKED_EQUIPMENT_ID
          ,LINKED_EQUIPMENT_NAME
          ,ORIGINATOR_TYPE
    --      ,PAYMENT_TERMS
          ,PRIORITY_CODE
          ,PROBLEM_TYPE
          ,PROPERTY
          ,QUOTE_TOTAL
          ,REGION
          ,REPAIR_DEFINITIONS
          ,REPAIR_DESCRIPTION
          ,REQUESTOR
    --      ,REQUESTOR_COST_CENTER
          ,REQUESTOR_EMAIL
          ,REQUESTOR_NAME
          ,REQUESTOR_PHONE
    --      ,RESPONSE_TIME
          ,ROOM
          ,SERVICE_PROVIDER
          ,SERVICE_PROVIDER_ADDRESS
          ,SERVICE_PROVIDER_CITY
          ,SERVICE_PROVIDER_CODE
          ,SERVICE_PROVIDER_COUNTRY
          ,SERVICE_PROVIDER_CURRENCY
          ,SERVICE_PROVIDER_DESCRIPTION
          ,SERV_PROV_DISPATC_HMETHOD
          ,SERV_PROV_DOUBLE_TIME_RATE
          ,SERVICE_PROVIDER_EMAIL
          ,SERV_PROV_EMERGENCY_PHONE
          ,SERVICE_PROVIDER_FAX_NUMBER
          ,SERVICE_PROVIDER_HOME_PHONE
          ,SERVICE_PROVIDER_HOURLY_RATE
          ,SERVICE_PROVIDER_JOB_TITLE
          ,SERVICE_PROVIDER_METHOD
          ,SERVICE_PROVIDER_MOBILE_PHONE
          ,SERVICE_PROVIDER_PAGER
          ,SERVICE_PROVIDER_RATES
          ,SER_PROV_SHIFT_DIFFERENTIAL
          ,SERV_PROV_STATE_PROVINCE
          ,SERVICE_PROVIDER_STATUS
          ,SERV_PROV_WEB_SITE_ADDRESS
          ,SERVICE_PROVIDER_WORK_PHONE
          ,SERV_PROV_ZIP_POSTAL_CODE
    --      ,SHIFT
    --      ,SKILL
          ,STATUS
          ,SUBREGION
    --      ,TRADE
          ,VENDOR_ID
          ,VENDOR_PURCHASING_FAX
          ,VENDOR_SITECODE
          ,VENDOR_TICKET
          ,VENDOR_COMPANYNAME
          ,VIP
          ,WORK_ORDER_NO
          ,WORK_REQUEST
          ,WORK_REQUEST_CLASS
          ,WORK_TYPE
    --      ,WR_COST
          ,WR_DESCRIPTION
    --      ,WR_DISPATCH_METHOD
          ,WR_STATUS
          ,COUNTRY
          ,CREATE_DATE
          )
       VALUES
          (SELECT DISTINCT
              JT.JT_ID AS JT_ID
             ,NVL((ROUND((JT_DATE_COMPLETED - JT_DATE_REQUESTED) * 24,2)),0) AS ACTUAL_HRS_TO_COMPLETE
             ,NVL((ROUND((JT_DATE_RESPONDED - JT_DATE_REQUESTED) * 24,2)),0) AS ACTUAL_HRS_TO_RESPOND
             ,PEO1.PEO_NAME AS AGENT_NAME
             ,PEO1.PEO_USER_NAME AS ASAGENT_SOE_ID
             ,LE.LGLENT_DESC AS AP_SYSTEM
    --         ,' ' AS ASSIGN_WORK_REQUEST_COMMENT
             ,DECODE(JT.JT_BILL_ID,138802,'CLIENT BILLABLE'
                                  ,138803,'CONTRACTED'
                                  ,138804,'INTERNAL BILLABLE',NULL,' ') AS BILLABLE
             ,BL.BLDG_NAME_CC AS BUILDING
             ,BL.BLDG_ID_LS AS BUILDING_ID
             ,DECODE(BL.BLDG_ACTIVE_CC, 'Y', 'ACTIVE', 'INACTIVE') AS BUILDING_STATUS
             ,DECODE(JT.JT_WRK_CAUSE_ID,141521,'STANDARD WEAR AND TEAR'
                                       ,141522,'NEGLIGENCE'
                                       ,141523,'ACCIDENTAL'
                                       ,141524,'MECHANICAL MALFUNCTION'
                                       ,141525,'OVERSIGHT'
                                       ,141526,'VANDAL'
                                       ,141527,'STANDARD'
                                       ,141528,'PROJECT WORK'
                                       ,6058229,'TEST',NULL,' ') AS CAUSE_TYPE
    --         ,' ' AS COMMENTS
             ,PEO3.PEO_NAME AS COMPLETED_BY
             ,JT.JT_REQUESTOR_EMAIL AS CONTACT_EMAIL
             ,JT.JT_REQUESTOR_NAME_FIRST || ' ' ||JT.JT_REQUESTOR_NAME_LAST AS CONTACT_NAME
             ,JT.JT_REQUESTOR_PHONE AS CONTACT_PHONE
             ,CC.CSTCTRCD_APCODE AS CORP_CODE
             ,CC.CSTCTRCD_CODE AS COST_CENTER
             ,JT.JT_DATE_CLOSED AS DATE_CLOSED
             ,JT.JT_DATE_COMPLETED AS DATE_COMPLETED
             ,JT.JT_DATE_REQUESTED AS DATE_REQUESTED
             ,JT.JT_DATE_RESPONDED AS DATE_RESPONDED
             ,JT.JT_DATE_RESPONSE_ECD AS DATE_RESPONSE_ECD
             ,JT.JT_DATE_SCHEDULED AS DATE_SCHEDULED
             ,DECODE(JT.JT_DEF_ID,139949,'WTG VENDOR RESPONSE'
                                 ,139950,'WAITING ON PARTS'
                                 ,139951,'LABOR AVAILABILITY'
                                 ,139952,'DEFERRED- HI PRI WORK'
                                 ,139953,'WTG APPROVAL'
                                 ,139954,'FUNDING REQUIRED'
                                 ,139955,'ACCESS DENIED'
                                 ,139956,'WTG MATERIAL',NULL,' ') AS DEFERRAL_REASON
             ,JT.JT_DESCRIPTION AS DESCRIPTION
             ,JT.JT_DATE_RESCHED_ECD AS ECD
             ,FMG.FACILITY_MANAGER AS FACILITY_MANAGER
             ,FL.FLOORS_TEXT AS FLOOR
             ,GL.GENLED_DESC AS GENERAL_LEDGER
    --         ,' ' AS KIOSK_DATE_REQUESTED
    --         ,' ' AS KIOSK_DISPATCH_CONFIRMED
    --         ,' ' AS KIOSK_DISPATCHED
             ,EQP.EQUIP_CUSTOMER_CODE AS LINKED_EQUIPMENT_ALIAS
             ,EQP.EQUIP_ID AS LINKED_EQUIPMENT_ID
             ,EQP.EQUIP_TEXT AS LINKED_EQUIPMENT_NAME
             ,DECODE(JT_ORIGINATOR_TYPE_ID,1000,'PROJECT MOVE REQUEST'
                                          ,138834,'CUSTOMER INITIATED CORRECTION'
                                          ,138835,'CUSTOMER INITIATED REQUEST'
                                          ,138836,'CORRECTIVE MAINTENANCE'
                                          ,138837,'CONFERENCE ROOM BOOKING'
                                          ,138838,'PROJECT INITIATED REQUEST'
                                          ,138839,'PLANNED PREVENTIVE MAINTENANCE'
                                          ,138840,'SELF INITATED REQUEST',NULL,' ') AS ORIGINATOR_TYPE
    --         ,' ' AS PAYMENT_TERMS
             ,PRIORITY_TEXT AS PRIORITY_CODE
             ,SWOTY.SWORKTYPE_TEXT AS PROBLEM_TYPE
             ,PROP.PROPERTY_NAME_CC AS PROPERTY
             ,JT.JT_COST_QUOTE_TOTAL AS QUOTE_TOTAL
             ,PAR.LEVELS_NAME AS REGION
             ,DECODE(JT.JT_REPDEF_ID,141534,'ADJUSTED SETTING'
                                    ,141535,'TRAINING FOR END'
                                    ,141536,'NEW REQUEST'
                                    ,141537,'NO REPAIR REQUIR'
                                    ,141538,'REPLACED PARTS'
                                    ,141539,'REPLACE EQUIPMEN'
                                    ,1000699,'NEW REQUEST',NULL,' ') AS REPAIR_DEFINITIONS
             ,JT.JT_REPAIRDESC AS REPAIR_DESCRIPTION
             ,JT.JT_REQUESTOR AS REQUESTOR
    --         ,' ' AS REQUESTOR_COST_CENTER
             ,JT.JT_REQUESTOR_EMAIL AS REQUESTOR_EMAIL
             ,JT.JT_REQUESTOR_NAME_FIRST AS REQUESTOR_NAME
             ,JT.JT_REQUESTOR_PHONE AS REQUESTOR_PHONE
    --         ,' ' AS RESPONSE_TIME
             ,RM.ROOM_NAME_CC AS ROOM
             ,P1.PEO_PROVIDER_CODE1 AS SERVICE_PROVIDER
             ,P1.PEO_ADDRESS_1 AS SERVICE_PROVIDER_ADDRESS
             ,PEOCITY.CITY_TEXT SERVICE_PROVIDER_CITY
             ,P1.PEO_PROVIDER_CODE1 AS SERVICE_PROVIDER_CODE
             ,PEOCITY.CITY_COUNTRY_NAME AS SERVICE_PROVIDER_COUNTRY
             ,PEOCUR.CURRENCY_TEXT AS SERVICE_PROVIDER_CURRENCY
             ,P1.PEO_NAME AS SERVICE_PROVIDER_DESCRIPTION
             ,P1.PEO_DISPATCH_METHOD AS SERV_PROV_DISPATC_HMETHOD
             ,P1.PEO_RATE_DOUBLE AS SERV_PROV_DOUBLE_TIME_RATE
             ,P1.PEO_EMAIL AS SERVICE_PROVIDER_EMAIL
             ,P1.PEO_EMERGENCY_PHONE AS SERV_PROV_EMERGENCY_PHONE
             ,P1.PEO_FAX AS SERVICE_PROVIDER_FAX_NUMBER
             ,P1.PEO_HOME_PHONE AS SERVICE_PROVIDER_HOME_PHONE
             ,P1.PEO_RATE_HOURLY AS SERVICE_PROVIDER_HOURLY_RATE
             ,P1.PEO_TITLE AS SERVICE_PROVIDER_JOB_TITLE
             ,P1.PEO_METHOD_ID AS SERVICE_PROVIDER_METHOD
             ,P1.PEO_CELL_PHONE AS SERVICE_PROVIDER_MOBILE_PHONE
             ,P1.PEO_PAGER AS SERVICE_PROVIDER_PAGER
             ,P1.PEO_RATE_DIFFERENTIAL AS SERVICE_PROVIDER_RATES
             ,P1.PEO_RATE_DIFFERENTIAL AS SER_PROV_SHIFT_DIFFERENTIAL
             ,PEOCITY.CITY_STATE_PROV_TEXT AS SERV_PROV_STATE_PROVINCE
             ,DECODE(P1.PEO_ACTIVE, 'Y', 'ACTIVE', 'INACTIVE') AS SERVICE_PROVIDER_STATUS
             ,P1.PEO_URL AS SERV_PROV_WEB_SITE_ADDRESS
             ,P1.PEO_PHONE AS SERVICE_PROVIDER_WORK_PHONE
             ,P1.PEO_POSTAL_CODE AS SERV_PROV_ZIP_POSTAL_CODE
    --         ,' ' AS SHIFT
    --         ,' ' AS SKILL
             ,DECODE(JT.JT_BIGSTATUS_ID,138813,'NEW'
                                       ,138814,'PENDING'
                                       ,138815,'OPEN'
                                       ,138816,'COMPLETED'
                                       ,138817,'CLOSED'
                                       ,138818,'CANCELLED',NULL,' ') AS STATUS
             ,LEV.LEVELS_NAME AS SUBREGION
    --         ,' ' AS TRADE
             ,P1.PEO_LS_INTERFACE_CODE1 AS VENDOR_ID
             ,P1.PEO_FAX AS VENDOR_PURCHASING_FAX
             ,P1.PEO_VENDOR_SITE_CODE AS VENDOR_SITECODE
             ,JT.JT_ID AS VENDOR_TICKET
             ,P1.PEO_NAME AS VENDOR_COMPANYNAME
             ,JT.JT_REQUESTOR_VIP AS VIP
             ,WO.WO_ID AS WORK_ORDER_NO
             ,JT.JT_ID AS WORK_REQUEST
             ,JT.JT_CLASS_ID AS WORK_REQUEST_CLASS
             ,WOTY.WORKTYPE_TEXT AS WORK_TYPE
    --         ,' ' AS WR_COST
             ,JT.JT_DESCRIPTION AS WR_DESCRIPTION
    --         ,' ' AS WR_DISPATCH_METHOD
             ,DECODE(JT.JT_BIGSTATUS_ID,138813,'NEW'
                                       ,138814,'PENDING'
                                       ,138815,'OPEN'
                                       ,138816,'COMPLETED'
                                       ,138817,'CLOSED'
                                       ,138818,'CANCELLED',NULL,' ') AS WR_STATUS
             ,CTRY.COUNTRY_NAME AS COUNTRY
             ,SYSDATE --LD_CURR_TIME
         FROM CITI.JOBTICKET JT,
              CITI.PROPERTY PROP,
              CITI.BLDG BL,
              CITI.BLDG_LEVELS BLDGLVL,
              CITI.LEVELS LEV,
              CITI.LEVELS PAR,
              (SELECT CRSTOOLS.STRAGG(PEO_NAME) FACILITY_MANAGER,
                      BLDGCON_BLDG_ID
                 FROM CITI.BLDG_CONTACTS, CITI.PEOPLE
                WHERE BLDGCON_PEO_ID = PEO_ID
                  AND BLDGCON_CONTYPE_ID IN (40181, 10142)
                GROUP BY BLDGCON_BLDG_ID) FMG,
              CITI.FLOORS FL,
              CITI.ROOM RM,
              CITI.GENERAL_LEDGER GL,
              CITI.LEGAL_ENTITY LE,
              CITI.COST_CENTER_CODES CC,
              CITI.EQUIPMENT EQP,
              CITI.WORKTYPE WOTY,
              CITI.SUBWORKTYPE SWOTY,
              CITI.WORK_ORDER WO,
              CITI.JT_WORKERS JTWO,
              CITI.PRIORITY,
              CITI.COUNTRY CTRY,
              CITI.PEOPLE P1,
              CITI.PEOPLE PEO3,
              CITI.PEOPLE PEO1,
              CITI.CITY PEOCITY,
              CITI.CURRENCY PEOCUR
        WHERE JT.JT_BLDG_ID = BL.BLDG_ID
          AND BL.BLDG_ID = BLDGLVL.BLDG_LEVELS_BLDG_ID
          AND BLDGLVL.BLDG_LEVELS_LEVELS_ID = LEV.LEVELS_ID
          AND LEV.LEVELS_PARENT = PAR.LEVELS_ID(+)
          AND PROP.PROPERTY_ID = BL.BLDG_PROPERTY_ID
          AND BL.BLDG_ACTIVE_LS = 'N'
          AND JT.JT_FLOORS_ID = FL.FLOORS_ID(+)
          AND JT.JT_ROOM_ID = RM.ROOM_ID(+)
          AND JT.JT_BLDG_ID = FMG.BLDGCON_BLDG_ID(+)
          AND JT.JT_GENLED_ID = GL.GENLED_ID(+)
          AND GL.GENLED_LGLENT_ID = LE.LGLENT_ID(+)
          AND JT.JT_CSTCTRCD_ID = CC.CSTCTRCD_ID(+)
          AND JT.JT_EQUIP_ID = EQP.EQUIP_ID(+)
          AND JT.JT_ID = JTWO.JTW_JT_ID(+)
          AND JT.JT_WORKTYPE_ID = WOTY.WORKTYPE_ID(+)
          AND JT.JT_SWORKTYPE_ID = SWOTY.SWORKTYPE_ID(+)
          AND JT.JT_WO_ID = WO.WO_ID
          AND JT.JT_PRIORITY_ID = PRIORITY_ID(+)
             --AND jt.jt_date_requested >= ADD_MONTHS (SYSDATE, -12)
          AND JT.JT_LAST_UPDATE >= ADD_MONTHS(LD_CURR_TIME, -12)
          AND BL.BLDG_COUNTRY_ID = CTRY.COUNTRY_ID
          AND JTWO.JTW_PEO_ID = P1.PEO_ID(+)
          AND P1.PEO_CITY_ID = PEOCITY.CITY_ID(+)
          AND JT.JT_COMPLETED_BY_PEO_ID = PEO3.PEO_ID(+)
          AND P1.PEO_RATE_CURRENCY_ID = PEOCUR.CURRENCY_ID(+)
          AND JT.JT_AGENT_PEO_ID = PEO1.PEO_ID(+)
          );
    
       COMMIT;
    
    EXCEPTION
       WHEN OTHERS THEN
          ROLLBACK;
          DBMS_OUTPUT.PUT_LINE('SQLCODE :' || SQLCODE || ' Error :' || SQLERRM);
    
    END WORK_KIOSK_FULL;
    

    Here is the link for infor the [Oracle Direct - Path INSERT | http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c21dlins.htm#10778].

    Also, if you are really wanting to use a CURSOR for LOOP COLLECTION in BULK, I suggest you read the article by Steven Feuerstein [PL/SQL practices: GEM VRAC | http://www.oracle.com/technology/oramag/oracle/08-mar/o28plsql.html].

    I hope this helps.
    Craig...

    If my response or response from another person was helpful, please mark accordingly

Maybe you are looking for

  • Cannot submit data form with Chrome or Safari

    Can complete is no longer the hold mail in USPS use Chrome or Safari. He let me use the calendar to select the start and end dates. Also unable to connect in Budget car rental - looks that my data are not filed. I rebooted iMac 10.11.5 and uninstalle

  • Adding faces process is slower than the previous version

    It's feedback to Apple. The previous version of Photos where you can select a large number of photos at once, was much faster than the current version that shows you only a maximum of 8 photos at once. Other questions: If you take lots of photos (of

  • Camera focusing distance

    Is anything going to be done on the focus distance of the camera? Since the release and after a group of camera development, nothing was done or improved on the minimum focusing distance. The camera can not really take any macro shots because focus d

  • H8-1130sc: graphics card Exchange end up in problem

    Hello My GTX550Ti is in the week and I bought a new GTX960. After Exchange system is not initialized. He's stuck in the setting of the page! How to come forward?

  • Adjust the voltage for the acquisition of data in C range

    Hello I'm trying to run a USB-6211 in C++ and I would like to change the voltage range of (-10V to10V) to (-1 v to 1 V). Can I just change the minVal and maxVal in DAQmxBaseCreateAIVoltageChan call? Or I have to adjust the device itself and recalibra