Creating a channel in a cursor, but only up to the maximum length

Hello people,
I have a situation where I'm trying to build a string and return a value from a function, but I want only to build the string up to the maximum length of the string. The issue I'm facing is that first, the length of the string is zero and the condition never gets satisfied. Ideas and help is appreciated!

Hello people,
I have a situation where I'm trying to build a string and return a value from a function, but I want only to build the string up to the maximum length of the string. The issue I'm facing is that first, the length of the string is zero and the condition never gets satisfied. Ideas and help is appreciated!

For some reason, when I try to put a select statement for the cursor, it won't let me save the message. Very strange. Anyway, is a simple query for the select statement.
declare
  t_student_info_exists     varchar2(1);
  t_student_id              varchar2(1);
  t_student_id_concat       varchar2(200);


  cursor c_student is
     ...

begin
  open  c_student;
  loop
    fetch c_student_id into t_student_info_exists, t_student_id;
    exit when c_student_id%NOTFOUND;

    if length(t_student_id_concat) <= 200 then
      t_student_id_concat := t_student_id ||'/'||t_student_id_concat;
    else
      t_student_id_concat := substr(t_student_id_concat, 1, 200);
    end if;
  end loop;
  close c_student;

  return t_student_id_concat;
end;
Published by: RDonASnowyDay on April 30, 2010 09:37
if t_student_id_concat IS NULL OR length(t_student_id_concat) < 199 then

should do it. Please make sure you are using < rather than < =.

URS

Edited by: metzguar the 30.04.2010 15:38

Tags: Database

