How to build a list or a table with fixed values?

Is it possible to create a list or a table with fixed values, but with a variable length?

for example:

var columns = "name, age, function;

var insertParams = generateList ( listLen (columns), ',','.) » ); *

fact: insertParams = ',?,??

* (this function does not exist. This is just to illustrate what I need)

I know that this feature is easily created by creating a loop, but I was wondering if it was possible with a single line of code.

Thank you


If he can generate a table in the same way, which would be as well.

Our messages have clashed. But I think that repeatString() would do the trick. You could cut the rear comma with left() or convert it to a table. By default, ListToArray() will silently ignore the trailing comma.

Tags: ColdFusion

Similar Questions

  • How to get a list of the tables more fragmented in Oracle?

    Is there a SQL on how to get a list of the tables more fragmented in the Oracle DBMS?

    Update the statistics on the table and try this, you should see very fragmented tables upstairs with high wasted_space.

    select table_name,round((blocks*8),2) "size (kb)" ,
                                round((num_rows*avg_row_len/1024),2) "actual_data (kb)",
                                (round((blocks*8),2) - round((num_rows*avg_row_len/1024),2)) "wasted_space (kb)"
    from dba_tables
    where (round((blocks*8),2) > round((num_rows*avg_row_len/1024),2))
    order by 4 desc

    I changed the query a little because the ORDER BY will not work if we concat | ' Ko ' with the column because this makes the output a character column data.
    And added a WHERE condition to see that these tables where the total size is greater than the actual size of data.

    Published by: zahid79 on July 23, 2010 13:40

  • How to get the title of a table with FDK?

    How to get the title of a table with ad FDK C++?

    I did people. I get objects table paragraph and later the textual elements for each of them.

  • How to select all text in a table with a single click cell?

    How to select all text in a table with a single click cell? I use TextField.selectAll () when you implement a table cell factory. But when I select a line with a single click, then a click on a table cell again: see the result image

    The text in the table cell is not all selected. What I simply selects all the text in a table cell when there is a click on it. How to realize that? Thank you

    Thanks for help ~.

  • Fill the table with random values

    Another thing I've come across is this:
    the table name is LOR, who has 3 fields NUMBER, DATA, TEXT with number, date and varchar2 data type.
    On a page, I have a text field where if I write 3, then it would add 3 lines to the table with predefined values ("number, something like 2222, for 12 January 09, and for text, something like" Lorem ipsum dolor sit amet, 195kgs adipisicing elit"). So basically, with the number that I give, it populates the table with lines... How can I do this? Thanks for helping me
    SELECT 222
    , sysdate
    , 'you string'
    FROM dual
    CONNECT BY level <= :Pxx_
  • Table with fixed header and the left column

    I created a table in my application with the fixed left column (left most column is fixed and remaining columns are scrolling from left to right). is it possible to create a table with fixed position and fixed left column?

    Suppose there are 50 rows and 10 columns in my paintings, and only 3 columns and 15 rows are visiable on the screen

    (1) when the user scroll left to right left only most of the columns must be fixed. Remaining cap of the table and column scroll left to right and vice versa. also

    (2) when user scroll high high bottems single topic most must be fixed and remaining all lines (with to the left most column) should be scrollable.

    I am able to put in place a point at the top, but not both. Please suggest

    "If I repopulate the value in the cell when user scrolling, shell, I get scrolling effect correctly as it only shows half cell when the user highlight half of the cell."

    Approach using TablelayoutManager display single cells and scrolling would be cell at a time.  And Yes, you will need to override navigationMovement and n of methods appropriate TouchEvent your TableLayoutManager so that he knows when to fill the cells.

    Another alternative is to have four managers, we don't the the upper left corner (the dead angle), one to make the top row (column headings), one to make the left column (row headings), and the other to do the rest (data).  Place all these in a delicate header and line manager.  Only allow the user to scroll the data part.  Have the difficult Manager to listen the scroll events.  Then have the wily Manager add and remove the dummy column and header line managers as appropriate.  Note that these topic fields would not good passes, they would be either there or they would not be displayed. That would give you your 1/2 a scroll of the cell.  And you wouldn't have to substitute anything to detect movement, you would have left the listener do scrolling for you.

  • How to make the column in the table with the formula

    Hi all..
    This is my class
    public class MyNumber{
         private int num;
         public int getNum(){
              return num;
         public void setNum( int num){
              this.num = num;
    Consider that designing a table with FXML Editor (Builder scene in this case)
    and here are some of my codes
    private TableView tab;
    private TableColumn<MyNumber, Integer> tabColInput;
    private TableColumn tabColOutput;
    tabColInput.setCellValueFactory( new PropertyValueFactory<Person,Integer>("num") );
        new EventHandler<CellEditEvent<MyNumber, Integer>>() {
            public void handle(CellEditEvent<MyNumber, Integer> t) {
                ((MyNumber) t.getTableView().getItems().get(
    I want to tabColOutput to always show the result for tabColInput multiplied by 2

    for example:
    When I change a line in tabColInput 10, tabColOutput shows 20
    When I change a line in tabColInput to 3, tabColOutput show 6

    Could someone advice me how do?

    PS: I'm not native English, so I'm sorry if I tell it fake ^^

    You're up-to-date data are probably not ObservableValues as properties, so the TableView cannot update dynamically as modification of data items.

  • How to find the size of a table with CLOB


    I have a table with CLOB as follows:


    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------



    LAST_client_msg_ID VARCHAR2 (36)

    LAST_client_msg_DATE DATE

    LAST_client_msg CLOB




    Now I just want to find out what is the size/area total absorbed by the table (including the CLOB columns), so how can I find? I think that the usual command does not - the

    Select format from dba_segments where nom_segment = "INFO_MESSAGES" is only showing 7 MB, while I think that the table has several GB of space due to the CLOB.

    Also to add one more detail: when dba_segments seeking, I see a result like this:

    Select * of dba_segments order by bytes DESC;

    MIGRTN SYS_LOB0000111131C00008$ $ LOBSEGMENT SAMS DATA1 20690 6 1963 14528000 119013376000 <-the top row

    MIGRTN this is the schema where this INFO_MESSAGES table is present.



    you will need to add the segment_size of the LOB segments to the segment_size of the table. The connection between the two pieces of information you find in USER_LOBS (or the corresponding ALL_, DBA_ objects).

  • How to make a list of dynamic selection with time interval of 15 minutes

    Hi all

    I have a question. I need a selection list containing the time with 15 minute intervals from 08:00 until 16:00.
    example 08:00
    and so on until 16:00
    Or values stored in a column of varchar type.
    Can someone help me with this one please?

    Best regards

    You can generate the entries in a dynamic way, as:

    select  to_char(trunc(sysdate)+8/24+(level-1)*1/96,'HH24:MI') period
    from    dual
    connect by level <= 33 

    or if you want/need to use your stored values:

    select display_column, return_value from table where
     display_column in (
                   select  to_char(trunc(sysdate)+8/24+(level-1)*1/96,'HH24:MI') period
                   from    dual
                   connect by level <= 33 )
  • How to update exists column on the table with the exact number and auto increment


    I have a table with more than 10 million rows and there is a column called 'number_zaq', I want to update this column on line frist from 2000 and + 1 for the next all ranks.

    Update your_table

    Set number_zaq = rownum + 2000-1;

  • ADF: How to fill a column in a table with a specific color

    Hi all
    I want to fill the cells of table with different colors based on the value (for example: 10, 40...) in this cell output text area.
    Help, please.



    You can use the same code for the inlinestyle column: but it will color the entire column

    headerText = "#{bindings." EmployeesView1.hints.Salary.label}.
    ID = "c9".
    inlineStyle = "#{yourconAttr > 10?'" background-color: Red;': ' background-color: Orange ;'} ">}"

  • How to make a SUM function on table with TI-auto

    Hi all
    I created a table with column 2:
          CREATE TABLE Suppliers
              Id                     NUMBER(10)              PRIMARY KEY,
              ProductNum       NUMBER(10)              NOT NULL,
              Amount             NUMBER(10)              NOT NULL
    Example: I have these data in the table
    1|      4A        |    50   |
    2|      10Q      |     3    |
    1|      4A        |    40   |
    3|      Q9       |     32  |
    2|      10Q      |     60 |
    .          .                .
    .          .                .
    .          .                .
    And I want a query to get the sum of the amount of each product, that is if I run this query o the previous table, I expect the following result
    4A            |     90    |
    10Q          |      63   |
    Q9            |      32   |
    .               |       .    |
    .               |        .   |
    Thanks in advance

    Something like this->

    select ProductNum, sum(Amount)
    from Suppliers
    group by ProductNum;

    Kind regards.


  • REGEXP_SUBSTR for the list delimited by commas with null values


    I have a column that stores a list of values comma-delimited. Some of these values in the list may be null. I'm having some trouble trying to extract the values using the REGEXP_SUBSTR function when null values are present. Here are two things I've tried:
       REGEXP_SUBSTR (val, '[^,]*', 1, 1) pos1
      ,REGEXP_SUBSTR (val, '[^,]*', 1, 2) pos2
      ,REGEXP_SUBSTR (val, '[^,]*', 1, 3) pos3
      ,REGEXP_SUBSTR (val, '[^,]*', 1, 4) pos4
      ,REGEXP_SUBSTR (val, '[^,]*', 1, 5) pos5
    FROM (SELECT 'AAA,BBB,,DDD,,FFF' val FROM dual);
    --- - --- - -
    AAA   BBB
       REGEXP_SUBSTR (val, '[^,]+', 1, 1) pos1
      ,REGEXP_SUBSTR (val, '[^,]+', 1, 2) pos2
      ,REGEXP_SUBSTR (val, '[^,]+', 1, 3) pos3
      ,REGEXP_SUBSTR (val, '[^,]+', 1, 4) pos4
      ,REGEXP_SUBSTR (val, '[^,]+', 1, 5) pos5
    FROM (SELECT 'AAA,BBB,,DDD,,FFF' val FROM dual);
    --- --- --- --- -
    As you can see that neither calls work correctly. Anyone know how to change the regular expression pattern to handle null values? I tried various other models but could not get anyone to work in all cases.

    Thank you


    Hi, Martin,.

    That's what you want:

       RTRIM (REGEXP_SUBSTR (val, '[^,]*,', 1, 1), ',') pos1
      ,RTRIM (REGEXP_SUBSTR (val, '[^,]*,', 1, 2), ',') pos2
      ,RTRIM (REGEXP_SUBSTR (val, '[^,]*,', 1, 3), ',') pos3
      ,RTRIM (REGEXP_SUBSTR (val, '[^,]*,', 1, 4), ',') pos4
      ,RTRIM (REGEXP_SUBSTR (val || ','
                          , '[^,]*,', 1, 5), ',') pos5
    FROM (SELECT 'AAA,BBB,,DDD,,FFF' val FROM dual);

    The query above works in Oracle 10 or 11, but in Oracle 11, you can also do it with only REGEXP_SUBSTR, without using RTRIM:

       REGEXP_SUBSTR (val, '([^,]*),|$', 1, 1, NULL, 1) pos1
      ,REGEXP_SUBSTR (val, '([^,]*),|$', 1, 2, NULL, 1) pos2
      ,REGEXP_SUBSTR (val, '([^,]*),|$', 1, 3, NULL, 1) pos3
      ,REGEXP_SUBSTR (val, '([^,]*),|$', 1, 4, NULL, 1) pos4
      ,REGEXP_SUBSTR (val, '([^,]*),|$', 1, 5, NULL, 1) pos5
    FROM (SELECT 'AAA,BBB,,DDD,,FFF' val FROM dual);

    The problem with your first request was that he was looking for sub channels of 0 or more non-virgules. There was as a substring. consisting of 3 characters starting at position 1, he returned "AAA", as expected. Then there was an another substring, the 0 characters, starting at position 4, so it returned NULL. Then, there was a substring of 3 characters starting at position 5, so he returned 'BBB '.

    The problem with your 2nd request was that he was looking for 1 or more non-virgules. 'DDD' is the 3rd this substring.

    Published by: Frank Kulash, on February 16, 2012 11:36
    Added Oracle 11 example

  • Fill an empty table with predefined values

    Hi I have a page that uses ExecuteWithParams. I load a table on this page with pre defined values. The user access the page and changes value according to the needs and calls commit.

    My problem is that I can't figure out how to load the table with the page? I am not advocating the code as I have already written. I have no idea where to call the code of.
    Thank you


    The best practice for this would be to use method call activities in the workflow as suggested change.

    Suggestion of Vinod was the only way to do it in 10g, but I wouldn't recommend it to 11g, as the implementation of the action is hidden in the definition of the page and you must understand the State of refresh and refresh and to ensure that the action does not more often than you. Task flow approach shows explicitly when the method is called


  • Fill a table with date values with a fixed increment


    I want to fill a table with a date column with the increment of a fixed value date values. The start date is selectable, the increment is selectable and the number of records is adjustable as well.
    For example
    start date is 1905-Jan-02, 15:00 (DD-MON-YYYY, HH24:MI:SS)
    increment is 1 hour and 5 minutes
    None. records is 10
    then the dates in the table must be
    REC 1 1905 - Jan - 02, 15:00
    REC 2 1905 - Jan - 02, 16:05
    REC 3 1905 - Jan - 02, 17:10
    REC 9 1905 - Jan - 02, 23:40
    REC 10 1905 - Jan - 03, 00:45:00

    We are working on 11 GR 2, the number of records can be between a few hundred and a few million and they must be ordered with Crescent of time (maybe to have a whole id).
    Any ideas how to fill this table (simple and fast?) using sql / plsql are welcome.

    Thanks, Hannes

    Something along the lines of:

    SQL> alter session set nls_date_format = 'YYYY-Mon-DD HH24:MI:SS';
    Session altered.
    SQL> select trunc(sysdate,'HH')+((rownum-1)*(1/24)*(65/60)) as dt
      2  from dual connect by rownum <= 20;
    2010-Aug-26 16:00:00
    2010-Aug-26 17:05:00
    2010-Aug-26 18:10:00
    2010-Aug-26 19:15:00
    2010-Aug-26 20:20:00
    2010-Aug-26 21:25:00
    2010-Aug-26 22:30:00
    2010-Aug-26 23:35:00
    2010-Aug-27 00:40:00
    2010-Aug-27 01:45:00
    2010-Aug-27 02:50:00
    2010-Aug-27 03:55:00
    2010-Aug-27 05:00:00
    2010-Aug-27 06:05:00
    2010-Aug-27 07:10:00
    2010-Aug-27 08:15:00
    2010-Aug-27 09:20:00
    2010-Aug-27 10:25:00
    2010-Aug-27 11:30:00
    2010-Aug-27 12:35:00
    20 rows selected.

Maybe you are looking for

  • graphical analysis

    How to do a graphic logo analysis of right to left on the screen in 10.2.3?

  • HP - 15-ac600ur: some drivers not installed

    Hello Sorry for my English. Some drivers has not been installed correctly. Download all the drivers from the link: But when installing the chipset

  • I need the serial number for my laptop book elite. How can I find

    It seems that my laptop serial number located in the battery compartment.  How can I open - or y at - it another way to determine the serial number?

  • Portege 3490CT - how to remove the hard drive?

    Hello I have a problem with my Portege 3490CT. It is completely dead (won't start not or read from USB floppy to use recovery discs). I would like to remove the hard drive to try to recover the information about it. Can someone tell me how to get out

  • Compaq cq58: bios administrator password

    Nice dayI have a compaq cq58.I need the bios administrator password.The error code is 70769099.Please help.Thank you