Javascript reference the column value

Hi all

I have a JavaScript function defined that I try to get a column value to, but get an error in Firebug.

Here is my selection where I try passing the value.
select
'<div o nclick="showdetail(this,'||'#ROWNUM#,'||'#PRIMARY#)" 
st yle="cursor:hand;cursor:pointer;text-decoration:underline;font-weight:bold;">Show</div>' Details,
...
from
...
(There is no space in the onclick and style, but it would not show correctly here)

Error readings of Firebug, character not in line showdetail(this,10,#PRIMARY#)

Any help is appreciated.

Thank you

-Chris

Hello

Is PRIMARY_NM number of value?
If it is not then

select
'
[+]
' Details, ... from ...

Kind regards
Jari

Tags: Database

Similar Questions

  • Convert the column values into buckets

    Hello

    Please help me to convert the column values into buckets.
    I have the values of the columns in the following way.


    Age of Orderdate * 9 10 12 14 15 18 19 20 21 22 26 27 28 29 33 34 40 45 * and so on



    But the requirement is the column values should be displayed in form

    Age by order date * 15 1 2 3 4 5 6 7 8 9 10 11 - 16-20 21-25, 26-30 30 + *.


    Please someone give me the solution.

    Thanks in advance.

    Hervé Rama

    Hi Richard,

    Just to double check, you have Setup buckets for 1, 2, 3, 4, 5, 6, 7 and 8 individually (each with a fair value). The problem is that you simply do not have all data fall into buckets above, correct?

    If this is the case, it looks like has been answered your original question. If so, the label would assign 'Proper' points by clicking on the button label correct next to the appropriate response and open a new thread with your new question. The reason why I say this is it will help other people who have a similar bucket question to your solution, without complicating the issue with subsequent questions.

    If you can post a separate thread, I'd be more than happy to help you with your secondary problem.

    Best regards

    -Joe

  • convert the column values to a single line...

    I have to return the column values to a single line separated by commas.
    If the nulls in the column just ignore without a comma.
    Here is one for example. There are three values and two NULL values in the table
    SQL> select ID from temp_fa;
    ID
    -----
    
             1
             2
    
             3
    
             5
    
    6 rows selected.
    
    
    I am expecting an output as 1,2,3,5
    Help, please

    There is always more than one title in the Oracle world ;)
    You can use the TRIM, for example (same configuration as your example):

    hoek&XE>  create table t as select level col  from dual connect by level <= 6;
    
    Tabel is aangemaakt.
    
    hoek&XE> update t set col = null where col in (1,3,5);
    
    3 rijen zijn bijgewerkt.
    
    hoek&XE> select * from t;
    
           COL
    ----------
    
             2
    
             4
    
             6
    
    6 rijen zijn geselecteerd.
    
    hoek&XE> select ltrim(sys_connect_by_path(col, ','), ',') output
      2  from  ( select col
      3          ,      row_number() over (order by col) rn
      4          from   t
      5        )
      6  where connect_by_isleaf=1
      7  start with rn=1
      8  connect by rn = prior rn+1;
    
    OUTPUT
    -------------------------------------------------------------------------------------------------------------
    2,4,6,,,
    
    1 rij is geselecteerd.
    
    hoek&XE> select trim ( both ',' from sys_connect_by_path(col, ',')) output
      2  from  ( select col
      3          ,      row_number() over (order by col) rn
      4          from   t
      5        )
      6  where connect_by_isleaf=1
      7  start with rn=1
      8  connect by rn = prior rn+1;
    
    OUTPUT
    -------------------------------------------------------------------------------------------------------------
    2,4,6
    
    1 rij is geselecteerd.
    
  • Mark from a table where the column value is a colon-delimited list

    Version: Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    Hello

    This is a new query of a query Frank helped me with: https://community.oracle.com/message/12506306#12506306

    Demand is all users to restrict the report based on a multiple selection on the front-end server (application APEX) filter.

    The filter returns that a colon-delimited list and the data in the table can be saved in a delimited by a colon list too. There may be 1 to n values (up to 4000 characters).

    I need a WHERE clause that will allow a match, if it exists, between the data in the column of the Table and the Mult-selection list filter.

    The abbreviated for this post query would be something like:

    SELECT slt_id, slt_item, slt_owner

    OF slt_dashboard

    WHERE slt_owner IN (colon delimited page list);

    The Create Table and Insert statements:

    CREATE TABLE slt_dashboard
    (
      dashboard_id  NUMBER,
      slt_id        VARCHAR2(10),
      slt_item      VARCHAR2(2500),
      slt_owner     VARCHAR2(4000),
      slt_type      VARCHAR2(25),
      slt_year      NUMBER,
      parent_id     NUMBER
    );
    
    --Insert slt_dashboard
    INSERT INTO slt_dashboard(dashboard_id,slt_id,slt_item,slt_owner,slt_type,slt_year,parent_id)
    VALUES (12,'1.1','Implement revenue enhancement initiatives','E15889:JPARISI:BDUR63','Business Commitment',2014,6);
    
    INSERT INTO slt_dashboard(dashboard_id,slt_id,slt_item,slt_owner,slt_type,slt_year,parent_id)
    VALUES (13,'1.2','Strengthen our Energy position','KVROMAN','Business Commitment',2014,6);
    
    
    

    I have a function to separate the list delimited by two points in a table for the IN clause, but because these values can be saved in a delimited list of Colon in the column of the Table, I have a problem, being able to analyze the data in the column, AND the filter data.

    The function is:

    CREATE OR REPLACE FUNCTION get_list( p_string IN VARCHAR2
                                        ,p_delimiter IN VARCHAR2 DEFAULT ':'
                                       )
        RETURN vc_array_1
        PIPELINED
    IS
        l_string VARCHAR2( 32000 );
        l_array wwv_flow_global.vc_arr2;
    BEGIN
        l_array     :=
            APEX_UTIL.string_to_table( p_string
                                      ,p_delimiter
                                     );
    
        FOR i IN l_array.FIRST .. l_array.LAST
        LOOP
            PIPE ROW ( TRIM( l_array( i ) ) );
        END LOOP;
    
        RETURN;
    END;
    
    
    

    The function called in the query in the form (it's just for reference in case someone wanted to know):

    SELECT ...
    FROM ...
    WHERE slt_owner IN (SELECT * FROM TABLE( get_list( :P115_SLT_OWNER ) ));
    

    But I can't use this approach because the data in the Table can be saved in a delimited list of Colon too.

    Desired output:

    If the Mult-Select list filter contains: E15889:JPARISI then

    1.1 implementation of the E15889 revenue improvement initiatives; JPARISI (it's a semicolon between the names)

    If the multiple-selection list filter contains: KVROMAN then

    1.2 strengthen our position of energy KVROMAN

    If the multiple-selection list filter contains: BDUR63:KVROMAN then

    1.1 implementation of the BDUR63 revenue improvement initiatives

    1.2 strengthen our position of energy KVROMAN

    Please let me know if something is not clear.

    Thank you

    Joe

    I went to approach the Table and the Page works perfectly.

    Thank you to everyone!

    Thank you

    Joe

  • Compare the column values for multiple lines

    I am new to oracle and I have a requirement to compare the values of column across multiple lines.  If all column values are the same, I want to display that value, if the columns are not the same, I need to display 'no match' as value.   I need id to group values and display a status value based on the above logic.   Can anyone offer assistance with dispalying the result expected below?

    Sample

    Table

    State ID

    1         S

    2         L

    1         S

    2          S

    expected results

    State ID

    1         S

    2 no match


    Hello

    That's what you asked for:

    SELECT id

    CASE

    WHEN COUNT (DISTINCT status) > 1

    THEN "no match."

    For ANOTHER MIN (status)

    The END as status

    T

    GROUP BY id

    ;

    Want that if each State ID is NULL?  The CASE expression above returns NULL in this situation.

  • A combine with other values of the column, the column values


    Hi all

    I need your help on this. I have a req I need to combine values of a percentage to the values of column test column. Here are examples of data

    Select decode('test',null,'ABC') abc, b.percent, b.amount

    from tableA, tableB b

    where id = b.id

    Examples of data

    Amount of the percentage TEST

    ABC              0.3                10

    ABC              0.5                20

    ABC              0.2                30

    After him combine the values of percentage to the ABC percentage column values must be zero

    Desired output

    Amount of the percentage TEST

    ABC(30%)                              10

    ABC(50%)                              20

    ABC(20%)                              30

    Valuable suggestions are appreciated

    Alter the query from Etbin with a trifle for the exact release.

    with

    t as

    (select 'ABC' test, 0.3 percent, 10 amount of all the double union

    Select 'ABC', 0.5, 20 double Union all

    Select 'ABC', 0.2, 30 double

    )

    Select test | ' ('| to_char(100 * percent) |'%)' test, null as a percentage, the amount

    t

  • Select the column values in the collection

    Greetings,

    I want to select column values from the collection (plsql tables or table), as the following code, would it be possible
    Here tt is any collection



    Select emp_no, name, date of birth, sal tt (1), tt (2), tt (3), tt (4) emp; -single line query

    Select name, Department of justice, strength and dep_no in tt (5), tt (6), tt (7), tt (8) EMP; -single line query


    Version
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production

    Thanks in advance

    Not sure about your business needs. But technically you can do.

    declare
       type tbl is table of number;
       lemp tbl := tbl();
    begin
       lemp.extend;
       lemp.extend;
       lemp.extend;
    
       select empno
            , mgr
            , sal
         into lemp(1)
            , lemp(2)
            , lemp(3)
         from emp
        where empno = 7369;
    
       for i in 1..lemp.count
       loop
         dbms_output.put_line(to_char(lemp(i)));
      end loop;
    end;   
    
  • Update the column values with the new user who has changed the data in the current line

    I have a table, the following structure.

    CREATE TABLE FILTERCALENDAR1
    (DATE OF THE "C_DATE',
    NUMBER (1,0) 'DAY_OF_WEEK ',.
    NUMBER (1.0) "WEEK_WINDOW."
    NUMBER (1.0) "MONTH_WINDOW."
    NUMBER (1.0) "YEAR_WINDOW."
    NUMBER (1.0) "DATE_YEAR_WINDOW."
    NUMBER (1.0) "ONCE_WINDOW."
    VARCHAR2 (25 BYTE) "USERNAME."
    "LASTUPDATED" DATE
    );

    Problem:
    If a user changes the value of one of the columns I want to write his name to user and sysdate in the 'USERNAME' and LASTUPDATED' columns.

    * Tried: *.
    I tried an update trigger for this problem, but I get an error table mutation.

    The one you suggest how can I achieve this.

    Concerning

    Use BEFORE the UPDATE trigger

    CREATE OR REPLACE TRIGGER myTrigger
    before UPDATE ON FILTERCALENDAR1 FOR EACH ROW
    BEGIN
    :new.USERNAME := user;
    :new.LASTUPDATED := sysdate;
    END;
    
  • the column value of the game

    Hello
    I use JDev 11.1.1.3

    I have a form and a table in the form of my jspx
    in my table, I have a column that is not bound 2 DB
    in my form, I have a class LOV where I apply value change listener...
    When I apply value change listener I want 2 set the value of the column...
    Please suggest me a solution

    Thanks in advance

    Edited by: Venkat Naidu L on March 15, 2011 22:06

    Try and tell. This should be in quotes. But while coding won't give you any error during compiling.

    Reg,
    Vini

  • gl_je_lines reference the columns vs R12 11i

    Greetings,

    Under 11i, when AP posted transactions in the GL, various pieces of information were stored in the columns of the gl_je_lines table reference. Under R12, it does not appear that the data is there. I am looking for the CRT as we speak and in the meantime, thought I'd post the question here.

    Thank you very much... Colin

    Colin,

    Please see (Note: 876190.1 - R12: FAQ on the transfer to GL in R12), I think that your question is answered in the present document.

    Kind regards
    Hussein

  • divide the value in the column value

    Hi all

    I have an EMP table with column (NAME varchar2 (100)). It has a full name with name value "«MIDDLE_NAME"»
    It should always has 3 words value separated by single spaces.

    Value of the sample: FRANKLIN ROOSEVELT OBAMA


    I want to create a view EMP2_VW that contains a split each distinct names as MIDDLE_NAME, LAST_NAME, FIRST_NAME


    How can I do this?


    Thank you very much
    SQL> with t as (
      2  select 'FRANKLIN ROOSEVELT OBAMA' fullname from dual
      3  )
      4  --
      5  -- actual query:
      6  --
      7  select fullname
      8  ,      substr( fullname
      9               , 1
     10               , instr(fullname, chr(32))-1
     11               ) first_name
     12  ,      substr( fullname
     13               , instr(fullname, chr(32), 1, 1)+1
     14               , instr(fullname, chr(32), 1, 2)-1 - instr(fullname, chr(32), 1, 1)
     15               ) middle_name
     16  ,      substr( fullname
     17               , instr(fullname, chr(32), 1, 2)+1
     18               ) last_name
     19  from   t;
    
    FULLNAME                 FIRST_NAME               MIDDLE_NAME              LAST_NAME
    ------------------------ ------------------------ ------------------------ -------------
    FRANKLIN ROOSEVELT OBAMA FRANKLIN                 ROOSEVELT                OBAMA
    
    1 row selected.
    
  • Select only records where the column values are not all equal to zero

    Hi everyone, it seems so easy, but it has left me speechless on the research in a way that is clean, easy to achieve. I know when someone replies, I'm going to kick me. So, let's assume this is what I have:
    with mytable as (
    select 'Type 1' as itemtype, 'JAN' as monthname, 0 as theval from dual union all
    select 'Type 1' as itemtype, 'FEB' as monthname, 1 as theval from dual union all
    select 'Type 1' as itemtype, 'MAR' as monthname, 5 as theval from dual union all
    select 'Type 1' as itemtype, 'APR' as monthname, 1 as theval from dual union all
    select 'Type 1' as itemtype, 'MAY' as monthname, 4 as theval from dual union all
    select 'Type 1' as itemtype, 'JUL' as monthname, 0 as theval from dual union all
    select 'Type 1' as itemtype, 'AUG' as monthname, 0 as theval from dual union all
    select 'Type 1' as itemtype, 'SEP' as monthname, 1 as theval from dual union all
    select 'Type 1' as itemtype, 'OCT' as monthname, 7 as theval from dual union all
    select 'Type 1' as itemtype, 'NOV' as monthname, 1 as theval from dual union all
    select 'Type 1' as itemtype, 'DEC' as monthname, 2 as theval from dual union all
    
    select 'Type 2' as itemtype, 'JAN' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'FEB' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'MAR' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'APR' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'MAY' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'OCT' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'NOV' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'DEC' as monthname, 0 as theval from dual
    )
    select
      itemtype,
      sum (case monthname when 'JAN' then theval else 0 end) as JAN,
      sum (case monthname when 'FEB' then theval else 0 end) as FEB,
      sum (case monthname when 'MAR' then theval else 0 end) as MAR,
      sum (case monthname when 'APR' then theval else 0 end) as APR,
      sum (case monthname when 'MAY' then theval else 0 end) as MAY,
      sum (case monthname when 'JUN' then theval else 0 end) as JUN,
      sum (case monthname when 'JUL' then theval else 0 end) as JUL,
      sum (case monthname when 'AUG' then theval else 0 end) as AUG,
      sum (case monthname when 'SEP' then theval else 0 end) as SEP,
      sum (case monthname when 'OCT' then theval else 0 end) as OCT,
      sum (case monthname when 'NOV' then theval else 0 end) as NOV,
      sum (case monthname when 'DEC' then theval else 0 end) as DEC
    from mytable
    group by itemtype
    order by itemtype
    I need an external application around it or something which will select only 'Type 1'... that is, if all months are each equal to zero, do not include the record in the result set.

    In summary to get a total of zero is not an option, because I could have-15 and + 15 in different columns, in which case, the recording should be displayed.

    Something as simple as... 'not the case (oct = 0 and 0 nov and dec = 0...) at the end is all it seems to me necessary. I thought to add a case for each column clause, but that seems not very effective. Ideas?

    Thanks in advance!
    Mark

    Edit... I know not what follows will work using the MINUS operator, but my actual query is really huge, and I don't want to have to write it twice...
    {code}
    Select
    ItemType,
    sum (case monthname when "JAN" then Val else 0 end) such as JAN,.
    sum (case when monthname 'FEB', then Val 0 otherwise end) by Feb.
    sum (case when monthname 'MAR', then Val 0 otherwise end) like MARS,
    sum (case monthname when "APR" then Val else 0 end) as APR.
    sum (case when monthname 'MAY', then Val else 0 end) either.
    sum (case when monthname "JUN", then Val 0 otherwise end) as JUN.
    sum (case monthname when "JUL" then Val else 0 end) as JUL,.
    sum (case monthname when "AUG" then Val else 0 end) as AUG.
    sum (case monthname when "MS" then Val else 0 end) as MS.
    sum (case monthname when "OCTS" then Val else 0 end) OCT.
    sum (case monthname when "NOV" then Val else 0 end) as NOV.
    sum (case monthname when 'DEC' then Val else 0 end) as DEC
    FROM MyTable
    Group of itemtype

    less

    Select
    ItemType,
    Jan, Feb, mar, Apr, may, June, July, August, Sept, oct, nov, dec
    de)
    Select
    ItemType,
    sum (case monthname when "JAN" then Val else 0 end) such as JAN,.
    sum (case when monthname 'FEB', then Val 0 otherwise end) by Feb.
    sum (case when monthname 'MAR', then Val 0 otherwise end) like MARS,
    sum (case monthname when "APR" then Val else 0 end) as APR.
    sum (case when monthname 'MAY', then Val else 0 end) either.
    sum (case when monthname "JUN", then Val 0 otherwise end) as JUN.
    sum (case monthname when "JUL" then Val else 0 end) as JUL,.
    sum (case monthname when "AUG" then Val else 0 end) as AUG.
    sum (case monthname when "MS" then Val else 0 end) as MS.
    sum (case monthname when "OCTS" then Val else 0 end) OCT.
    sum (case monthname when "NOV" then Val else 0 end) as NOV.
    sum (case monthname when 'DEC' then Val else 0 end) as DEC
    FROM MyTable
    Group of itemtype
    )
    where (oct = 0 & nov = 0 and dec = 0 and jan = 0 and 0 = Feb and mar = 0
    apr = 0 and may = 0 and = 0 jun and Jul = 0 and aug = 0 and Ms = 0
    )
    order of itemtype
    {code}

    Change again... OK, I guess that I am answering my own question here, but I think that by using a WITH to write the main request once clause and then selecting * twice using the MINUS operator between where the second query is where (oct = 0, etc.) is what I need. If anyone has better suggestions, please let me know! Here's the logic of nickname for what I come up with to date...

    {code}
    WITH mainquery as (select all)
    Select * from mainquery
    less
    Select * from mainquery where (oct = 0, nov = 0, etc...)
    {code}

    Thanks again!
    Mark

    Published by: user455268 on March 1, 2012 19:13

    Published by: user455268 on March 1, 2012 19:16

    Hello

    You can do it with a HAVING clause:

    select
      itemtype,
      sum (case monthname when 'JAN' then theval else 0 end) as JAN,
      sum (case monthname when 'FEB' then theval else 0 end) as FEB,
      sum (case monthname when 'MAR' then theval else 0 end) as MAR,
      sum (case monthname when 'APR' then theval else 0 end) as APR,
      sum (case monthname when 'MAY' then theval else 0 end) as MAY,
      sum (case monthname when 'JUN' then theval else 0 end) as JUN,
      sum (case monthname when 'JUL' then theval else 0 end) as JUL,
      sum (case monthname when 'AUG' then theval else 0 end) as AUG,
      sum (case monthname when 'SEP' then theval else 0 end) as SEP,
      sum (case monthname when 'OCT' then theval else 0 end) as OCT,
      sum (case monthname when 'NOV' then theval else 0 end) as NOV,
      sum (case monthname when 'DEC' then theval else 0 end) as DEC
    from mytable
    group by itemtype
    HAVING      MIN (theval)     != 0
    OR      MAX (theval)     != 0
    order by itemtype
    ;
    

    If the values are all 0, then the MIN and MAX will be 0.
    If the MIN or MAX is not 0, the values are all 0.

    This assumes that the combination (itemtype, monthname) is unique, because it is in your sample data.
    If this is not the case, start with a subquery that GROUPs BY itemtype, monthname, so that when you get to the main request, this combination will be unique.

  • How do to convert two points separated in several lines in the report, the column values

    Hi all

    I want to display two separate points of values in a column, in a row of multi in report.

    For example I have a Column1 in an array with the value 'A', column2 has the value "1".

    I want to show in a report of three lines using these two columns as

    Column1 Column2
    A 1
    B 1
    A s

    Here's one way:

    SQL> create table test (col1 varchar2(20), col2 number);
    
    Table created.
    
    SQL> insert all
      2    into test values ('A:B:C', 1)
      3    into test values ('Dg:Ezs', 2)
      4  select * from dual;
    
    2 rows created.
    
    SQL> select
      2    t.col2,
      3    regexp_substr(t.col1, '\w+', 1, t2.column_value) c1
      4  from test t,
      5    table(cast(multiset(select level
      6                        from dual
      7                        connect by level <= length(t.col1) - length(replace(t.col1, ':', '')) + 1
      8                       ) as sys.odcinumberlist )) t2
      9  order by 2, 1;
    
          COL2 C1
    ---------- --------------------
             1 A
             1 B
             1 C
             2 Dg
             2 Ezs
    
    SQL>
    

    Published by: little-foot 31 January 2012 10:13

  • Can be passed to the formula of the procedure/function the column value?

    Cf_value is back after some calculation using the main request.

    Can be passed directly the value of column of formulas of procedure without assinged to placeorder?
    as below...


    f_convert(:cf_value,new_value);

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

    My procedure is...


    PROCEDURE f_convert (val1 val2 in number, number) IS

    BEGIN

    val2: = val1 * 100;

    END;


    If anyone knows pls answer me...

    In fact, if there is that other calculations he (in Proceudre)

    Can I used is like below?
    ---
    PROCEDURE f_convert (val1 val2 in number, number) IS

    BEGIN

    val2: = val1 * 100;

    return (val2);
    END;
    ----

    A procedure cannot return a value, the return in my previous post clause was part of the function for formula column.
    Let's say you have a column of forms of so-called CF_2, then the function because it will be like:

    function cf_2formula return number
    is
     val1 number;
     val2 number;
    begin
    
     val2 := :cf_1 * 100; -- or val2 := val1 * 100 --parameters not allowed in formula column function
    
     -- All the other code that you need inclusive of calling function, procedure as in any PL/SQL block can be placed 
    
     return (val2);
    
    end;
    

    Any calculation can be used in the service of the formula column

  • Pop up problem when the column value

    Hi all

    I am facing on the issue when we have Disabled_Enabled_By_Conc = disabled so only I need to show the pop-up message, but it is displayed in the case of Disabled_Enabled_By_Conc = Enabled. Please notify. Please note I use event = change of element =Disabled_Enabled_By_Conc.

    Disabled.jpg

    Report Is Disabled.jpg

    Hi all

    Problem is resolved now, as in alert, I disabled the loading of the page in dynamic condition and it solved the problem.

Maybe you are looking for