Similar Questions

  • Is it possible to find the two sentences into one pdf file? For example, I know the words 'Here' and 'the answer' occur more than once in my document, but only once on the same page. I'm looking for this page.

    Is it possible to find the two sentences into one pdf file? For example, I know the words 'Here' and 'the answer' occur more than once in my document, but only once on the same page. I'm looking for this page.

    I tried to do this by using the search but it will find only them, if they occur as a long chain, that is to say "Here's the answer" rather than how they occur in the document it is to say "Here 's" a bunch of information that leads you to 'the answer'. The search feature so standard did not help.

    Then I tried to do this by using the tool to delete (obviously not the application of writing!) because it allows me to search for multiple words or phrases, however it is not highlight what page both are found. I tried to turn on the preference to enable deletions of comments and even if it meant that I could then go through all the comments, it's still not faster than my document is more than 1,000 pages, which meant there were too many total comments for me to be able to easily identify which page had both.

    Any ideas?

    There is no built-in way to search for two strings and limited to show only the results that appear on the same page.

    It can be done by using a custom script, however.

  • How can I create a navigation with a submenu in only one of the pages

    I want to create a navigation menu with submenus under only certain pages to display. One of the submenus that I want hidden. I want the menu drop-down submenu submenu to show the title of the services, but not to the title of the articles.

    Help, please!

    Thanks a lot for your help.

    Screen Shot 2014-11-02 at 6.27.39 PM.png

    Switch to outline view, right-click the pages you do not want to display in the submenu, then choose the command exclude the page from your menu.

  • can I submit a webworks App (blackberry 10) for approval, but only tested in the emulator in the vm player?

    can I submit a webworks App (blackberry 10) for approval, but only tested in emulator in the drive of the VM, since I don't have any blackberry Device?

    where to find the differences between the web of BB and phonegap works,... preparation & submission?

    Or otherwise if I have a html5/css3/js/jQmobile approx... How loan submit? Android App Phonegap already submitted in the game of Google... but as I see there are differences between the BB web works and phonegap.

    We understand that not all developers have access to a physical device, which is the Simulator comes in. The Simulator you usually gives a good idea of how your application will run on a physical device, and you can absolutely submit this application for review of the BlackBerry World. If problems arise, the BlackBerry World team will let you know of those that need to be corrected before the application can be approved for sale.

    This is true for WebWorks, Android, etc. The BlackBerry World team reviews your application and provide feedback if there are all the important issues which seem to be broken. If you have tested the application elsewhere however, generally you should not be from.

  • I tried to create a partition on drive D, but did not have the letter D.

    * Original title: Windows 7 and D drive

    I tried to create a partition on drive D, (don't use it on my computer) through disk management, complete the Wizard but did not have the letter D. I'm curious to know why this is happening.

    It could belong to a shadow drive or Player cards on the machine. Simply use the next available letter...

    I thought that this might be the case, but I wasn't sure. I have software from our parent company in Asia and must be run on drive D, great pain. they want it distributed in North America, but our clients would not want this restriction. I try to explain the powers that they need to return to square one on this.

    I appreciate your comments.

    You can see the disk manager in Control Panel.  If there is a hidden D: drive, it will display here.  My guess is the drive letter is not assigned or assigned to the next letter somewhere down the line. If there is no D: drive you can assign the D: drive in there.   You can change the drive letters in there also.  give it a try.

  • Unique guest VM uses 100% of CPU Guest, but only 7% of the CPU host (includes screenshots)

    We have a Dell T420 ESXi 5.5 server.  The host has to a single UC E5-2407 (4 Core 2.2 GHz without Hyperthreading), 16 GB of RAM and RAID storage.

    The host runs a single VM Windows Server 2008, which was a P2V conversion.  The virtual machine is currently assigned 1 Plug and 4 Cores, corresponding to the host CPU.

    Since implementing this server about a year ago, he had a problem recurring pop up every few months.  When the problem occurs, the Server 2008 VM suddenly max use of the processor and the terrible performance, but CPU is be contributed to the maximum, not by a single program, but several normal processes.  For example, WMI, explorer.exe and the Task Manager may show all 30% CPU usage.  In the meantime, even if the guest virtual computer has 100% CPU usage, the host will show only using 300 to 500 MHz of CPU, or about 7% of available.  It comes despite the fact that it is the unique virtual machine and has full reign of all the resources of the host.  If the problem seems to be not with an abnormal load on the Guest VM, but less than the resources of the host.

    Restart the virtual machine does not correct the problem, and restart, which normally takes only a few minutes, lasts 30 minutes.  In the past, restart the ESXi host temporarily solved the problem, however it popup until today and persists even after several reboots of ESXi host.  See the attached screenshots for parameters and symptoms:

    ESXi CPU Problem 1.png

    It's the performance monitor virtual machine, whereas the problem that happens.  Notes on the virtual machine, Windows 2008 reports 100% of a core 2.2 GHz CPU 4 CPU usage, while the side host, the CPU usage never goes 626 MHz.

    ESXi CPU Problem 4.png

    Here are the counters of the State whereas the problem that happens.  When you start the virtual machine, the WAIT and SLOW counters were quite high, but they finally dip down when startup is complete.

    ESXi CPU Problem 2.png

    Here are the parameters and the stats of the ESXi host.

    ESXi CPU Problem 3.png

    Here are the parameters and the stats of the guest VM so that the problem that happens.

    Other troubleshooting steps:

    We changed number of vCPU on the VM from 4 to 1, without change.

    We put the CPU reserve for the VM to 50% and 100%, no change.

    The machine virtual was version 8 and we have updated to version 9, no change.

    Has anyone ever experience this problem?  Any help towards a solution would be appreciated.

    Hello

    I would say that it is somehow related to the fact that the VM was converted from physical server. Here are a few questions you should ask yourself:

    Type of CPU on the computer old physical host and VM match? At least seller of CPU? It goes the same for the chipset: are there different chipset vendor on the two hosts?

    What type of card NETWORK VM uses?

    Has uninstalled the drivers card mother/CPU specific converted VM? The VM tools are installed?

    Uninstall the old drivers of VM, currently they are not visible in the Device Manager here some is read: http://itknowledgeexchange.techtarget.com/virtualization-pro/removing-old-hardware-after-a-p2v-conversion/

    I would also check the BIOS of the server - maybe there is some sort of option for active energy that interfere with the VM?

  • Windows Live Essentials installed successfully, but only appears in the list of programs

    Original title:

    I uninstalled windows live essentials. I tried several times to re-installed windows live essentials and although, according to him, it installed successfully, the program does not appear on my list of programs or anywhere else that I can find

    In addition to the search for the application, check if the program is actually installed:

    Click on start, and then navigate to C:\Program Files\Windows Live
    If you are using 64-bit Windows, navigate to C:\Program Files (x 86) \Windows Live

    None is?
    If there is, try to open one of the programs files and run it to check if its working or not.

    Assuming that the programs do not work, you could create a new shortcut to the programs. Otherwise to see if the problem is with a corrupted profile, try to create a new user account and check whether or not the programs are listed.

    http://Windows.Microsoft.com/en-us/Windows-Vista/create-or-delete-a-shortcut

    http://Windows.Microsoft.com/en-us/Windows-Vista/create-a-user-account
    http://Windows.Microsoft.com/en-us/Windows-Vista/fix-a-corrupted-user-profile

  • My Adobe Acrobat 9 Pro will create an option to send email, but only works on my computer.

    I created a PDF file with a function of sending email. I tested with my own computer and sent to myself. I can open the PDF, but when I test it by sending it to my colleagues that they can't open the pdf file.

    Annemarie Santini

    Quality assurance

    Micro Tool Company, Inc..

    284 Brodhead road

    Bethlehem, PA 18017-8937

    610.882.3740 FAX 610.882.3776

    www.MICROTOOL.com [email protected]

  • Help! I need this movieclip to follow the cursor but only in some details!

    Hello

    I'm rather new to action script and need a bit of a kick in the right direction.

    This is what I have a problem with - I used this code to the movieclip background follow the cursor:

    {onClipEvent (enterFrame)}
    x = _root._xmouse
    y = _root._ymouse
    _x +=(x-_x)/10
    FLF +=(y-_y)/10
    }

    I want however - restict movement is so it remains hidden behind the other black point with the graphic "hglf".

    I hope this makes sense and someone can help out me!

    Thank you

    You assign the instance names in the properties panel, or use the library names?

  • Add the same touch to three cans but only one gets the button

    Hi all

    I have these containers three pennies for my app and a button that I would add to all three of them.

    So I created the button

    totalParallal = new LabelButton();
                totalParallal.addEventListener(MouseEvent.CLICK, calculateParallal);  
    
                RightSub.addChild(totalParallal);
    

    added to a subcontainer, but when I tried to add another container (MidSub)

    MidSub.addChild(totalParallal)
    

    the button appears in my container MidSub, not the RightSub. Can someone explain to me why this is? All this is done in the function InitializeUI.

    Hey jzou,

    in AS3, all child objects can have only a single object parent. which means that the last place you add an object as a child, the new parent is the object that calls the addChild() method. important if the number of objects summon the addChild() on a single instance method, the last object that called the method will be the child object to himself.

    wats that past in your code is the MidSub container is the last caller of the of the object that you are adding, and consequently addChild() method, the final parent. you will need to create new instances of object to add it in several places. hope that things cleared up. Good luck!

  • No internet connection AFTER startup, but only works during the boot.

    Hi all

    Have a Win XP MCE (Media Center Edition) Dell laptop running.  I can only connect to internet when the system is even start, and I click on the shortcut to IE or Firefox. Once the system completes the startup it connects me to the internet WITHOUT problem & with good signal and good connection speeds.  System connect wirelessly through a Linksys router.

    If I left the initialization of the system ended up - and I'm trying to connect to IE or Firefox - the hourglass appears for a minute and then disappears and I get no connection!

    This means that I must always start the internet connection while system is always initialize, and if I end the connection I get only back to restart system in place and opening connection when appear the icons on the desktop for IE or Firefox!

    I am puzzled by this and have no idea what to do to solve the problem!
    TNX a lot!

    Cindy

    Hello

    • What were the changes made before the issue occur?

    Verify that if the problem exists in Mode safe mode with networking, if the computer works as expected in mode safe mode with networking, and then we can solve the problem in the clean boot state.
    a. refer to the article below for the procedure safe mode in Windows XP
    A description of the options to start in Windows XP Mode
    http://support.Microsoft.com/kb/315222

    b. it is a possibility that there is a startup program that is launched with a command line and it appears.
    You need to perform a clean boot to find the program that is causing and then disable or remove.
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353/en-us
    Note: When you are finished troubleshooting, follow the steps as explained in the article to reset the computer to start as usual.

  • my cd burns but only reads on the computer not in a player as a car radio

    Since a problem months ago I can't write music on CD and I read them in a stand-alone device

    If you use windows media player, make sure that the audio cd is checked and not the data in the burning options cd.

  • Donut shape drawing api found, but only works on the scene?

    Hello, I found a nice script for the drawing of a donut shape.
    I don't know why it doesn't work with the help of 'this' or "_root". You should be able to apply it to a movieclip?
    Or am I missing something?

    This is the script:

    this.createEmptyMovieClip("emptymovie",2);

    emptymovie._x = 220;

    emptymovie._y = 150;

    function DrawCirclePart (mc, xPos, yPos, RADIUS, angle, rotatie, dir) {}

    If (dir == 1) {}

    angle = angle 0;

    rotatie = rotatie-angle;

    }

    precision = 10;

    var length = (Math.PI/(360/angle)) / accuracy;

    var controlRadius = radius/Math.cos (span);

    var anchorAngle = Math.PI* ((rotatie-90)/180), controlAngle = Math.PI* ((rotatie-90)/180);

    for (var i = 0; I < precision; ++ I) {}

    controlAngle = anchorAngle + span;

    anchorAngle = controlAngle + span;

    mc.curveTo (xPos + Math.cos (controlAngle) * controlRadius, yPos + Math.sin (controlAngle) * controlRadius, xPos + Math.cos (anchorAngle) * RADIUS, yPos + Math.sin (anchorAngle) * radius);

    }

    }

    function Wedge (mc, Wradius2, Wradius1, Wrotatie, Wangle) {}

    //mc.lineStyle (1, 0, 100);

    mc.beginFill (0x0000FF);

    (mc.moveTo(Math.cos(Math.PI*((Wrotatie-90)/180)) * Wradius1, Math.sin(Math.PI*((Wrotatie-90)/180))*Wradius1);

    MC. DrawCirclePart (mc, 0, 0, Wradius1, Wangle, Wrotatie, 0);

    (mc.lineTo(Math.cos(Math.PI*((Wrotatie-90+Wangle)/180)) * Wradius2, Math.sin(Math.PI*((Wrotatie-90+Wangle)/180))*Wradius2);

    MC. DrawCirclePart (mc, 0, 0, Wradius2, Wangle, Wrotatie, 1);

    (mc.lineTo(Math.cos(Math.PI*((Wrotatie-90)/180)) * Wradius1, Math.sin(Math.PI*((Wrotatie-90)/180))*Wradius1);

    mc.endFill ();

    }

    It works

    Wedge (this, 30, 50, 320, 180);

    This does not work?

    Corner (emptymovie, 30, 50, 320, 180);

    change Wedge() to:

    function Wedge (mc, Wradius2, Wradius1, Wrotatie, Wangle) {}
    mc.lineStyle (1, 0, 100);
    mc.beginFill (0x0000FF);
    mc.moveTo(Math.cos(Math.PI*((Wrotatie-90)/180))*Wradius1,Math.sin(Math.PI*((Wrotatie-90) / 180)) * Wradius1);
      DrawCirclePart(mc,0,0,Wradius1,Wangle,Wrotatie,0);
    (mc.lineTo(Math.cos(Math.PI*((Wrotatie-90+Wangle)/180)) * Wradius2, Math.sin (Math.PI* ((Wrotat ie-90+Wangle)/180)) * Wradius2);
        DrawCirclePart(mc,0,0,Wradius2,Wangle,Wrotatie,1);
    mc.lineTo(Math.cos(Math.PI*((Wrotatie-90)/180))*Wradius1,Math.sin(Math.PI*((Wrotatie-90) / 180)) * Wradius1);
    mc.endFill ();
    }

  • I need to continually take data but only trend occasionally

    Hello. I'm new to LabVIEW and have been given the task of interfacing with a thermostat of LakeShore. My employer wants to my program to recover data continuously, but only to write the data to a file and a graph in a certain period. At this moment I VI data in a loop for which has a time delay inside and set the number of iterations that however many seconds or minutes to pass before it writes the data and then allow him to move on to writing to the extent of the file VI and the graph before returning to loop data. There must be a better way to do it with the timed structures or structures of event or something. My instinct tends to be to use a bunch of while loops for things, but I can't stop them with a button outside the while loop. Can someone help find a better way to go about this?

    I would use an Express VI elapsed time that drives a business structure where the "occasional code" is in the real case of the structure of the case.

  • Create a channel by combining smaller values of the other two channels

    Hello, I have two channels (v + and Volts1 +) and I am trying to create another channel (Volts_Small) that will have smaller values of the two channels. I need to compare each data point in the two channels and add little value to the new channel.

    THS is what I tried without success:

    I have Sun
    Dim: Set Group = Data.Root.ChannelGroups ("200_68")
    Dim Chn1: Set Chn1 = Group.Channels ("v +")
    Dim Chn2: Set Chn2 = Group.Channels ("Volts1 +")
    Dim Chn3: Set Chn3 = Group.Channels ("Volts_Small")

    For i = 1 to Chn1.Size
    If (Chn1.Values (i) > Chn2.Values (i)) then
    Chn3.values (i) = Chn2.Values (i)
    On the other
    Chn3.values (i) = Chn1.Values (i)
    End If
    Next

    I would give much help appreciate with this! Thank you.

    Cedric

    EDIT:

    Nevermind, I solved this problem:

    I have Sun
    Dim: Set Group = Data.Root.ChannelGroups ("200_68")
    Dim Chn1: Set Chn1 = Group.Channels ("v +")
    Dim Chn2: Set Chn2 = Group.Channels ("Volts1 +")
    Dim Chn3: Set Chn3 = Group.Channels ("Volts_Small")

    For i = 1 to 900000
    If (Chn1.Values (i) > Chn2.Values (i)) then
    Chn3.values (i) = Chn2.Values (i)
    On the other
    Chn3.values (i) = Chn1.Values (i)
    End If
    Next

    Hi Cedric,

    I strongly advise to use the calculator channel and the MinV() function that is already integrated to tiara.  You have less code that runs much faster, especially for the largest data sets.

    Dim: Set Group = Data.Root.ChannelGroups ("200_68")
    Dim Chn1: Set Chn1 = Group.Channels ("v +")
    Dim Chn2: Set Chn2 = Group.Channels ("Volts1 +")
    Dim Chn3: Set Chn3 = Group.Channels ("Volts_Small")
    Var Variables: Variables = Array ("Ch1", "Ch2", "Ch3")
    Dim channels: channels = Array (Chn1, Chn2, Chn3)
    Call to calculate ("Ch3 = MinV (Ch1, Ch2)", Variables, channels)

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

Maybe you are looking for

  • thermocouple reading limited to a value

    Hello I'm new here and don't know much about Labview. T type thermocouples are connected to the SCXI-1000 chassis with 1102 module and 1303. I use 20 channels and 12 are left open. For open channels, the Labview program is around 139oC.  However, the

  • problem with the brightness of the screen

    Hello My product number is HP 1000-1312TU Notebook PC And my os is windows 7 ultimate x 64 Because I changed my operating system from 8 to 7, I couldn't change my screen brightness with the keys on the keyboard, or power setting options, I mean they

  • Help burning CD

    I'm trying to burn an audio CD. I ripped the songs and medicines to the list pane. When I click on burn, nothing happens. In the past, it has bold "start burn" and after clicking on it would start the burning process. What I am doing wrong this time?

  • Failure hard drive replaced by larger windows disk hard recovery 7 starter will not work

    The Emachines Nav51 of Netbook had a hard drive fail completely. WD 160 GB instead of replacing the drive with the same size of the extra couple of dollars so I installed a 320 GB WD drive. Had a set of recovery disks shipped from Emachines, but due

  • Hello, I have problems with my printer, Epson Stylus Photo 1400, in Lightroom CC.

    I t will display choice very limited on paper, management, etc.. It's almost as if he becomes disabled. I've recently updated to win 10 64 here and now can't handle my printer as I could before. I had reinstalled all the drivers and software from the