Length of line as the quantity, of zeros?

So I have a table with the ID of person, what I'm trying to do is to adjust the id so that they contain zeros, guaranteeing the duration of each person id to be the same thing with zero extra.

Oracle: 10.2 g

Then...
select *
from table x
Results
PERSON_ID_HOME       PERSON__ID_AWAY
11                               54          
398                             665
8411                           2333
1                                874
66                              5
888                            654  
186                             44
etc...                    
What I want:
PERSON_ID_HOME       PERSON__ID_AWAY
00011                         00054          
00398                         00665
08411                         02333
00001                         00874
00066                         00005
00888                         00654  
00186                         00044
etc...
Not really sure how to incorporate the max length that the amount of zeros the key to add to each id
I was thinking something like...


(case when max (length (person_id_home) > max (length (person_id_away)))
then max (length (person_id_home)
on the other
Max (length (person_id_away)
end max_length)
I don't know actually...?

Any help would be appreciated...
SQL> SELECT LPAD(object_id, l, '0')
  2    FROM all_objects,
  3         (SELECT LENGTH(TO_CHAR(MAX(object_id))) AS l
  4            FROM all_objects);

LPAD(OBJECT_ID,L,'0')
-------------------------------------------------------------
021681
011303
027118
017967
026683
013917
027329
027384
013593
015503
021281
...

Tags: Database

Similar Questions

  • Thick vertical black line on the entire length of the page

    I have a HP LaserJet M1530 MFP Series PCL 6.  When I print normally there is no mistake in the image, but when I make a copy I have a thick vertical black line on the entire length of the page. The black line is about 2 inches from the left edge of the page. The problem is older than the current drum cartridge which was just replaced a couple of months. Never, the problem occurs with a normal printing, copy only and occurs with every copy without exception. Does anyone have any ideas/suggestions?

    Hello somedudeand welcome to the Forums of HP.

    I'm sorry, but to get your question more exposure I suggest posting in the trade forums since it is a commercial product. You can do so at http://h30499.www3.hp.com/hpeb/ .

    I hope this helps!

  • Why my scanner is putting a line down the length of the scanned page?

    Every time I scan using the ADF, I get a line down the length of the scanned image. How can I fix it?

    Scans are correct when using the tray

    Hi again!

    Cleaning the scanner glass is different from the ADF. Try some ADF cleaning steps here.

    I hope it works for you!

  • How to increase the length of line comment fields

    Hello

    as requested by a customer, we need to know if it is possible to increase the length of line comment fields.

    In fact, the size is:

    for allergens/intolerances/additives comment field-> DB limit = 256 characters; Web = 125 character limit

    for field nutrient comment-> to the defined benefit limit = 512 characters; Web = 250 characters limit

    We need to increase both limits up to 1000 characters.

    I hope my question is clear.

    Thank you and best regards.

    Michele

    Hi Michele,

    You can increase the size of the field or the size of the text for the field of comment allergens/intolerances/additives by following steps:

    1, go to \Web\gsm\BaseForms\UserControls\ctlComplianceContainedGrid.ascx, open the file

    2, go to line 102:

    3, edit theCellRepresentation.getTextareaCellEditor or the width of the field, save the file, refresh your page open or create a new page, then this field will change to the newly configured size

    Notes: the maxinum supported text is 4000 characters

    Unfortunately, the comment nutrient field do not support 256 characters. I suggest that submit you an improvement if it necessary business.

    I hope this helps.

    Thank you

    Jessie

  • How to change the length of line objects

    Hi all

    How to change the length of the line objects.

    I know how to change the width or height of the elements.

    Utils < Facade::IGeometryFacade > ()--> (ResizeItems)
    itemList,
    Transform::PasteboardCoordinates (),
    Geometry::OuterStrokeBounds (),
    refPoint, Geometry::ResizeTo (newWidth, newHeight)
    );

    I know the new length and PMrect of the line item before moving.

    What I want to know is how to get the new width and height of this.

    Thank you.

    Fujimori - Satoru

    Find your old address of trigonometry and read the part about the Pythagorean theorem. This will give the scale factor you need to get the old PMRect to the new

  • Incoming Fax page, left thick black line down the side edge

    Hello

    I recently bought a HP Photosmart 7520 printer and had to return because of a wrong switch ON / OFF the printer.  So I returned and bought another. This second printer works perfectly so far!  However, when I recieive a fax, the page has a very thick Black Line crosses the length (less than an inch from top and down) on the left edge. It almost seems to be a template for a fax page?  The first printer (a returned) did not do that, but it does not appear on the second printer.  In addition, the original page fax I sent to my friend and he said, that it doesn't have a thick black line on the fax page, he gets... and then he sent me along a return fax with this black line appears.

    Comment of thoughts,

    SyBerGuy

    Hello

    For more than a week since my last post. And I also had the printer connected to an outlet of power strip surge protector (never needed to connect directly to a wall, which I would have if I had a problem).  The problem has been resolved by replacing the large black ink cartridge, which was not printing text.

    In addition, earlier when I check the ink level, he showed the graphics still about 1/4 rest in the cartridge. I had also previously clicked on tell me when the ink level is low. None of this happened?  So now I have to watch closely what is printing a page of text clean/good.

    So for now, the printer is good to go and I hope not to have more problems... thank you for your help!

    Sy

  • draw lines on the graph of the intensity

    I want to draw lines on the graph of the intensity.

    I am already looking for some questions before.

    I know there is a vi could draw line on the graph of the intensity by dragging the mouse.

    But I need more precisely what set the length and the angle between the horzontal line.

    The setting is very ideal for me. But I don't know how to use it in the intensity chart.

    Is there anyone can help or give some advice?

    Your example is not so great because it uses 100% of CPU on a kernel at any time, do nothing.

    Here's a quick rewrite of my old example here. He draws an angle with the specified length and angle to where you click on the chart. This should help you get started. Modify if needed. (Also remember that trigonometry is much easier when using complex numbers )

  • How do I either set channel name of a graph of cluster or get a 1 d waveform chart to start different time (t0) for each line of the waveform?

    I have a chart single 2D out a conditional of a loop indexing output such that over the rows of the table are not the same size. -Basically, they have different starting and ending points and sizes. -Not so concerned by the endpoints, because as soon as I get correctly starting points, everything shows fall in place.

    The challenge is that when I try to have the variable t0 (start time) for each line, the wave of construction vi form would always keep each line at the same starting point.

    I used the approach bundled with success (the cluster approach ensures that each waveform starts at different times according to the guidelines of my t0 defined for each line) but then I'm not able to get in the channel names I could make using the graphical approach (wave generation) waveform.

    In essence what I get here, I'm losing here.

    Because I don't want one of my mentors, Bob and Altenbach have fed up with me I have attached a vi this time

    Attached VI shows a combination of the two attempts (first with the waveform graph) and then with the graph of cluster

    1. with the first (graphical waveform), I get my channel names as you wish, but the alignment of the wave is not correct.

    2. with the second (graphical cluster), the alignment is good, but I can't do the names of channel in the chart, even if they are present in the cluster.

    I read some reviews that mentions that attributes can be displayed with waveform and data Dynamics (not clsuters) so I guess that's why.

    I saw another report indicating the start time for a waveform 1 d will always remain the same for the rest lines defined for the first line even if changed for the following lines in a loop.

    So I guess my question is: what is the way around questions like that?

    First of all, let me be the first to the congratulate and thank you for finally posting a code!  I'm not 100% certain I understand your question or your code, but I have an idea, perhaps, of what you want to do, so I wrote a little VI who made something simple that could be relevant.

    You mention waveforms of different lengths and beginning at different times.  You also want everyone to have a unique attribute (although I'm not sure what you want to do with the attribute).  So, I did the following:

    1. Generated an array of 100-sample random to represent one second of a waveform.
    2. Created 4 waveforms on this 100-sample basis.  The first waveform (channel 0) is just these 100 points.  The second, 1 channel, is the concatenation of string 0 with the base of 100 samples, or a waveform "double".  Channel 2 is 1 string concatenated with the base, and channel 3 is 2 string concatenated with the base.
    3. In order to trace the four channels that they rest 'on' the other, the waveform has the number of the channel added to it.  Channel 3 is 3 + (4 copies of the basis of 100 points), a waveform 400-point random centered around a shift of 3.
    4. All channels have dt value 0.01 (but I guess I could have varied, as well).
    5. To make the channels start at different times, I started channel N N seconds before channel 0 (by subtracting the index of the loop, I, T0).
    6. For each channel, I created an attribute called "Chan" equal to "Channel N" (where N = 0, 1, 2 or 3, as the case may be).

    This is the plot that results. Scale X is the absolute time value (no Date) using the 24-hour HH: mmS format.  You can see that the plots are 1, 2, 3 and 4 seconds of time, and are offset from each other by a second.  I used the trace attributes to change the name to the respective attribute.

    The code to do this is very simple - I almost don't need to show it, because I think it is completely described by the text above, but this is here:

    Now, it was not that much faster that some of your previous posts, when you refused to your postcode, "guess us" what you wanted (but not to not correctly guess), you tried to "push" us in the right direction (still refuses to post code), and no one seemed very happy?

    Bob Schor

  • astrophotography. I want to know that the focal length is to determine the field of vision?

    I'm interested in astrophotography.  I want to buy a camera for my telescope.  You can find the field of vision, if you know the focal length of the telescope.  But what is the focal length of a camera with a fixed lens?  If I have a 50 mm lens, is the focal distance 50 mm? or do you need to know the distance from the camera of body image sensor and add it to the lens focal length?  Thanks in advance...

    If you have a 50mm... lens focal length.  The focal length is the distance between the end of the lens and the image plane.  If you look at a digital SLR, there is a symbol on the body (usually the top of the body and often near the viewfinder) that looks like a small circle with a line through IT... which line marks the position of the focal plane inside the camera.

    There is a friction more... If you have a 'simple' goal, it would be the focal length.  Many modern lenses are technically able to be physically shorter than the focal length they provide... because of the types of 'glass' and the configuration of optics.  So the focal length is based on how long a simple goal should be to provide that same value (even if you were to physically measure it and not get this value.)

    All telescopes list their focal lengths, but also among the specs of the telescope focal reports.  I have a refractor of 540mm with an opening of 101mm... so it is 'roughly' f/5.4 scope.  I have also a larger 14 "SCT with a focal length of 3556mm and it is a stretch of f/10.

    The distance "flange to focal plane" on a camera Canon is 44 mm... in the grand scheme of things with a telescope, it will not substantially change the focal length of the image.

    Depending on the scope, you can use either a "focal reducer" or a "barlow" to decrease or increase the focal length.

    One last thing... many designs of 'Newtonian' type telescope is problematic for astrophotography.  This is because most of the glasses and catadioptric telescopes are designed with the intention that a person would use a diagonal of 90º with their eyepiece.  "The diagonal has a tendency to add"roughly"2" to the overal of the focal path length.  If you are using a camera you take this "diagonal" and simply attach the camera for a shot "straight through".  So even if you have lost the focal length 2 ", created by the diagonal... the camera adds"roughly"the same amount of back in.

    BUT... When you use a Newtonian telescope of reflector design, the eyepiece is near the front and there is no "diagonal" in use.  This means that when you add a camera, focal length gets longer, it would be with an eyepiece.    Pull door-eyepiece tube has some development trips... but because the camera is the longest focal length, you end up having to run the focuser completely 'in' to shorten the length of the focal length to put the image in focus.  And that's where you are having problems... very often on a Newtonian telescope, you exceed the limit of traction of focuser (you can't shorten the development any more that you have) and the image was just starting to focus... but it's still pretty fuzzy.

    This problem not to poison all the reflectors of knighting... some can accommodate cameras and still come to focus.  You really check the specific scope.

  • 6500 a black line on the right side when I copy

    I have printer hp 6500 has only when I copy I have a black line on the full length of right on the paper even when I copy a blank sheet

    Hi danpk,

    I understand that you are having problems when you perform a copy.  I'll take a look at the document below.

    Copy quality

    Let me know how it goes.

  • HP Officejet 6500 Wireless-black line down the copied sheet

    With the help of HP Officejet 6500 (E709n). When the automatic document feeder, copying copies resulting dating a (thin) continuous black line from the top of the sheet for any length, to 1 3/8 "from the left edge of the worksheet. Line does not appear when you copy directly from glass. Am not able to determine a way to access a possible source of problem (most likely a dirty friction roller). The original user manuals do not address this problem. Search for a solution. Thank you

    Hello lentill24.

    Please, see this document.

    http://support.HP.com/us-en/document/c01612462

    See you soon!

  • How to add lines to the PresetEffects.xml from a script

    Hi, I would like to add a few lines in the PresetEffects.xml to another text file or an another JavaScript add lines like this how can I do? :

    < name of the group = "$$$ / AE/Preset/AnimalHead14 / = mouth" >

    < name of the cursor = "' $$$ / AE/Preset/AnimalHead14/MouthOffsetX = mouth X shift" default = '0' valid_min = '-30,000"valid_max ="30000"slider_min = slider_max"-500"= '500' precision ="1"DISPLAY_PERCENT ="true"/ >"

    < name of the cursor = "' $$$ / AE/Preset/AnimalHead14/MouthOffsetY = mouth Offset Y" default = "0" valid_min = "-30,000" valid_max = "30000" slider_min = slider_max "-500" = '500' precision = "1" DISPLAY_PERCENT = "true" / > "

    < name of the cursor = "' $$$ / AE/Preset/AnimalHead14/MouthScaleWidth = scale Overture" default = "100" valid_min = "-30,000" valid_max = "30000" slider_min = slider_max '-500' = '500' precision = "1" DISPLAY_PERCENT = "true" / > "

    < name of the cursor = "' $$$ / AE/Preset/AnimalHead14/MouthScaleHeight = scale of mouth height" default = "100" valid_min = "-30,000" valid_max = "30000" slider_min = "-500" slider_max = "500" precision = "1" DISPLAY_PERCENT = "true" / > "

    < / Group >

    < / effect >

    {function onClick.btn

    Add the lines of my text file in the PresetEffects.xml

    I did once, like this:

    var scriptEffect = {};
    scriptEffect.xml =
    
        
            
            
        
        
            
            
            
        
    ;
    scriptEffect.matchName = [email protected]();
    
    function installScriptEffect(){
    
        var ret;
        var file = new File(Folder.appPackage.absoluteURI + "/PresetEffects.xml");
        var str, idx, header, xml;
        var xmlSettings = XML.settings();
    
        XML.setSettings(XML.defaultSettings());
    
        try{
            if (!file.exists) throw "ERR_FILE_NOT_FOUND";
    
            file.open("r");
            str = file.read();
            file.close();
    
            idx = str.indexOf("");
            if (idx<0) throw "???";
    
            header = str.substring(0, idx-1);
            xml = new XML(str.substring(idx, str.length));
    
            if (!xml.contains(scriptEffect.xml)){
                xml.appendChild(scriptEffect.xml);
                if (!file.copy(new File(file.absoluteURI+".bak"))) throw "ERR_CANNOT_WRITE";
                file.open("w");
                if (!file.write(header + xml.toXMLString())) {file.close(); throw "ERR_WRITE_FAILED";};
                file.close();
                alert("Preset installed succesfully. Please restart After Effects");
                }
            else{
                alert("Preset already installed. You need to restart After Effects to make it effective.");
                };
            ret = true;
            }
        catch(e){
            file.close();
            alert(e);
            ret = false;
            };
    
        XML.setSettings(xmlSettings);
    
        return ret;
        };
    

    Then, when you want to add the effect, check with myLayer.effect.canAddProperty (scriptEffect.matchName).

    If true, nothing to do, otherwise use the installScriptEffect function. Normally, it works (haven't tried for a long time).

    Xavier

  • Length of line of text setting

    The text box is as wide as the outside margins, but I can't get the text of the lengths of lines is wider than here - what I am doing wrong?


    There seems to be plenty of space to accommodate more text per line.


    Thank you



    Motonero_Text_Narrow_Line_Length.jpg

    Check if you have any left/right margin of paragraph (text panel) or left/right padding (Board spacing).

  • I have an epson printer p950 and try to print from lightroom. I get lines across the image and Epson tell me I need to contact you to find out how to slow printing

    I have an epson printer p950 and try to print from lightroom. I get lines across the image and Epson tell me I need to contact you to find out how to slow printing

    Suggest you to reset preferences in Lightroom and then, check out: to zero (or "Screw up") the preferences of Lightroom - Lightroom Forums file

  • How to animate a line with the pen tool to give the impression that it is plotted?

    How to animate a line with the pen tool to give the impression that it is plotted?

    Or you can choose the pen tool (g), set the padding to zero and the race to what you want, then draw a path, then press U twice to reveal all of the properties that have been changed for the layer, and then click Add (top-right) and select Connect the tracks.

    To make the race work just animate the start or end point and sent to paint on original or reveal original or normal.

Maybe you are looking for