Reading lock and pk column values

Hi!
I was wondering whether it is possible to somehow read the value a
persistent object has for its lock column (JDOLOCKX by default) and pk
column (with datastore identity, JDOIDX by default).
Especially reading the lock would be useful. My specific problem is this:
in J2EE environment when a persistent object is serialized and given to the
web (or any other ui-) layer to display, its identity is lost. There are
nice examples for solving this problem in the documentation so this is not
an issue. However, there is no easy way to determine whether someone else
changed the same data while it was being watched (and modified) on the web
page. So, in essence, this is an optimistic transaction. However, to use
optimistic transactions one would have to use stateful session beans. And
if I am correct, an optimistic transaction has to have a live persistence
manager all the time, so this is not acceptable unless the
persistencemanager releses its sql connection in between calls. I don't
think it does, or does it? And anyhow, I'd prefer using stateless session
beans.
It would be quite easy to implement some sort of timestamp mechanism by
inserting a persistent field for it and updating its value by using
InstanceCallback interface. However, as the JDOLOCKX column already exists
it would be nice not to reinvent the wheel.
The pk value I would need in case the same db is used by many apps (not
all in Java) and they need to communicate some information about a specific
object stored in the db (in which case it would be easiest to give the pk
value to identify an object). Again, I could use ApplicationIdentity or
make some field where to store some unique value, but I'd prefer using the
pk value since it is already there (and would not like to use Application
Identity just because of this).
Any other solutions to the above problems besides being able to read the
JDOIDX and JDOLOCKX values are welcome, too.
-Antti

You can either parse the toString () generated from
JDOHelper.getObjectId () or cast it to ObjectIds.Id (in 2.5.x) or Id (in
3.0) to get the pk value.
You can also retrieve the lock version in the same fashion.
In Kodo 3:
KodoHelper.getVersion (yourPC).
In Kodo 2.5.x:
((PersistenceManagerImpl) pm).getState (JDOHelper.getObjectId
(yourPC)).getVersion ();
Antti Karanta wrote:
On Tue, 14 Oct 2003 10:46:56 -0400, Patrick Linskey
<[email protected]> wrote:
Based on your description of your problem, you might want to look at the
new attach/detach functionality in Kodo 3.0:
http://solarmetric.com/Software/Documentation/3.0.0RC2/docs/ref_guide_detach.html
This functionality is a preview of a proposed JDO 2.0 feature, and is
targeted at exactly the use case that you've described.Yes, it definitely looks nice. One thing it does not mention, though:
is the String stored in the detached-objectid-field just the (string
version of the) primary key or is there something else there?
And what about a case where I do not want a detachable instance, just
want to be able to have the primary key value?
And I take it there is no way to read these values (lock and pk) in the
present version of Kodo?
On Tue, 14 Oct 2003 18:38:21 +0300, Antti Karanta wrote:
Hi!
I was wondering whether it is possible to somehow read the value a
persistent object has for its lock column (JDOLOCKX by default) and
pk column (with datastore identity, JDOIDX by default).
Especially reading the lock would be useful. My specific problem is
this: in J2EE environment when a persistent object is serialized and
given to the web (or any other ui-) layer to display, its identity is
lost. There are nice examples for solving this problem in the
documentation so this is not an issue. However, there is no easy way
to determine whether someone else changed the same data while it was
being watched (and modified) on the web page. So, in essence, this is
an optimistic transaction. However, to use optimistic transactions
one would have to use stateful session beans. And if I am correct, an
optimistic transaction has to have a live persistence manager all the
time, so this is not acceptable unless the persistencemanager releses
its sql connection in between calls. I don't think it does, or does
it? And anyhow, I'd prefer using stateless session beans.
It would be quite easy to implement some sort of timestamp mechanism
by inserting a persistent field for it and updating its value by
using InstanceCallback interface. However, as the JDOLOCKX column
already exists it would be nice not to reinvent the wheel.
The pk value I would need in case the same db is used by many apps
(not all in Java) and they need to communicate some information about
a specific object stored in the db (in which case it would be easiest
to give the pk value to identify an object). Again, I could use
ApplicationIdentity or make some field where to store some unique
value, but I'd prefer using the pk value since it is already there
(and would not like to use Application Identity just because of this).
Any other solutions to the above problems besides being able to read
the JDOIDX and JDOLOCKX values are welcome, too.
-Antti
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com

