Fill the string

I need to fill out the string "ABC" with a 'K' character, that chain will now have 15 characters. Is this possible with sql?

Try using LPAD or RPAD Functions (if I understand your requirements correctly):
Something like:

SQL> SELECT RPAD('ABC', 15, 'K') new_string FROM Dual
  2  /

NEW_STRING
---------------
ABCKKKKKKKKKKKK

1 row selected.

SQL> SELECT LPAD('ABC', 15, 'K') new_string FROM Dual
  2  /

NEW_STRING
---------------
KKKKKKKKKKKKABC

1 row selected.

SQL> 

I hope this helps.
Kind regards
JO

Tags: Database

Similar Questions

  • Fill out the strings of QSettings to ArrayDataModel

    Hello

    I want to read several QSettings strings and then fill in an ArrayDataModel.

    So with this code, I've saved several channels in QSettings:

    void ApplicationUI::saveDataInQSettings(QList filepath) {    QSettings settings;
        settings.beginWriteArray("filepaths");
        for (int i = 0; i < filepath.size(); ++i) {
            settings.setArrayIndex(i);
            settings.setValue("filepath", filepath.at(i));
        }
        settings.endArray();
    }
    

    Now, I want to recover the QSettings channels as follows. I have a C++ function that fills the QSettings strings in a QList:

    QList ApplicationUI::fillQSettingsInQList() {
        QList filepaths;
    
        QSettings settings;
        int size = settings.beginReadArray("filepaths");
        for (int i = 0; i < size; ++i) {
            settings.setArrayIndex(i);
            QString filepath;
            filepath = settings.value("filepath").toString();
            filepaths.append(filepath);
        }
        settings.endArray();
        return filepaths;
    }
    

    In my main.qml, I have a NavigationPane containing a container in which the ArrayDataModel is displayed.

    I put the fillQSettingsInQList () - method in onCreationCompleted then I have the TI in QML when the application is open:

    [...]NavigationPane {
        id: navigationPane
    
        onCreationCompleted: {
            Qt.app = app;
    
            var filepaths = app.fillQSettingsInQList();
        }
    

    But how can I now fill this strings in the ArrayDataModel?

    Thanks for the replies. I have not used the track with a list of the QStrings. It is now much simpler.

    I saved the ArrayDataModel strings in the QSettings in this way. First of all, I saved the channels how I'll put in the QSettings and different channels:

    void ApplicationUI::saveDataModelInQSettings(bb::cascades::ArrayDataModel* model) {
        QSettings settings;
        settings.setValue("size", model->size());
        for (int i = 0; i < model->size(); i++) {
            QVariantMap map = model->value(i).toMap();
            settings.setValue("string_" + QString::number(i), map.value("string"));
        }
    }
    

    And completely action to get the information back to the ArrayDataModel of the QSettings:

    void ApplicationUI::fillQSettingsInDataModel(bb::cascades::ArrayDataModel* model) {
        QSettings settings;
        int size = settings.value("size", 0).toInt();
        for (int i = 0; i < size; i++) {
            QString filepath = settings.value("string_" + QString::number(i), "String not found").toString();
            model->append(filepath);
        }
    }
    
  • define the string as "empty" or "nothing".

    Hello

    I know that one can define a number such as "NaN" - that's great, because it's a great way to check the weather, the variable is still filled. But is possible to do something similar with string? Something as string = "empty" or "nothing"...

    Thanks for your help

    Jonathan K.

    There is a Len() function for strings. What about assigning "" the strings and given a string with Len() = 0 as empty?

  • size of the string channel

    Hi all

    I have worked with a channel with the String data type and fill in the values with a script. This channel is really big, there was more 4 000 000 values long a few times. It worked perfectly fine last week. When I tried to run my script today he woud throwing an error the 262145 index is outside the valid range for the property values.

    Digital channels works well and I has not changed anything in the script related to my channel.

    What could be the problem?

    Best regards

    Christoph

    Hi Edward,.

    It's a little embarrassing... I tried everything but restartung tiara...

    It is simply a lack of memory. Sorry to have bothered you.

    Best regards

    Christoph

  • Insert the sequence inside the string number

    Hello

    What is the easiest way to insert sequences of numbers within the string, example

    Can I have numbers of from 1 to 25, but I can't for the 'gaps', when this happens I filled with X

    01020304050607080910 = > > > 01020304050607080910XXXXXXXXXXXXXXX
    01030405060708091112 is > 01X03040506070809X1112XXXXXXXXXXXXX

    How do I, I tried to use the TRANSLATE function, but no way






    WITH the DATA (str) AS (SELECT ' 010203070911131516' FROM dual UNION ALL

    SELECT "0205060809" FROM dual UNION ALL

    SELECT '03050608091012' FROM dual)

    , decompose AS (SELECT str, substr (str, (LEVEL - 1) * 2 + 1, 2) as ELEMENT, LENGTH (str) / 2 as items)

    , MIN (substr (str, (LEVEL - 1) * 2 + 1, 2)) OVER (PARTITION BY str) AS min_element

    , max (substr (str, (LEVEL - 1) * 2 + 1, 2)) OVER (PARTITION BY str) AS max_element

    FROM THE DATA

    CONNECT BY LEVEL<=>

    and prior str = str

    AND PRIOR sys_guid() IS NOT NULL)

    COMPLETE AS (SELECT str, level elem

    FROM (SELECT DISTINCT min_element, max_element, str

    TO decompose) x

    CONNECT BY LEVEL<= to_number(max_element)="" -="" least(to_number(min_element),1)="" +="">

    AND str = str PRIOR

    AND PRIOR sys_guid() IS NOT NULL)

    SELECT c.str, listagg (NVL (d.element, 'X')) within the Group (order by c.elem)

    C COMPLETE

    LEFT OUTER JOIN decompose d ON (c.str = d.str

    AND c.elem = to_number (d.ELEMENT))

    C.str group

    order of c.str;

    HTH

  • When the signer will sign on the doc that I want to fill the date today, and he should be able to change the date

    Hello world.

    I joined salesforce with echosign.

    I need a help, whenever signatory 2 goes to sign on the doc I want to fill the date today and the signatory 2 should be able to change the date preceding the date of signature. 

    Hello

    So firstly follow the post on the forum to create a formula in salesforce field that creates the date as a string and this merge field in an agreement echosign.

    For example, configure the following field to receive the sfdc date string:
    {{todayeditable_es_:signer1}}

    of course to call the field all you want and also assign the right if not signer signatory 1.

    You can then add a calculated field that compares the date in the field of the todayedtiable against today's date

    {{datecheck_es_:signer1:calc(if(date([today]) > now(), "today larger than today", "continue to next step"))}}

    so, for example today's date is February 12, 2015
    the date entered in the todayeditable field is
    12/02/2015
    the audit date field will say "contine" (or whatever text put you between quotation marks)
    If the date entered has been
    13/02/2015
    datecheck displays "today higher than today.

  • How to search the string when you enter?

    Hi all

    I have a search box, and I don't are populated in the list box data, data are name, ph num, identification of email, when I have my type in the search box, the list needs to be filled, example if I type the letter 'a' and select crieteria is the name, then list must fill with all the names with a letter 'a' and if I type "ab". , the list must fill out with the name that has "ab" in the string (anywhere he can have no order in name), it's very urgent please help me.

    Thank you

    Balu-

    Just Google "Flex Autocomplete" and you should find a lot of solutions

  • I'm currently developing the feature keys on my MacBook. In the process, he asked that I enter a code sent by message to a phone number (only the 2 last digits are revealed) that I do not have access to.   How can I fill the activation?

    I'm currently developing the feature keys on my MacBook. In the process, he asked that I enter a code sent by message to a phone number (only the 2 last digits are revealed) that I do not have access to.   How can I fill the activation?

    See "change how the new features can be approved" here:

    OS X Yosemite: Configure iCloud keychain

    As you can see, this allows you to change the phone number.

  • My window fills the entire page from left to right and covers my taskbar. I can size to the bottom of the window to remove it. Has just begun.

    I keep my taskbar on the right side. Suddenly, the FF browser window fills the screen from left to right and covers, and hide my taskbar. This just started today. How can I get my taskbar visible again. Explain it very simply to please.

    A quick way to switch between a larger and a resizable window is to double-click on the title bar (the area above the tabs). Which does nothing?

    If the tabs go all the way to the top of the screen and fill all the space, then there is not place to double-click. Then you'll need to use either the "middle button" between lower and close buttons, or Alt + bar spacing and r for restore.

  • When the page opens it fills the entire screen and I can't access anything else unless I'm going on the current site. I can't reduce it.

    When I opened a site, it fills the whole page and I can't minimize it or get simultaneously to another page. The only option I currently have is to put the cursor in the upper left corner, and only the current site tab appears.

    Firefox may be using the view full screen. To switch to normal view try is:

    • Hit F11 on the keyboard
    • Drag your mouse pointer to the top of the screen and then right click (or try the Mac equivalent to a mouse button)

    Do any of these work?

  • I have a MacBook Pro.  Is there a way to implement a rarely used keyboard key that - WHENEVER - it is pressed the computer will insert the string, predetermined character at the cursor position?

    I have a MacBook Pro.  Is there a way to implement a rarely used keyboard key that - WHENEVER - it is pressed the computer will insert the string, predetermined character at the cursor position?

    Yes. You can add in system preferences > keyboard > text.

  • iMac (21.5 inch, mid 2011) programs do not fill the screen

    My windows does not fill the screen, as in there is a small strip at the bottom of my screen which is my desktop wallpaper (screenshot of control to the footer of this website) any application that I use, I still see a bunch of my wallpaper down. I love being able to see my toolbar I have a few apps running for the supervision of different things, which is why I do not enter the mode full screen as it hides everything. Is there a solution to this? I can drag the window down a little and then stretch her so it fills the screen, but a simple refresh my browser or a change in the program, it will break again with the small bar at the bottom again.

    Please post a screenshot of the page complete so we can see what you're referring to.

  • How can I stop him adding that pop multiple bookmarks - up to fill the width of the screen?

    Whenever I try to add more than one link to my favourites, the pop-up that asks to add these links fills the width of the screen. It happens when I try to add all of the current tabs to Favorites, as well as when I use the add on, multi links. This makes it very difficult to add links because I have to go across the screen to find the ok button.

    I want to resize the pop up to a more manageable size. However, even though I should be able to resize, I can't figure out how. I also tried to minimize it, but the next time I tried to gather more bookmarks, it was back to the large size again.

    After validation, I tried once more to resize the pop-up. This time, it worked, and it seemed to stick. I think that I could have an add on (multi link). I thought I had tried resizing without which adds be on. I already knew that I was unable to use the search functions on different sites with the add on assets.

    So my problem has been resolved. Even if I don't know what caused the large size first.

  • When I do a bad screen images balloon race to fill the entire screen. How can I find them to normal?

    I don't know what to do so that the stroke of the image upwards. Do not fill the entire screen, they fill the screen to normal size. This has happened on two sites. How can I get them back to normal.

    Is it on Android or desktop? On Android, try double-clicking to zoom out. On the desktop, to reset the zoom, try Ctrl + 0 (it is a zero).

  • Firefox does not fill the screen

    Hello

    Yesterday I had Firefox and explore (ugh!) browsers open at the same time, as I just changed my site on Yahoo Small Business Solutions and Firefox would not save the changes (as a result, the opening of Explorer.) After I finished with the Web site changes, I noticed that there are some changes on my page of Firefox. It does not fit my screen by about 1/4 "on the sides and bottom, and the top is not complete as if it was - the office's bleeding through in empty space up there. Help, please! Thanks, Qz

    Open Firefox-> click the maximize button to fill the screen completely-> close Firefox

    • Restart Firefox
    • Now, the window should open maximized

    Check and tell if its working.

Maybe you are looking for

  • How can I restore 4S for my dad to use?

    I have an old iPhone 4S. My 85 year old father wants to use it. I want to reset all the settings until I give it to my father.  I do not have its SIM, do I need this to set up the phone for him? He is not an apple ID. I am thinking to create one for

  • Homegroup

    Recently, I brought a Xbox 360, now I'm trying to get my pc to configure my Xbox. Is the residential group the right program to use for such a thing? If so my pc gives me a run around telling me my homegroup is not available because my computer is no

  • Can't send emails via outlook express but can receive. Error message - outlook cannot connect to smtp (0 x 80042109)

    Try to send 2 messages and I cannot remove it from the Outbox to prevent them from sending.

  • E6420 and DELL 3007WFP-HC No. 2560 x 1600, Win 7 32

    So I searched high and low for a fix, but nothing helped. All I get for the highest res is 1280 x 800. Yes, I have a cable that says it's a dual link DVI KTD X056C (it's a DELL B21) I tried two cables different dual link DVI to see if it was the cabl

  • Connector SJSDS

    HelloWanted to confirm if the connector of SJSDS is no longer supported with IOM 11gR2PS2. We need to use the connector of the OID to integrate Sun One / Sun Java directory, right?