Splitting column into several lines dynamically

Hi all

I had only one requirement, for which I am not able to find a solution. Please help me to write the SQL query to do this.

Requirement is

We have a table e.g. PLAYER_SCORE

Reader Score
Amar87,56,100
Akbar62
Antony91, 23

Expected result is

Reader Score
Amar87
Amar56
Amar100
Akbar62
Antony91
Antony23

Kind regards

SSS

Select Player, regexp_substr (score, "[^,] +', 1, level")

of player_score

connect by level<= length(regexp_replace(score,="" '[^,]',="" ''))="" +="">

and prior dbms_random.value is not null

and prior score = score

Tags: Database

Similar Questions

  • Convert a single column into multiple lines

    Hi people,

    I have a task to display a single column into multiple lines (for use in LOV)

    For Ex:

    The column consistes of value such as 98,78,67,68,34,90. -It's a unique column values where none of the values can be ' number that is separated by commas

    Then we must view it as

    98
    78
    67
    68
    34
    90
    -under the number of lines (no lines can be ' do not number).

    Thanks in advance

    Try this...

    SQL> ed
    Wrote file afiedt.buf
    
      1  select regexp_substr('98,78,67,68,34,90', '[^,]+',1,level) Value
      2    from dual
      3*   connect by level <= regexp_count('98,78,67,68,34,90',',') + 1
    SQL> /
    
    VALUE
    -----------------
    98
    78
    67
    68
    34
    90
    
    6 rows selected.
    

    Thank you!

  • 1 line into several lines

    I have a table time_entries
    create table time_entries 
    (employee_id integer, 
    start_date date, 
    end_date date, 
    CONSTRAINT pk_time_entries PRIMARY KEY (employee_id, start_date))
    Suppose I have a line in this table (date in the format yyyy-mm-dd):

    Employee_ID, start_date, end_date
    -------------------------
    1, 2012-08-27, 2012-09-02


    As you can see the difference between dates is 7 days. I want to write a query so that each day has its own line, that is, I want to write a query that translates into 1 line above 7 rows. This is the result set, I want:

    Employee_ID, start_date, end_date
    -------------------------
    1, 2012-08-27, 2012-08-27
    1, 2012-08-28, 28-08-2012
    1, 2012-08-29, 2012-08-29
    1, 2012-08-30, 2012-08-30
    1, 2012-08-31, 2012-08-31
    1, 2012-09-01, 2012-09-01
    1, 2012-09-02, 2012-09-02

    Is it possible to do it in a select statement?

    Published by: srhcan on August 17, 2012 16:26

    Published by: srhcan on August 17, 2012 16:26

    srhcan wrote:

    BluShadow wrote:

    srhcan wrote:
    I expect a generic SQL solution that can run on databases other suppliers as well.

    This is not good design. Different databases have different ways of doing things for the best performance, etc. You are advised to use the best data, you write the query and does not focus on making things way 'generic '. This way you could design a "database layer" (aka the database layer) specific to each database.

    I agree with your point of view. But the system, I'm currently train do not have a DAO layer for each type of database. All SQLs are coded in the business layer, and this is why all these SQLs are generic SQLs.

    Then you must accept this run of things in this code will be more difficult to do, probably more code involved and may not be as effective as it could be. As they say... sh! design t = sh! application of t.

  • A line into several lines

    Hello

    In a table, there is a line like this:


    POLICIES OF NM
    ---- --------------
    SirketKullanicilari Web report: x-r-t
    TramerKullanicilari: x-r-t
    TramerCognosAdmins: x-r-p-t-w
    TramerReportAdmins: x-r-t-w

    There is a record of the line and I need to insert this disc as 4 rows as below the statement. In the policy column, there are 4 lines and separated by Chr (10).

    POLICIES OF NM
    ---- --------------
    SirketKullanicilari Web report: x-r-t
    TramerKullanicilari Web report: x-r-t
    TramerCognosAdmins Web report: x-r-p-t-w
    TramerReportAdmins Web report: x-r-t-w

    Welcome to the forum.

    SQL> create table t as
      2  select 'Web Report' nm
      3  ,      'SirketKullanicilari: x-r-t'||chr(10)||
      4         'TramerKullanicilari: x-r-t'||chr(10)||
      5         'TramerCognosAdmins: x-r-p-t-w'||chr(10)||
      6         'TramerReportAdmins: x-r-t-w' policies
      7  from   dual;
    
    Table created.
    
    SQL> select * from t;
    
    NM         POLICIES
    ---------- -----------------------------------
    Web Report SirketKullanicilari: x-r-t
               TramerKullanicilari: x-r-t
               TramerCognosAdmins: x-r-p-t-w
               TramerReportAdmins: x-r-t-w
    
    1 row selected.
    
    SQL> select nm
      2  ,      regexp_substr(policies, '[^'||chr(10)||']+', 1, rn) policy
      3  from   t
      4  cross join (select rownum rn
      5              from ( select max(length(regexp_replace(policies, '[^'||chr(10)||']+'))) + 1 mx
      6                     from   t
      7                   )
      8              connect by level <= mx
      9             );
    
    NM         POLICY
    ---------- -----------------------------------
    Web Report SirketKullanicilari: x-r-t
    Web Report TramerKullanicilari: x-r-t
    Web Report TramerCognosAdmins: x-r-p-t-w
    Web Report TramerReportAdmins: x-r-t-w
    
    4 rows selected.
    

    Borrowed from http://nuijten.blogspot.nl/2011/08/splitting-comma-delimited-string-regexp.html

    Be sure to read:
    {message: id = 9360002} so that you know how to post to the format examples etc.

  • I missed the SHIFT key and press several keys in the lower corner of my keyboard LH. Firefox split up into several iterations, and I had to reboot.

    I missed the SHIFT key and press several buttons in the lower left corner of my keyboard. Firefox has lost the tab that I was using and divided into a separate iteration for each other (plus two I had closed). I could not recover and had to close all but one of them and restore all my tabs.

    What I had done and how I should have recovered?

    First, you need to update to Firefox 18.0.1 Firefox updated to the latest version. The version you are on is bug and little course.

    Second, it looks like you may have entered groups of tabs. Use tab groups to organize a large number of tabs is that look familiar?

  • Convert a line into several lines

    Hello

    I have a Calendar_1 table with 4 columns and 1 row

    CREATE TABLE Calendar_1
    (
    Sunday (1) tank,.
    Monday (1) tank,.
    Tuesday (1) tank,.
    Wednesday char (1)
    );

    INSERT INTO Calendar_1 VALUES ('A', ' B ', 'C' ' d ' ");
    COMMIT;

    I need to get my result under a single column 'DAYS' as shown below

    DAYS
    --------
    A
    B
    C
    D

    Could you please provide me with the required SQL code

    Concerning
    -Learnsequel

    Like this

    select decode(l, 1, sunday, 2, monday, 3, tuesday, 4, wednesday) days
      from calendar_1
      cross join (select level l from dual connect by level <= 4) 
    
  • Divide a line into several lines based on the amount

    Dear all,

    Please provide a solution for this scenario.

    The query...

    Select line_id, component, sizes, quantity of sales_tab;

    and the result...

    LINE_IDCOMPONENTSIZESQUANTITY
    8BODYSMALL214.33
    4BODYMEDIUM187.89
    1BODYLARGE230.87
    7BODYEXTRA LARGE205.03
    3BODYXX LARGE148,52
    2SLEEVESMALL197.57
    6SLEEVEMEDIUM176.4
    5SLEEVELARGE193.8
    10SLEEVEEXTRA LARGE184.87
    9SLEEVEXX LARGE138.53

    Business rule: for all rows where the quantity is greater than 200, generate a new identical line with quantity = quantity - 200 like - we. This is the quantity of each line must not exceed 200.

    The required result is...

    LINE_IDCOMPONENTSIZESQUANTITY
    8BODYSMALL200
    8BODYSMALL14.33
    4BODYMEDIUM187.89
    1BODYLARGE200
    1BODYLARGE30,87
    7BODYEXTRA LARGE200
    7BODYEXTRA LARGE5.03
    3BODYXX LARGE148,52
    2SLEEVESMALL197.57
    6SLEEVEMEDIUM176.4
    5SLEEVELARGE193.8
    10SLEEVEEXTRA LARGE184.87
    9SLEEVEXX LARGE138.53

    Thank you

    Usman

    Use:

    Select line_id,

    component,

    sizes,

    amount of column_value

    of sales_tab.

    table)

    cast)

    MultiSet)

    Select less (200, - 200 quantity * (level - 1))

    of the double

    connect in quantity > 200 * (level - 1)

    )

    as sys. OdciNumberList

    )

    )

    order of line_id,

    amount desc

    /

    For example:

    SQL > with sales_tab like)
    2 Select line_id 8, component 'Body', 'SMALL' amount 214.33 of all sizes the double union
    3. Select 4, 'BODY', 'WAY', 187.89 double Union all
    4 Select 1, 'BODY', 'LARGE', 230.87 double Union all
    5. Select 7, 'BODY', 'EXTRA LARGE', 205.03 double Union all
    6 select 3, 'BODY', 'XX-LARGE', 148,52 of double union all
    7. Select 2, 'CHANNEL', 'SMALL', 197.57 double Union all
    8. Select 6, 'CHANNEL', 'WAY', 176.4 from dual union all
    9. Select 5, 'ROUND', 'BIG', 193.8 double Union all
    10. Select 10, 'ROUND', 'EXTRA LARGE', 184.87 double Union all
    11. Select 9, 'ROUND', 'XX-LARGE', double 138.53
    12                  )
    13. Select line_id,
    14 components,
    15 sizes,
    amount of 16 column_value
    sales_tab 17,
    Table 18)
    19 mount)
    (20) type multiset
    21 select less (200, - 200 quantity * (level - 1))
    22 double
    23 connect quantity > 200 * (level - 1)
    24                            )
    25 as sys. OdciNumberList
    26                    )
    27              )
    28 order of line_id,
    29 quantity desc
    30.

    LINE_ID COMPON QUANTITY SIZES
    ---------- ------ ----------- ----------
    1 BODY 200 GRAND
    1 BODY GRAND 30,87
    2 SLEEVES SMALL 197.57
    3 BODY XX LARGE 148,52
    4 WAY 187.89 BODY
    5 SLEEVES 193.8 GRAND
    SLEEVE 6 MEANS 176.4
    7 BODY 200 EXTRA-LARGE
    7 BODYWORK 5.03 EXTRA-LARGE
    8 200 SMALL BODY
    8 BODY SMALL 14.33

    LINE_ID COMPON QUANTITY SIZES
    ---------- ------ ----------- ----------
    CHANNEL 9 XX GRAND 138.53
    10 SLEEVES EXTRA-LARGE 184.87

    13 selected lines.

    SQL >

    SY.

  • Splitting artboard into several work plans?

    I work with a file more old that someone else created. It consists of eleven 11 x 17 drawings, which were all created on a single work plan. I would get each drawing on its own work plan. I tried to save the file down to CS3, reopening it and choosing the tiles from the page, but I get an error that it cannot open the illustration. Is there another way to convert this into 11 work plans?

    I don't know anyway magical auto-tuile on 11 new 11 x 17 work plans. I would probably just start a new file with plans of 11 work organized as you want, then copy and paste the work of the original file.

  • Divide the data into several lines in the table

    Hello

    I use apex of Oracle 10 g 3.2.

    I have a requirement like this.

    I have a table like TableA

    Col1 Col2
    90 1
    91 1:2:3
    92 3

    I want the data as

    Col1 Col2
    90 1
    91 1
    91 2
    91 3
    92 3

    How to do this?

    Thank you

    Published by: user13305573 on August 3, 2010 20:16
    with
       your_data as
    (
       select 90 as col1, '1'  as col2      from dual union all
       select 91, '1:2:3'   from dual union all
       select 92, '3'       from dual
    )
    select
       y.col1,
       regexp_substr(y.col2, '[^:]+', 1, t1.column_value) as col2
    from
       your_data y,
     13     table(cast(multiset(select level from dual connect by  level <= length (regexp_replace(y.col2, '[^:]+'))  + 1) as sys.OdciNumberList)) t1
     14  /
    
                  COL1 COL2
    ------------------ -----
                    90 1
                    91 1
                    91 2
                    91 3
                    92 3
    
    5 rows selected.
    
    Elapsed: 00:00:00.05
    ME_XE?select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    5 rows selected.
    
    Elapsed: 00:00:00.03
    ME_XE?
    
  • Split a string of html into multiple lines

    I'm trying to convert a string into several lines using REGEX, can someone tell me if this is achievable using expressions regular oracle

    WITH qry AS)

    SELECT ' < p > < /p > < p > two < /p > < p > 3 < /p > ' Str

    OF THE DOUBLE

    )

    SELECT

    -regexp_replace)

    -regexp_replace)

    regexp_substr (str,

    ' [^ < (/?) p >]. (*', 1, LEVEL)

    (-, '< p >', ")

    (-, "< /p >", ")

    AB

    OF qry

    CONNECTION OF LEVEL < = LENGTH (regexp_replace (str, ' [^ < (/?) p >]. * "")) + 1

    ;

    Output current:

    1 a < /p > < p > two < /p > < p > 3 < /p >

    2 (null)

    3 (null)

    4 (null)

    Expected results:

    1 a

    2 two

    3 three

    user2022369 wrote:

    You are right that I excluded NULL, 8 rows out put to our example looks correct to me

    The result included "two" because its locked up in one of our separators

    '

    I'm not sure of any character that never appear in str

    Thank you

    Something like:

    WITH qry AS)

    SELECT "Hello World

    one

    a header
    a text or
    here goes

    two

    more text here

    three ' str

    OF the double

    )

    SELECT THE LEVEL,

    REGEXP_SUBSTR)

    Str,

    '(())? (.*?) (()|$)',

    1,

    LEVEL,

    'I,

    4

    ) ab

    OF qry

    CONNECT BY LEVEL<>

    Str,

    '(())? (.*?) (()|$)',

    1,

    'I '.

    )

    /

    LEVEL AB
    ---------- --------------------------------------------------
    1 Hello World
    2 a
    3 a header
    a text or
    here goes
    4 two
    5 more text here
    6 three

    6 selected lines.

    SQL >

    SY.

  • Conversion of column to the lines

    Hello
    I'm currently building and SQL to convert columns from several lines to all lines - see below the test data and the expected result:
    CREATE TABLE XX_TEST (NAME VARCHAR2 (10), A1 VARCHAR2 (10), A2 VARCHAR2 (10), A3 VARCHAR2 (10), A4 VARCHAR2 (10), A5 VARCHAR2 (10));
    INSERT INTO XX_TEST VALUES('LIST','A','B','C','D','E');
    INSERT INTO XX_TEST VALUES('L1','1',,'3',,);
    INSERT INTO XX_TEST VALUES('L2','1','5','4',,);
    ENGAGE
    SELECT * FROM XX_TEST;

    Expected result:
    NAME is the table XX_TEST column, but the COLUMN and the VALUE are converted to lines - columns

    NAME THE COLUMN VALUE
    L1 A1 1
    L1 A2 NULL
    L1 A3 3
    L1 A4 NULL
    L1 A5 NULL
    L2 A1 1
    L2 A2 5
    L2 A3 4
    L2 NULL A4
    L2 A5 NULL

    Thank you
    BS

    Hello

    user13409900 wrote:
    Thank you Alex and Frank,

    Don't foget Aketi!

    The two ways are really good and functional in my situation.
    I apologize for not giving version: I'm on 11g so I think that can use Unpivot. It would be really more faster (performance given the volume of data) to use unpivot characteristic of 11 g?

    If there is no significant difference, whereas I think is that SELECT... UNPIVOT would be faster. It is purely a guess. It depends on several factors, including your data, your index and your machine. I don't have access to one of them.

    Try both ways and compare performance. (Compare the results, too, to check that the two qiueries are really doing the same thing).
    If you need help, see this thread:
    HOW to: Validate a query of SQL statement tuning - model showing

    I've never used before unpivot.

    This sounds like a good opportunity to learn.

  • How to split a string into several substrings parent using a delimiter

    Hello

    I am forced to split a string into several substrings parent using a delimiter.

    And insert these substrings in variuou of the columns of a table in a row.

    For example. The sting is: ABC * DEF * GHI * JKH *.

    where ' *' is the separator.

    Desired output:

    Col1 Col2 Col3 Col4 Col5

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

    JKH GHI ABC DEF (null)

    Could you please guide me how can I achieve this.

    Thank you

    Bogoss

    Hello Salim,

    Leave the thread for reference... got this excerpt:

    with t as

    (

    Select "c: its: hgfd:1:23" Str

    )

    Select

    REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 1, null, 1) col1

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 2, null, 1) col2

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 3, null, 1) col3

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 4, null, 1) col4

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 5, null, 1) col5

    t;

    This code snippet works well, but for the fixed columns. Here are 5 predefined columns.

    But I need to have a logic that I can browse the string any No.. sometimes.

    For example. If I get 3 secondary channels of the parent chain... I need to insert into 3 columns.

    And if I get 6 strings under... I need to insert into 6 columns.

    Could you please help me develop a logic like that.

    I use Oracle database 10g.

    And the data are currently being collected on external table... but I can store in a variable or a column of a database table.

    Thank you

    Bogoss

  • Help to extract data Clob to a column in a table that has several lines in a table

    Help to extract data Clob to a column in a table that has several lines in a table

    It works for only the first line

    CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';

    Grant read, write on DIRECTORY XMLDIR to the public;

    () dbms_xslprocessor.clob2file

    beef in CLOB,

    XMLDIR IN VARCHAR2,

    "testfile2.txt" IN VARCHAR2);

    DECLARE

    buf CLOB.

    BEGIN

    SELECT H15_DOC

    IN buf

    OF H15TEST. H15_STAGE

    where rownum = 1;

    dbms_xslprocessor.clob2file (buf, 'XMLDIR', 'testfile2.txt');

    END;

    /

    -This error code

    CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';

    Grant read, write on DIRECTORY XMLDIR to the public;

    () dbms_xslprocessor.clob2file

    XData in CLOB,

    XMLDIR IN VARCHAR2,

    "testfile2.txt" IN VARCHAR2,

    CSID in NUMBER: = 0);

    DECLARE

    CURSOR xmlmycur IS SELECT H15_DOC

    OF H15TEST. H15_STAGE

    where rownum = 102140;

    l_clob CLOB.

    XData CLOB.

    BEGIN

    DBMS_LOB.CREATETEMPORARY (l_clob, true);

    DBMS_LOB.CREATETEMPORARY (xdata, true);

    OPEN xmlmycur.

    LOOP

    SEEK xmlmycur INTO xdata;

    dbms_xslprocessor.clob2file (xdata, 'XMLDIR', 'testfile2.txt');

    EXIT WHEN xmlmycur % notfound;

    END LOOP;

    CLOSE Xmlmycur;

    END;

    /

    ORA-21560: 3 argument is null, invalid or out of range

    ORA-06512: at "SYS." DBMS_LOB", line 991

    ORA-06512: at "XDB". DBMS_XSLPROCESSOR', line 324

    ORA-06512: at line 15 level

    FYI, it seems that the file being created will exceed 5 gig

    Yes, it is a known issue with DBMS_XSLPROCESSOR.clob2file with big files.

    Here is a slightly modified version of the code that I posted earlier, fixing WRITE_ERROR except:

    DECLARE

    v_file utl_file.file_type;

    -write a unique to clob

    procedure write_clob (p_content in clob) is

    v_buffer varchar2 (32767).

    V_POSITION pls_integer: = 1;

    v_amount pls_integer: = 32767;

    Start

    loop

    Start

    DBMS_LOB. Read (p_content, v_amount, v_position, v_buffer);

    exception

    When no_data_found then exit;

    end;

    UTL_FILE.put_raw (v_file, utl_raw.cast_to_raw (v_buffer), true);

    V_POSITION: = v_position + v_amount;

    end loop;

    end;

    BEGIN

    -Open the file

    v_file: = utl_file.fopen ('TEST_DIR', 'testfile2.txt', 'wb', 32767);

    -loops through the lines

    for r in)

    Select h15_doc

    of h15test.h15_stage

    )

    loop

    write_clob (r.h15_doc);

    end loop;

    UTL_FILE.fclose (v_file);

    END;

    /

  • Unique table with several columns or several tables split?

    What is the best.

    A table with multiple columns inside or divided into several tables. Why?
    How will the performance in the two scenarios?

    Hello

    user13024762 wrote:
    I have a table EMP that has column EMP_ID, EMP_NAME MGR_ID, MGR_NAME, SALARY, EXP_IN_MNTHS, EXP_IN_YRS... etc with multiple columns

    I have the following tables
    EMP-> EMP_ID, EMP_NAME

    Each row in the table emp thie represents a separate employee. I guess other columns in the emp table might be birth_date, social_security_number and status (by example, 'Active', 'Leave', 'complete'). Here's what an employee has (at least) one of. If there is a one-to-many relationship between an employee and an attribute, then you probably want another table for this attribute.

    BISHOP-> EMP_ID, MGR_ID, MGR_NAME

    There is a one-to-many relationship between employees and managers? In other words, an employee may have 2 or more managers? If Yes, then you need another table.
    If there is only a one-to-one relationship between employees and managers (in other words, if an employee is never more than 1 Manager) so why don't you just have a mgr_id column in the emp table?
    Managers are also used for? (This is often the case, as in scott.emp and hr.employees.) If so, do not store their names in the EME and tables of mgr. Store name (and date of birth and other information) in the table emp only and, if you need a table of Bishop, just the emp_id and mgr_id column.

    SAL-> EMP_ID, SALARY

    There is a one-to-many relationship between the employees and wages? In other words, an employee may have 2 or more treatments? If so, how will you use the values? Is a special treatments in some way, as it will be used more often than others? (In other words, you may have a current and past wages salary, but the last wages are rarely used.)
    If you never have more than 1 salary for a given employee, why not just have a sal column in the emp table?

    EXP-> EMP_ID, EXP_IN_MNTHS, EXP_IN_YRS

    There is a one-to-many relationship between the employees and what whether you store in this table?

    etc. with more tables

    What is the best based on

    (1) performance and data recovery
    (2) ease of use
    (3) maintainability

    A one-to-many relationship requires an additional table. If an employee can have up to 3 managers, don't have mgr1, mgr2 and mgr3 columns in the emp table. Use a separate table, with up to 3 lines for the same employee, instead.
    For 1-1 relationships, it is usually best to not have separate tables.

  • Insert several lines with dynamic data

    Hello
    When I do an insert into a table that has several lines of dynamic information. on
    a page, it inserts all rows that are dynamically filled. I want only what he
    to insert the lines that I choose the initials on. How can I do? Let's say I
    have 5 items that are displayed on a page and I want to insert only original
    the first 2 because the last 3 are left blank, how should I do this? I tried
    implementation of an if statement that says:

    < cfif "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".

    Then make the insertion in the table

    < cfelse >
    < / cfif >

    I have this game were also up in a loop that says:

    < cfloop index = "help" list = "" #form.listofids # "delimiters =",">"

    Here is the code for just the insertion. I also have a code here
    Update another table. I got this to work, so I just try to get the insertion
    works fine for the moment. I can not use this where the query statement:
    Where ItemID = #id # because I'm trying to insert into the table of approval, not
    the items table. The table is just updated with some other info. in
    a few other input boxes.

    < cfloop index = "help" list = "" #form.listofids # "delimiters =",">"
    < cfif "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".

    < cfquery Datasource = '#application. DataSource #">"
    Insert into accreditation (APV_ItemID,
    APV_ECID,
    Document_Type,
    Approval_Initials)

    Values (' #Evaluate ("form.) (' ItemID # help # ") #',
    ' #Evaluate ("form. ("ECID # help #") #',
    < cfif isDefined (form '. ') ("Help of # PNR_Doc_Type # ') and
    "form. "Help of # PNR_Doc_Type #" NEQ "" > "".
    ' #Evaluate ("form. ("Help of # PNR_Doc_Type # ') #',
    < cfelse >
    NULL,
    < / cfif >

    < cfif isDefined (form '. ') ("Help of # PNR_Approval_Initials # ') and
    "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".
    ' #Evaluate ("form. (Aide de # PNR_Approval_Initials #») #
    < cfelse >
    Null value
    (< / cfif >)

    < / cfquery >

    < / cfif >
    < / cfloop >

    On the page display, just a table of dynamic info. Here are the 4
    things that I have on this page that needs to be inserted to the database.

    < input type = "hidden" name = "' ECID #ItemID #" value = "#ECID #" > "
    < input type = "hidden" name = "' ItemID #ItemID #" value = "#ItemID #" > "
    < input type = "hidden" name = "" PNR_Doc_Type #ItemID # ' value = "PNR Req" > "

    < td align = "center" >
    < cfif Approval_Initials is not "" > "".
    #Approval_Initials #.
    < cfelse >

    < select name = "PNR_Approval_Initials #ItemID #" >
    < option value = "" > select initials < / option >
    < cfloop query = "ShowInitials" >
    < Cfif Engineer_Initials EQ 1 >
    < option value = "#Initials #" > #Initials # < / option >
    < / cfif >
    < / cfloop >
    < / select >

    < / cfif >
    < table >

    Can someone help me please on just the insertion in the database so that it
    will insert on the lines that I chose the initials on and not others? Thank you.

    Andy

    You almost managed, but I see that you have commented.

    (" The help of # PNR_Approval_Initials # ') AND form ["PNR_Approval_Initials # help #" ""] NEQ "" >

    Do things here

Maybe you are looking for