Similar Messages

  • Is it possible to Lock just one column value in a row?

    Is it possible to Lock just one column value in a row
    A Java Developer has just asked me if it is possible to Lock just one column value in a row in Oracle
    select ename from emp where empno=7369 for update;
    EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    7369 SMITH      CLERK           7902 17-DEC-80        800                    20
    will lock the entire row with empno=7369.
    But is it possible to lock one column value from this row, like SAL=800 ?
    Edited by: J.Kiechle on Jan 8, 2009 10:45 PM

    J.Kiechle wrote:
    Is it possible to Lock just one column value in a rowNo. Locking granularity is a row.

  • I am not able to read the xslt table column value.

    Hi,
    I have the scenario like this.
    I have two irpt pages  first.irpt and  second.irpt and saperate xslt tables for each page  and common js file for two pages.
    when I click on first.irpt   page xslt table row that opens  the  second.irpt as a popup window then I click on the column in second.irpt xslt row  after that  column value should be inserted  in to first.irpt  xslt table column.
    In above I have done everything except I am not able to update the first.irpt  xslt table column as Even I am not able to read that value.
    For your reference:
    /* This function will be called when we select the row in first.irpt xslt table here SelectBatch_b.irpt means second.irpt
    function getBatch(row)
    var id=row;
    var material=document.getElementById('Material_'+row).value;
    var location=document.getElementById('StoreLoc_'+row).value;
    var plant=1000;
    var strUrl = "SelectBatch_b.irpt";
    strUrl = "?plant="plant"&""location="location"&""material="material;
         window.open (strUrl,"mywindow");
    /*This function will be called when we select the row in second.irpt (SelectBatch_b.irpt)
    function getBatchID(row)
    var Batch=document.getElementById('Batch_'+row).value;  // reading second.irpt xslt table column value
    document.getElementById('Batchc1').value=Batch;  // reading first.irpt xslt table column value and inserting.
    window.close();  // here I am getting error like object expected.
    Please help me in this .
    Edited by: rajkumar12345 on Feb 29, 2012 1:45 PM

    Hi Rajkumar,
    Please find below the method to pass the variable back and forth in .irpt page.
    First Page:
    var Toaccessinchildpage = "value";
    function getBatch(row)
    var id=row;
    var material=document.getElementById('Material_'+row).value;
    var location=document.getElementById('StoreLoc_'+row).value;
    var plant=1000;
    var strUrl = "SelectBatch_b.irpt";
    strUrl += "?plant="plant"&"+"location="location"&"+"material="+material;
    window.open (strUrl,"mywindow");
    function populate(strBatch)
         document.getElementById('Batchc1').value=strBatch;
    Second Page:
    function getBatchID(row)
    var Batch=document.getElementById('Batch_'+row).value;
    window.opener.populate(Batch);
    window.close();
    You have to call parent page function from child page.
    No need to use common js.
    If you want to access variable from parent page use
    window.opener.<variable name>.
    Example
    window.opener.Toaccessinchildpage
    You have to declare that variable as global variable in Parent page js file.
    Refer First page code.
    Regards,
    Selva

  • Locking and sorting columns

    This is what I am trying to do:
    Lock the information in column A so it always stays there (1st, 2nd , 3rd, etc.)
    Sort Column C (total winnings) in descending order and keep the coresponding participants (column B ) with the amount.
    Create a value in Column D (4 behind Leader) that shows the difference between C3 and C4, C3 and c5, etc.
    The amounts and names are  filled from another sheet and change weekly. I can sort based on total winnings and the names follow. I can also create a formula to show the difference between the Leader and the next place participant however when I do a sort based on Total Winnings after the new values each week the Place and $Behind Leader always shift up and down. The information in Column A seems "locked" to the information in Columns B and C. The refernce in Column D is always Chris's amount and I want it to be refenced to the 1st place Participant.
    I hope I've explained this.
    Thanks - James
    2013 Standings
    Place
    Participant
    Total Winnings
    $ Behind Leader
    1st
    Chris
    $24.00
    2nd
    Ken
    $22.00
    -$2.00
    3rd
    Paul
    $20.00
    -$4.00
    4th
    Josh
    $18.00
    5th
    Kelly
    $16.00
    6th
    Greg
    $14.00
    7th
    Dave
    $12.00
    8th
    Darren
    $10.00
    9th
    Don
    $8.00
    10th
    Tony
    $6.00
    11th
    Suzanne
    $4.00
    12th
    James
    $2.00
    13th
    Spare 1
    $0.00
    14th
    Spare 2
    $0.00
    15th
    Spare 3
    $0.00
    16th
    Spare 4
    $0.00
    17th
    Spare 5
    $0.00
    18th
    Spare 6
    $0.00
    19th
    Spare 7
    $0.00
    20th
    Spare 8
    $0.00

    Hi j&s,
    Numbers uses a data base model that treats each row of a table as a single record. You can sort all or selected rows on the values in one or more column(s), but the whole row moves to maintain the integrity of each record.
    If you want some columns to be excluded from a sort, you need to remove those columns (or their data) from the table. Jerry has offered a way to do that for the rankings, but that solution will not resolve the issue of the 'leader board' cells acting badly in a sort.
    Here's an alternate. The first view is of the table(s) (with the participants in alphabetical order), just after the current totals had been entered.
    At this point, the Leader board, which pulls names and totals from the first three body rows of the data table, shows the correct cells, but these don't include the correct information.
    Note that column A does show the correct placing for each participant.
    The second view shows the same table(s) after the data table has bee sorted. The sort may be descending on column C (Totals) or ascending on column A (Place).
    Place is calculated from the Total values, using this formula:
    A2: =RANK(C2,C,largest-is-high)
    Fill down into the rest of the cells in column A. Any empty rows should be removed from the bottom of the table, or have zeros entered into their total column cells.
    The Leader board table has two formulas:
    A2: =OFFSET(Data :: $A$1,ROW()-1,1)
    Fill down to A4.
    This returns the name of the participant in the top body cell of column B of the data table.
    B2 contains the word "Leader"
    B3: =IF((OFFSET(Data :: $A$1,1,2)-OFFSET(Data :: $A$1,ROW()-1,2))>0,OFFSET(Data :: $A$1,1,2)-OFFSET(Data :: $A$1,ROW()-1,2),"Leader")
    Fill down to B4
    The root of this formula is OFFSET(Data :: $A$1,1,2)-OFFSET(Data :: $A$1,ROW()-1,2)
    This returns the total value from the first and second body cells in the total column, and subtracts the second from the first.
    The rest of the formula is an IF statement tohandle the occasions where there's a two or three-way tie for the lead. (image below) If the result is greater than zero, the subtraction is repeated and the result returned to the cell (B3); if the result is zero, the word :Leader: is returned to this cell.
    Placing the calculation in a separate table and using OFFSET, with a base cell (Data::A1) that is in a row defined as a Header row makes this table and its formulas immune from sorting of the Data table.
    Here's the tie, which arose when i added another 11 particpants to check sorting of the Place column:
    Regards,
    Barry
    Message was edited by: Barry (added image and notes on Tie case)

  • Oracle order by cluase on null and identical column values

    Can anybody please help me to understand the below things. Thanks in advance.
    1. How will be the row ordering when the ORDER BY column contains null values for all the records
    2. How will be the row ordering if all the records catains the same values (for the column which is used in order by clause)
    3. Whether index is having any impact in the ordering - (mainly in the case of above scenarios)
    4. Whether any other db objects will have impact on ordering
    Thanks again.
    Regards,
    Shine

    Shine Haridasan wrote:
    1. How will be the row ordering when the ORDER BY column contains null values for all the recordsIt will have the same effect as not ordering
    http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_10002.htm#i2171079
    >
    Without an order_by_clause, no guarantee exists that the same query executed more than once will retrieve rows in the same order.
    >
    2. How will be the row ordering if all the records catains the same values (for the column which is used in order by clause)Same answer as 1.
    3. Whether index is having any impact in the ordering - (mainly in the case of above scenarios)It might.
    4. Whether any other db objects will have impact on orderingThey might.

  • Help with Acrobat 7 Pro (making savable Reader PDFs and making columns do math)

    Do forgive me as I normally don't make interactive PDFs, but I need to know a couple of things.
    I'm using Acrobat Professional 7 at home, but have access to Pro 8.  In 7, show do you make the PDF save info along with the PDF in Adobe Reader?  I've seen how to do it in Pro 8, which allows 500 hits to the file, which is plenty fine for the use for the forms I'm making.  But in Pro 7, I cannot not find this feature to let Reader save filled in form fields.
    Now the attachment to my post is the second (but not as important) issue.
    I need to try and make the fields on this form do adding, subtracting, and multiplication.  How do I do that?  I have no java programming experipence.  Here is how I want the columns to work:
    Texts 29, 34, 39, and 44 should add up in Text 46.  Texts 30, 35, 40, and 45 should add up in Text 47.
    Text 48 should subtract from Text 46 and Text 49 should subtract from Text 47 if used.  The results should then show in Texts 52 and 53 respectively.
    Now here's the tricky bit.  Texts 50 and 51 are optional.  If the senior discount is applied, then Texts 52 & 53 should have a 5% discount applied to the totals.
    Is this doable by a non-programmer?  Any help is greatly appreciated.
    Bill Rudloff

    So the Feature can not be invoked by Acrobat 7 but is availble if turned on in Reader 7.
    The OP said he had 7 at home but access to 8.  So depending on whether Micahel was addressing Acrobat or Reader his answer can go either direction. The ability to do is in 8 and 9 Acrobat. And 7, 8, 9 Reader is able to use it.
    As I phrased my comment after Michaels I defered to his expertise. And was adding the additional comments that  Reader 7, 8, 9 can use it . But only 8, 9 Acrobat can invoke it.
    So we are all correct to a degree.

  • Get Min value and another column value from the same row

    hi all - for each customer and product, I need to grab the row that has the min value for field Value1. I could've just done group by on customer and product and min on Value1, but I also need to grab Vlaue2 from the same row where the minimum value for
    Value1 lies.
    DECLARE @Temp TABLE (CustomerID INT, ProductID VARCHAR(10), Trans_Date Date, Value1 INT, Value2 INT)
    INSERT INTO @Temp VALUES (123, 'ABC', '1/1/2013', 10, 100)
    INSERT INTO @Temp VALUES (456, 'ASD', '1/1/2013', 40, 500)
    INSERT INTO @Temp VALUES (456, 'ASD', '2/1/2013', 90, 700)
    INSERT INTO @Temp VALUES (123, 'ABC', '2/1/2013', 20, 700)
    SELECT * FROM @Temp
    The output should be
    123, ABC, 10, 100
    456, ASD, 40, 500
    I know that I can just join the table to itself and get the desired output but I am dealing with a table that has millions of rows and I was hoping there is more efficient way to do this. any help would be highly appreciated...

    Here is a correction on your DDL to make it into nearly valid table.
    CREATE TABLE Sales
    (customer_id INTEGER NOT NULL,
    product_id CHAR(10) NOT NULL,
    transaction_date DATE NOT NULL,
    PRIMARY KEY (customer_id, product_id, transaction_date),
    value1 INTEGER NOT NULL,
    value2 INTEGER NOT NULL);
    Here is the current syntax for insertion:
    INSERT INTO Sales
    VALUES (123, 'abc', '2013-01-01', 10, 100),
    (456, 'asd', '2013-01-01', 40, 500),
    (456, 'asd', '2013-02-01', 90, 700),
    (123, 'abc', '2013-02-01', 20, 700);
    WITH
    X
    AS
    (SELECT customer_id, product_id, transaction_date, value1, value2,
    MIN(value1) OVER () AS value1_min
    FROM Sales)
    SELECT X.*
    FROM X
    WHERE X.value1_min = X.value1;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Expand and collapase column values of Pivot table in obiee 11g?

    Hi experts,
    I have Requirement.
    *----------------------(+value1)---(+value2)----(-value3)---------(+value 4)
    --------------------------------------------- x---y---z
    **col1*-----col2----------------------------------------------------
    ----abc-------sys-------------------------------------1---3---9*
    ---xyz--------inc-------------------------------------7---8---77*
    ----xyz2------inc2------------------------------------7---8---32*
    ----xyz3------inc3------------------------------------5---08--13*
    ----xyz4------inc4------------------------------------6---0----72*
    ----xyz5------inc5------------------------------------4---2----3*
    like that i want ...
    any suggestions / help..
    I hope you understand..
    Thanks
    Raam
    Edited by: Tallapaneni on Jun 16, 2012 5:10 PM

    i couldnt understand what you mean, can you please describe?

  • Using PL/SQL to retrieve column names and column values

    If I have a table as follows
    Table A(
    meal varchar2(32),
    beverage varchar2(32),
    desert varchar2(32));
    and the table contains a row
    meal beverage desert
    pork chops iced tea apple crisp
    Is there a way in pl/sql to retrieve the column names along with the values. I have an object type
    DATA_DEFINITION_T AS OBJECT (
              "FIELD_NAME"          VARCHAR2(32),
              "FIELD_VALUE" VARCHAR2(32)
    I need to store the column name in field_name and the column value in field_value.
    So the result would be:
    FIELD_NAME = meal
    FIELD_VALUE = pork_chops
    FIELD_NAME = beverage
    FIELD_VALUE = iced tea
    FIELD_NAME = desert
    FIELD_VALUE = apple crisp
    Thanks in advance.

    Hi,
    try this procedure ....just create it and give the table name..the object M_DATA_TAB has the required data
    procedure l_fill_data_dict(p_table_name varchar2) is
    connection_id EXEC_SQL.CONNTYPE;
    bIsConnected BOOLEAN;
    cursorID EXEC_SQL.CURSTYPE;
    nIgn PLS_INTEGER;
    m_val VARCHAR2(40);
    m_col_name varchar2(40);
    m_col_val varchar2(240);
    m_cnt number;
    m_id number := 0;
    m_incr number := 0;
    p_sqlstr varchar2(4000);
    p_sql_cnt varchar2(4000) ;
    p_org_sql varchar2(4000);
    TYPE DATA_DEFINITION_TABS IS RECORD (
    FIELD_NAME VARCHAR2(32),
    FIELD_VALUE VARCHAR2(240));
    TYPE DATA_DEFINITION_TAB IS TABLE OF DATA_DEFINITION_TABS;
    M_DATA_TAB DATA_DEFINITION_TAB := DATA_DEFINITION_TAB();
    --m_file text_io.file_type;
    Begin
    --     m_file := text_io.fopen('c:\eg.txt','w');
         --Set default connection
    connection_id := EXEC_SQL.DEFAULT_CONNECTION;
    bIsConnected := EXEC_SQL.IS_CONNECTED;
    IF bIsConnected = FALSE THEN
         message('Connection Failed');
    RETURN;
    END IF;
    --Find the total no.of columns in the given table
    p_sql_cnt := 'Select COUNT(column_name) from user_tab_columns where table_name='''||p_table_name||''' order by column_id';
    cursorID := EXEC_SQL.OPEN_CURSOR;
    EXEC_SQL.PARSE(cursorID, p_sql_cnt, exec_sql.V7);
    EXEC_SQL.DEFINE_COLUMN(cursorID, 1, m_val,40);
    nIgn := EXEC_SQL.EXECUTE(cursorID);
    IF (EXEC_SQL.FETCH_ROWS(cursorID) > 0) THEN
         EXEC_SQL.COLUMN_VALUE(cursorID, 1, m_val);
    end if;
    EXEC_SQL.CLOSE_CURSOR(cursorID);
    --EXEC_SQL.CLOSE_CONNECTION;
    m_cnt := m_val;---column count
    ---get the column names from the user_Tab_columns and fetch the values from the given table for that column...
    For i in 1..m_cnt loop
         m_id := m_id+1;
    p_sqlstr := 'Select column_name from user_tab_columns where table_name='''||p_table_name||''' and column_id ='||m_id||' order by column_id';
    cursorID := EXEC_SQL.OPEN_CURSOR;
    EXEC_SQL.PARSE(cursorID, p_sqlstr, exec_sql.V7);
    EXEC_SQL.DEFINE_COLUMN(cursorID, 1, m_col_name,40);
    nIgn := EXEC_SQL.EXECUTE(cursorID);
    IF (EXEC_SQL.FETCH_ROWS(cursorID) > 0) THEN
         EXEC_SQL.COLUMN_VALUE(cursorID, 1, m_col_name);
    end if;
    EXEC_SQL.CLOSE_CURSOR(cursorID);
    --fetch the column value from the given table
         p_org_sql := 'select DISTINCT '||m_col_name||' from '||p_table_name;
         cursorID := EXEC_SQL.OPEN_CURSOR;
    EXEC_SQL.PARSE(cursorID, p_org_sql, exec_sql.V7);
    EXEC_SQL.DEFINE_COLUMN(cursorID, 1, m_col_val,240);
         nIgn := EXEC_SQL.EXECUTE(cursorID);
         Loop      
         nIgn := EXEC_SQL.FETCH_ROWS(cursorID);
              IF (nIgn > 0) THEN
                   EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 1, m_col_val);
    M_DATA_TAB.extend();
                   M_DATA_TAB(M_DATA_TAB.last).field_name := m_col_name;
                   M_DATA_TAB(M_DATA_TAB.last).FIELD_VALUE := m_col_val;
                   m_incr := m_incr+1;
                   -- text_io.put_line(m_file,m_col_name||'##'||m_col_val);
              else
                   exit;
              End if;
         End loop;--loop of records in the table for the given column
    EXEC_SQL.CLOSE_CURSOR(cursorID);
    End loop; ---loop of columns in the table
    --text_io.fclose(m_file);
    message('Total no. of items in the object='||m_incr);
    EXEC_SQL.CLOSE_CONNECTION;
    EXCEPTION
    When EXEC_SQL.Invalid_Connection then
         message('invalid connection');
         when EXEC_SQL.Package_Error     then
         message('pkg err');
         when EXEC_SQL.Invalid_Column_Number          then
         message('invalid col num defined');
         when others then
              MESSAGE(SQLERRM);
    End;
    Regards
    Dora
    Edited by: Dora on Sep 27, 2009 3:13 PM

  • How to prevent editing a SharePoint site column value from document properties view of a downloaded document?

    Hi,
    We have created a SharePoint site column with below settings
    1. ShowInEditForm - False
    2. ShowInNewForm - False
    3. ShowInDisplayForm - True
    With the above definition, the site column showing only in view properties form not in New and Edit forms.  This column is added to a document library and updating this column value will be managed by event receiver code when a document is uploaded.
    Till this point, everything is working OK.
    But the issue is when we download and open a document from the above document library, under document properties the above column (with value) is visible along with other document default properties and  this column value is editable. With this issue,
    user is able to set a new value and overwrite the existing value by re-uploading the document.
    Could you please let me know how to handle this issue so that user should not be allowed to edit except viewing the value/property (read only)?
    Thanks in advance.
    Regards
    Ramesh

    You can set "ShowInFileDlg" property of field to "FALSE". Using this you will not see that field in document properties list

  • Concatination of column values

    WE WANT TO CHANGE THIS QUERY :
    ================================
    select     distinct ENTITLEMENT.ENTITLEMENT_ID as Entitlement_ID,
             (SELECT APPLICATION.EXTRA_FIELD_2 FROM APPLICATION APPLICATION WHERE APPLICATION.APPLICATION_NAME=ENTITLEMENT.APPLICATION_NAME) AS APPLICATION_NAME,
          ENTITLEMENT.MODULE_NAME as Module_Name,
          ENTITLEMENT.SITE_NAME as Site_Name,
          ENTITLEMENT.ENTITLEMENT_NAME as Responsibility_Name,
          ENTITLEMENT.DESCRIPTION as Description,
          ENTITLEMENT.TECHNICAL_DESCRIPTION as Technical_Description,
          ENTITLEMENT.ENTITLEMENT_OWNER_GID as Entitlement_Owner,
    (SELECT USR_DISPLAY_NAME FROM DEVT_OIM.USR USR WHERE USR.USR_LOGIN=ENTITLEMENT.ENTITLEMENT_OWNER_GID)  as Entitlement_Owner_Name,
             ENTITLEMENT.IT_SUPPORT_PERSON_GID as IT_Support,
    (SELECT USR_DISPLAY_NAME FROM DEVT_OIM.USR USR WHERE USR.USR_LOGIN=ENTITLEMENT.IT_SUPPORT_PERSON_GID)  as IT_Support_Name,
             ENTITLEMENT.IT_PROCESSOR_GROUP as IT_Processor,
             DECODE(ENTITLEMENT.SERVICE_ACCOUNT_FLAG, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No') as Service_Account,
          DECODE(ENTITLEMENT.COMPLIANCE_SENSITIVITY, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No')  as Compliance_Sensitivity,
          ENTITLEMENT.DATA_CLASSIFICATION as Data_Classification,
          DECODE(ENTITLEMENT.INISIDER_TRADING_LIST, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No')  as Insider_Trading,
          TO_CHAR(ENTITLEMENT.LAST_REVIEWED_ON) as Last_Reviewed_On,
          ENTITLEMENT.LAST_REVIEWED_BY as Last_Reviewed_By,
    (SELECT USR_DISPLAY_NAME FROM DEVT_OIM.USR USR WHERE USR.USR_LOGIN=ENTITLEMENT.LAST_REVIEWED_BY)  as Last_Reviewed_By_Name,
    DECODE(ENTITLEMENT.PERIMETER_ACCESS, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No') as Perimeter,
          ENTITLEMENT.ROLE_ASSOCIATION as Role,
          DECODE(ENTITLEMENT.AUTOMATIC_PROVISIONING, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No') as Auto_Provisioning,
          DECODE(ENTITLEMENT.ON_DEMAND_ENTITLEMENT, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No') as On_Demand,
    DECODE(entitlement.is_entitlement_requestable, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No') as IS_REQUESTABLE,
    DECODE(ENTITLEMENT.INISIDER_TRADING_LIST, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No')  as Insider_Trading,
    DECODE(ENTITLEMENT.PROVISIONING_FLAG, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No')  as Provisioning_Flag,
    DECODE(ENTITLEMENT.PERIMETER_ACCESS, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No')  as Perimeter_Role,
    DECODE(ENTITLEMENT.IS_ENTITLEMENT_REQUESTABLE, 'TRUE','Yes', 'true', 'Yes', 'FALSE', 'No', 'false', 'No')  as Is_Requestable
    from      EC_ADMIN.ENTITLEMENT ENTITLEMENT
    where upper(ENTITLEMENT.ENTITLEMENT_NAME) like upper(NVL(:entitlementName,'%'))
       and      ENTITLEMENT.ENTITLEMENT_ID like NVL(:entitlementID,'%')
       and     (:applicationName = ' ' or ENTITLEMENT.APPLICATION_NAME like :applicationName)
       and      upper (ENTITLEMENT.SITE_NAME) like upper (NVL(:site,'%'))
       and      upper (ENTITLEMENT.MODULE_NAME) like upper (NVL(:module,'%'))
       and      upper (ENTITLEMENT.IT_PROCESSOR_GROUP) like upper (NVL(:itprocessor,'%'))
       and      upper (ENTITLEMENT.ENTITLEMENT_OWNER_GID) like upper (NVL(:owner,'%'))
       and      upper (ENTITLEMENT.IT_SUPPORT_PERSON_GID) like upper (NVL(:itsupport,'%'))
       and      upper (ENTITLEMENT.COMPLIANCE_SENSITIVITY) like upper (NVL(:copmSensitivity,'%'))
       and      upper (ENTITLEMENT.DATA_CLASSIFICATION) like upper (NVL(:dataClassification,'%'))
       and      upper (ENTITLEMENT.SERVICE_ACCOUNT_FLAG) like upper (NVL(:serviceAccountFlag,'%'))
       and      upper (ENTITLEMENT.PROVISIONING_FLAG) like upper (NVL(:provisioningFlag,'%'))
       and      upper (ENTITLEMENT.PERIMETER_ACCESS) like upper (NVL(:perimeterRole,'%'))Need to add two more columns to it and those columns values should be concatinate.
    ============================
    Approver GID :
    ==================
    This fileds we can get from "EC" datbase from the table " ENTITLEMENT_APPROVER"
    Field Names : 1) APPROVER_LEVEL ------- Ex : 1,2,3
    2) APRROVER_DETAIL ------- Ex : 6794 , 10027
    we have to concate both the APRROVER_DETAIL 's ------- Ex : (6794 , 10027) in the report
    Approver Name :
    ================
    This one we can get the values from "OIM" Dtabase from the table " USR "
    Field Names : 1) USR_LOGIN ------- Ex : we have to fetch the records from USR_LOGIN ID Based on the Ec database ENTITLEMENT_ID
    2) USR_DISPLAY_NAME ------- Ex : Marcel O Lavallee , xxx
    we have to concate both the USR_DISPLAY_NAME 's ------- Ex : (Marcel O Lavallee , xxx) in the report
    Can any one help me in writing so..

    1)ENTITLEMENT:
    ==============
    CREATE TABLE "EC_ADMIN"."ENTITLEMENT"
        "ENTITLEMENT_ID"             NUMBER NOT NULL ENABLE,
        "APPLICATION_ID"             NUMBER NOT NULL ENABLE,
        "APPLICATION_NAME"           VARCHAR2(200 BYTE),
        "ERP_ENTITLEMENT_ID"         VARCHAR2(200 BYTE),
        "MODULE_ID"                  NUMBER NOT NULL ENABLE,
        "MODULE_NAME"                VARCHAR2(200 BYTE) NOT NULL ENABLE,
        "SITE_ID"                    NUMBER NOT NULL ENABLE,
        "SITE_NAME"                  VARCHAR2(200 BYTE) NOT NULL ENABLE,
        "ENTITLEMENT_NAME"           VARCHAR2(200 BYTE) NOT NULL ENABLE,
        "IS_ENTITLEMENT_REQUESTABLE" VARCHAR2(20 BYTE) DEFAULT 'FALSE',
        "SERVICE_ACCOUNT_FLAG"       VARCHAR2(20 BYTE) DEFAULT 'FALSE',
        "DESCRIPTION"                VARCHAR2(200 BYTE),
        "TECHNICAL_DESCRIPTION"      VARCHAR2(200 BYTE),
        "COMPLIANCE_SENSITIVITY"     VARCHAR2(20 BYTE) DEFAULT 'FALSE',
        "DATA_CLASSIFICATION"        VARCHAR2(200 BYTE) DEFAULT 'Non-Confidential',
        "INISIDER_TRADING_LIST"      VARCHAR2(20 BYTE) DEFAULT 'FALSE',
        "IT_PROCESSOR_GROUP"         VARCHAR2(200 BYTE),
        "IT_USE_ONLY"                VARCHAR2(20 BYTE) DEFAULT 'FALSE',
        "PROVISIONING_FLAG"          VARCHAR2(20 BYTE) DEFAULT 'FALSE',
        "IT_SUPPORT_PERSON_GID"      VARCHAR2(200 BYTE),
        "REVIEW_CYCLE"               NUMBER,
        "LAST_REVIEWED_ON" DATE DEFAULT SYSDATE NOT NULL ENABLE,
        "LAST_REVIEWED_BY"             VARCHAR2(200 BYTE),
        "ENTITLEMENT_OWNER_GID"        VARCHAR2(200 BYTE),
        "LIST_OF_APPROVERS"            VARCHAR2(200 BYTE),
        "PERIMETER_ACCESS"             VARCHAR2(20 BYTE) DEFAULT 'FALSE',
        "ROLE_ASSOCIATION"             VARCHAR2(4000 BYTE),
        "AUTOMATIC_PROVISIONING"       VARCHAR2(20 BYTE) DEFAULT 'FALSE',
        "ON_DEMAND_ENTITLEMENT"        VARCHAR2(200 BYTE),
        "ON_DEMAND_ENTITLEMENT_PERIOD" NUMBER DEFAULT '24',
        "COMMENTS"                     VARCHAR2(4000 BYTE),
        "LAST_UPDATED_BY"              VARCHAR2(200 BYTE),
        "LAST_UPDATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,
        "CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,
        "RATIONALE_FOR_ACCESS" VARCHAR2(20 BYTE) DEFAULT 'FALSE',
        "EXTRA_FIELD_1"        VARCHAR2(200 BYTE),
        "EXTRA_FIELD_2"        VARCHAR2(200 BYTE),
        "LAST_REVIEWED_NAME"   VARCHAR2(200 BYTE),
        PRIMARY KEY ("APPLICATION_ID", "SITE_ID", "MODULE_ID", "ENTITLEMENT_NAME") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "ECDATA" ENABLE,
        UNIQUE ("ENTITLEMENT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "ECDATA" ENABLE,
        FOREIGN KEY ("APPLICATION_ID") REFERENCES "EC_ADMIN"."APPLICATION" ("APPLICATION_ID") ENABLE,
        FOREIGN KEY ("MODULE_ID") REFERENCES "EC_ADMIN"."MODULE" ("MODULE_ID") ENABLE,
        FOREIGN KEY ("SITE_ID") REFERENCES "EC_ADMIN"."SITE" ("SITE_ID") ENABLE
    2) ENTITLEMENT_APPROVER
    CREATE TABLE "EC_ADMIN"."ENTITLEMENT_APPROVER"
        "ENTITLEMENT_ID"  NUMBER,
        "APPROVER_LEVEL"  NUMBER,
        "APROVER_TYPE"    VARCHAR2(200 BYTE),
        "APRROVER_DETAIL" VARCHAR2(200 BYTE),
        "EXTRA_FIELD_1"   VARCHAR2(200 BYTE),
        "EXTRA_FIELD_2"   VARCHAR2(200 BYTE)
    3)  USR  ---- OIM database
    CREATE TABLE "DEVT_OIM"."USR"
        "USR_KEY"               NUMBER(19,0) NOT NULL ENABLE,
        "ACT_KEY"               NUMBER(19,0) NOT NULL ENABLE,
        "USR_LAST_NAME"         VARCHAR2(150 CHAR) NOT NULL ENABLE,
        "USR_FIRST_NAME"        VARCHAR2(150 CHAR),
        "USR_MIDDLE_NAME"       VARCHAR2(80 CHAR),
        "USR_DISPLAY_NAME"      VARCHAR2(382 CHAR),
        "USR_MANAGER"           VARCHAR2(12 CHAR),
        "USR_TYPE"              VARCHAR2(30 CHAR) NOT NULL ENABLE,
        "USR_LOCATION"          VARCHAR2(34 CHAR),
        "USR_FSS"               VARCHAR2(255 CHAR),
        "USR_TODO"              VARCHAR2(16 CHAR),
        "USR_PASSWORD"          VARCHAR2(200 CHAR) NOT NULL ENABLE,
        "USR_DISABLED"          VARCHAR2(1 CHAR),
        "USR_PWD_CANT_CHANGE"   VARCHAR2(1 CHAR),
        "USR_PWD_MUST_CHANGE"   VARCHAR2(1 CHAR),
        "USR_PWD_NEVER_EXPIRES" VARCHAR2(1 CHAR),
        "USR_UPDATE_AD"         VARCHAR2(20 CHAR),
        "USR_CREATED" DATE,
        "USR_STATUS"             VARCHAR2(25 CHAR),
        "USR_EMP_TYPE"           VARCHAR2(255 CHAR) NOT NULL ENABLE,
        "USR_LOGIN"              VARCHAR2(256 CHAR) NOT NULL ENABLE,
        "USR_DISABLED_BY_PARENT" VARCHAR2(1 CHAR),
        "USR_PWD_EXPIRE_DATE" DATE,
        "USR_PWD_WARN_DATE" DATE,
        "USR_MANAGER_KEY"   NUMBER(19,0),
        "USR_POLICY_UPDATE" VARCHAR2(1 CHAR),
        "USR_PWD_WARNED"    VARCHAR2(1 CHAR),
        "USR_PWD_EXPIRED"   VARCHAR2(1 CHAR),
        "USR_START_DATE" DATE,
        "USR_END_DATE" DATE,
        "USR_PROVISIONING_DATE" DATE,
        "USR_DEPROVISIONING_DATE" DATE,
        "USR_PROVISIONED_DATE" DATE,
        "USR_DEPROVISIONED_DATE" DATE,
        "USR_EMAIL"                    VARCHAR2(256 CHAR),
        "USR_LOCKED"                   VARCHAR2(1 CHAR),
        "USR_LOGIN_ATTEMPTS_CTR"       NUMBER(19,0),
        "USR_PWD_RESET_ATTEMPTS_CTR"   NUMBER(19,0),
        "USR_CHANGE_PWD_AT_NEXT_LOGON" VARCHAR2(1 CHAR),
        "USR_PWD_MIN_AGE_DATE" DATE,
        "USR_DATA_LEVEL" NUMBER(1,0),
        "USR_CREATE" DATE,
        "USR_CREATEBY" NUMBER(19,0),
        "USR_UPDATE" DATE,
        "USR_UPDATEBY" NUMBER(19,0),
        "USR_NOTE" CLOB,
        "USR_TIMEZONE" VARCHAR2(100 CHAR),
        "USR_LOCALE"   VARCHAR2(100 CHAR),
        "USR_LOCKED_ON" DATE,
        "USR_MANUALLY_LOCKED" VARCHAR2(1 CHAR),
        "USR_AUTOMATICALLY_DELETE_ON" DATE,
        "USR_FULL_NAME"     VARCHAR2(240 CHAR),
        "USR_COUNTRY"       VARCHAR2(100 CHAR),
        "USR_DEPT_NO"       VARCHAR2(80 CHAR),
        "USR_DESCRIPTION"   VARCHAR2(2000 CHAR),
        "USR_COMMON_NAME"   VARCHAR2(240 CHAR),
        "USR_EMP_NO"        VARCHAR2(80 CHAR),
        "USR_FAX"           VARCHAR2(4000 CHAR),
        "USR_GEN_QUALIFIER" VARCHAR2(80 CHAR),
        "USR_HIRE_DATE" DATE,
        "USR_HOME_PHONE"             VARCHAR2(20 CHAR),
        "USR_LOCALITY_NAME"          VARCHAR2(80 CHAR),
        "USR_MOBILE"                 VARCHAR2(20 CHAR),
        "USR_PAGER"                  VARCHAR2(20 CHAR),
        "USR_HOME_POSTAL_ADDRESS"    VARCHAR2(2800 CHAR),
        "USR_POSTAL_ADDRESS"         VARCHAR2(2800 CHAR),
        "USR_POSTAL_CODE"            VARCHAR2(30 CHAR),
        "USR_PO_BOX"                 VARCHAR2(20 CHAR),
        "USR_STATE"                  VARCHAR2(120 CHAR),
        "USR_STREET"                 VARCHAR2(120 CHAR),
        "USR_TELEPHONE_NUMBER"       VARCHAR2(4000 CHAR),
        "USR_TITLE"                  VARCHAR2(120 CHAR),
        "USR_INITIALS"               VARCHAR2(10 CHAR),
        "USR_PWD_GENERATED"          VARCHAR2(1 CHAR),
        "USR_LDAP_ORGANIZATION"      VARCHAR2(240 CHAR),
        "USR_LDAP_ORGANIZATION_UNIT" VARCHAR2(240 CHAR),
        "USR_LDAP_GUID"              VARCHAR2(256 CHAR),
        "USR_LDAP_DN"                VARCHAR2(2048 CHAR),
        "USR_ROWVER" RAW(8),
        "USR_ACCESSIBILITY_MODE"      VARCHAR2(20 CHAR),
        "USR_COLOR_CONTRAST"          VARCHAR2(10 CHAR),
        "USR_FONT_SIZE"               VARCHAR2(10 CHAR),
        "USR_NUMBER_FORMAT"           VARCHAR2(30 CHAR),
        "USR_CURRENCY"                VARCHAR2(20 CHAR),
        "USR_DATE_FORMAT"             VARCHAR2(20 CHAR),
        "USR_TIME_FORMAT"             VARCHAR2(20 CHAR),
        "USR_EMBEDDED_HELP"           VARCHAR2(10 CHAR),
        "USR_LANGUAGE"                VARCHAR2(100 CHAR),
        "USR_TERRITORY"               VARCHAR2(100 CHAR),
        "USR_UDF_LOCATION_ID"         VARCHAR2(20 CHAR),
        "USR_UDF_MANAGER_LOGIN"       VARCHAR2(150 CHAR),
        "USR_UDF_PERSONID"            VARCHAR2(10 CHAR),
        "USR_UDF_ASSISTANT_GLOBAL_ID" VARCHAR2(30 CHAR),
        "USR_UDF_STATUS_OLD"          VARCHAR2(5 CHAR),
        "USR_UDF_DIVISION"            VARCHAR2(150 CHAR),
        "USR_UDF_ORG_NAME"            VARCHAR2(240 CHAR),
        "USR_UDF_CREATION_DATE" DATE,
        "USR_UDF_COST_CENTER"     VARCHAR2(150 CHAR),
        "USR_UDF_KNOWNAS"         VARCHAR2(80 CHAR),
        "USR_UDF_ORGID"           VARCHAR2(20 CHAR),
        "USR_UDF_OFFICE_PHONE"    VARCHAR2(60 CHAR),
        "USR_UDF_JOB_CHANGE"      VARCHAR2(20 CHAR),
        "USR_UDF_FULL_LEGAL_NAME" VARCHAR2(200 CHAR),
        "USR_UDF_LAST_UPDATE" DATE,
        "USR_UDF_BLDG_ROOM_NUMBER"     VARCHAR2(45 CHAR),
        "USR_UDF_NO_OF_DIRECT_REPORTS" VARCHAR2(10 CHAR),
        "USR_UDF_LEGACY_MGMT_LEVEL"    VARCHAR2(150 CHAR),
        "USR_UDF_LOCATION_DESCRIPTION" VARCHAR2(240 CHAR),
        "USR_UDF_WORKER_HIRE_DATE" DATE,
        "USR_UDF_MAIL_STOP"              VARCHAR2(45 CHAR),
        "USR_UDF_SHIFT_CODE"             VARCHAR2(150 CHAR),
        "USR_UDF_SVP_ID_GLOBAL"          VARCHAR2(30 CHAR),
        "USR_UDF_VP_ID_GLOBAL"           VARCHAR2(30 CHAR),
        "USR_UDF_JOB_FAMILY"             VARCHAR2(240 CHAR),
        "USR_UDF_HR_PORTAL_LOCATIONS"    VARCHAR2(150 CHAR),
        "USR_UDF_JOB_FAMILY_TITLE"       VARCHAR2(240 CHAR),
        "USR_UDF_FLSA_FLAG1"             VARCHAR2(150 CHAR),
        "USR_UDF_ORGANIZATION_ROLLUP"    VARCHAR2(240 CHAR),
        "USR_UDF_JOB_APPR_LEVEL_DESC"    VARCHAR2(240 CHAR),
        "USR_UDF_JOB_FUNCTION"           VARCHAR2(150 CHAR),
        "USR_UDF_JOB_LEVEL_GUIDE"        VARCHAR2(150 CHAR),
        "USR_UDF_JOB_APPROVAL_LEVEL"     VARCHAR2(150 CHAR),
        "USR_UDF_PERSON_TYPE"            VARCHAR2(240 CHAR),
        "USR_UDF_EVP_ID_GLOBAL"          VARCHAR2(30 CHAR),
        "USR_UDF_GEOGRAPHIC_REGION"      VARCHAR2(240 CHAR),
        "USR_UDF_JOB_TITLE"              VARCHAR2(240 CHAR),
        "USR_UDF_WORKER_STATUS"          VARCHAR2(1 CHAR),
        "USR_UDF_WORKERTYPE"             VARCHAR2(1 CHAR),
        "USR_UDF_EMERGENCY_DE_PROVISION" VARCHAR2(8 CHAR),
        "USR_UDF_NSUNIQUEID"             VARCHAR2(100 CHAR),
        "USR_UDF_OBGUID"                 VARCHAR2(300 CHAR),
        CONSTRAINT "PK_USR" PRIMARY KEY ("USR_KEY") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "DEVT_OIM" ENABLE,
        CONSTRAINT "FK_USR_ACT" FOREIGN KEY ("ACT_KEY") REFERENCES "DEVT_OIM"."ACT" ("ACT_KEY") ENABLE
      )

  • Read one column and output its second column value in same row

    Hi
    I have 2 columns, of which I only wish to read the first column. There is an input value, which comes from an outside source, but we can call a constant for this particular question. This constant value must be compared to these first column values, untill it equals the same value. The code must then read the second columns value in the same row and output this value. The exel spreadsheet is below as an example, though the sheet has far more values and larger numbers.
    If there is no value in the first column which is equal to the input constant, it must output a 0. If anyone could help with this it would be fantastic. I'm still busy working on it and might get it eventually, but I would like to get there faster a great deal.
    Thanks
    Jingles
    Attachments:
    Exel.JPG ‏35 KB

    Jingles,
    if you get the data in a 2d array, you should be able to write soemthing like this pseudocode:
    while i<max length
        if checkvalue=array[1,i]
          output array[2,i]
    i++
    if output is empty output zero
    Regards,
    Kyle Mozdzyn
    Applications Engineering
    National Instruments
    Regards,
    Kyle M.
    Applications Engineering
    National Instruments

  • To get the count of records and able to access the column value in a single

    Hi
    Is there any way to get the number of records in the query and access the column values
    e.g
    select count(*)
    from
    (SELECT department, COUNT(*) as "Number of employees"
    FROM employees
    WHERE salary > 25000
    GROUP BY department ) a
    This wil only get the Count, if i want to access each row from the inline view how can i do that.

    Your question is not clear.
    Are you looking for total record count as well as count by department ?
    Something like this?
    SQL>
    SQL> with temp as
      2  (
      3  select 1 dept ,10000 sal from dual union
      4  select 1 dept ,25100 sal from dual union
      5  select 1 dept ,30000 sal from dual union
      6  select 1 dept ,40000 sal from dual union
      7  select 2 dept ,10000 sal from dual union
      8  select 2 dept ,25100 sal from dual union
      9  select 2 dept ,30000 sal from dual union
    10  select 2 dept ,40000 sal from dual )
    11  select count(*) over( partition by 1 ) total_count,dept,
    12  count(*) over(partition by dept) dept_cnt  from temp
    13  where sal>25000;
    TOTAL_COUNT       DEPT   DEPT_CNT
              6          1          3
              6          1          3
              6          1          3
              6          2          3
              6          2          3
              6          2          3
    6 rows selected
    SQL>

  • Oracle Alert: Access before and after update values of a table column

    We have a requirement where a notification needs to be sent when 'END_DATE' attribute (column in a table X) is set, in an Oracle Applications form.
    I have defined an Event based Oracle Alert which fires 'On Update' of the table X.
    Could anyone please let me know as how to access the value of 'END_DATE' before and after update (i.e :new.END_DATE and :old.END_DATE) in the sql query of the alert.
    The need to use the before update and after update values of the attribute 'END_DATE' is that if we add the condition END_DATE is not null, the alert is sent even if any other attrbutes are updated in the Oracle form which is not the intended behavior.
    Appreciate any help.
    Thanks

    Hi
    use selectionlistener for your first table then add clientlistener and serverlistener so that you will get the rows on click in back bean.
    then get second table vo and and create and add row for that view object. add partial target to refresh your second table from back bean.
    on click of save call commit operation.

  • How to get the Row and Column values in ALV (without using Objects)

    Hi All,
    I need to get the Row / Column when double click is used in ALV, I can use the double click event for this. However, I do not want to use the Object Oriented ALV. I want to implement the same functionality using general (using functions) ALV.
    Is there any way to get the row / column values for a Generia (non-OOPs) ALV report.
    Please help.
    Thanks,
    Vishal.

    Hello,
    The only think you have to do is to get the index where the user clicked, and then read the internal table you sent to the alv
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = 'prg_name'
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND' " this is to the click event!!
          i_callback_top_of_page   = 'TOP_OF_PAGE'
          is_layout                = alv_layout
          it_fieldcat              = alv_fieldcat
          i_save                   = 'A'
          it_events                = alv_events[]
        TABLES
          t_outtab                 = i_totmez.  ---> TOUR IT.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    " then....
    FORM user_commandUSING r_ucomm     TYPE sy-ucomm
                                    ls_selfield TYPE slis_selfield.
    " r_ucomm -> HAS THE STATUS
    " ls_selfield-tabindex  -> HAS THE SELECTED INDEX
    " THEN READ THE INTERNAL TABLE
    " HERE YOU WILL HAVE THE SELECTED ROW
    READ TABLE i_totmez INDEX ls_selfield-tabindex.
    ENDFORM.
    cheers,
    Gabriel P.

Maybe you are looking for

  • Transfer data from one database to another without identities but keep the relation b/w PK and Foreign key

    Hi, I need to transfer data from one database to another database (both are identical databases).  1. Not transferring identity columns (primary keys). the destination table might have the same key. 2. keep the PK's and FK's relation b/w parent and c

  • LR 2.6 Windows 7 64 bit - not all drives listed in browse

    I am using Lightroom 2.6 on Windows 7 Ultimate 64 bit, and I have found an annoying issue - the browse for files or folders dialog that comes up when I need to choose location for my raw files imported as .dng does not list all hard drives of my comp

  • Save as JPG problem?

    Hi, I have recently been bugged by a problem when saving as JPG. I go through my usual workflow, convert my file to 8bits sRGB, then "save as", select JPG from the drop down, goto my folder and click save. I get the quality dialogue, select 12, hit s

  • Edit Page;Report;Enable CSV Output;Apply Changes;Page Not Found;wwv_flow

    Hi, We have a really annoying error in our application, whereby we are unable to save ANY changes to report attributes if Enable CSV Output is Yes. I have many pages with Enable CSV Output set to Yes, and when run, the pages can indeed be exported to

  • Strange issue with cvs output

    I have a report that works fine. in the report I have the cvs enable output turned on. when I click on the link to get the output and it opens in excel, all the columns are there, but one of the columns has the header but is blank on data. in the scr