Selection on timestamps

Hello all,
I like to write a report with ranges of date and time in the selection screen. The table to be selected contains a timestamp.
How can I convert several date and time ranges in corresponding timestamp ranges for the selection?
Many thanks for help.
   Elmar

Hi Elmar,
Convert date and time to timestamp format and try to use this variable:
              CONVERT DATE <date>
                      TIME <>time
                      INTO TIME STAMP <time stamp variable>
                      TIME ZONE SY-ZONLO.
Regards,
Swarna Munukoti

Similar Messages

  • Select with timestamp in the where-clause don't work after importing data

    Hello,
    I have to databases (I call them db1 and db2, they have the same datastructure) and exported some data from the table "rfm_meas"from db1. Later on I imported that dataset into the "rfm_meas"-table of db2. The table contains a col with the datatype "timestamp(6)" and checking the success of the import looks fine:
    (executed on db2)
    SELECT
    id,acqtime
    from
    rfm_meas
    WHERE
    box_id=1
    AND id>145029878
    Returns two rows:
    ID ACQTIME
    145029883 01.06.10 10:30:00,000000000
    145029884 01.06.10 10:50:00,000000000
    It seems there are valid timestamps as I expected.
    But if I now want to select all rows from box_id=1 which are newer than e.g. 25-may-2010 I would try this:
    SELECT
    id,acqtime
    from
    rfm_meas
    WHERE
    box_id=1
    AND acqtime>=to_timestamp('25-05-2010 17:10:00,000','DD-MM-YYYY HH24:MI:SS,FF3')
    And it returns ... nothing!? If I execute the same query on db1 it works correctly.
    I guess db1 and db2 has different codepages!?
    If I insert some rows from a PL/SQL script in db2 into the "rfm_meas"-table, querys like the one above works fine. Therefore i guess, during importing the data there must be something wrong, so I cann see the timestamp, but can't use it.
    How can i fix that? Any ideas?
    If someone need more details I will provide it.
    Regards
    Steffen

    check this link out
    Importing timestamp columns appears to use to_date instead of to_timestamp

  • Problem with selecting from timestamp field for a particular date

    We're running 10g and we have a timestamp field whose values look like this:
    SQL> select timeinserted from files where rownum < 3;
    TIMEINSERTED
    16-APR-05 01.08.35.97634 PM
    16-APR-05 01.16.10.00419 PM
    SQL>
    I'm trying to run this query, but it returns no rows even though I know there should be some:
    select timeinserted from files where timeinserted = '27-MAY-05';
    I know I just need to somehow tell it to convert the timestamp to date or something like that. How should I rewrite this query? Thanks...

    select timeinserted from files where timeinserted = '27-MAY-05';
    this is poor coding, you compare a date with a varchar2. Not to mention using 2 digits years...
    try something like
    select timeinserted from files where timeinserted >= to_timestamp('27-MAY-2005', 'DD-MON-YYYY') and timeinserted<to_timestamp('28-MAY-2005', 'DD-MON-YYYY');

  • Select where timestamp between date1 and date 2

    try a lot of variations but still dont work
    this was my last shot, then i come here ask for help
    the field DATAHORAS is timestamp
    data1 and dat2 will come from a form
    To_Date(S.DATAHORAS, 'dd/mm/yyyy hh24:mi:ss')
    Between Cast(To_Date(:data1) As TimeStamp) And Cast(To_Date(:data2) As TimeStamp)
    thanks in advanced

    No. You don't need to. But....
    Edit: I was originally using a stupid example using DUAL which was completely misleading - sorry.
    Originally I used the example below to show that you don't have to do an explicit conversion.
    Things will still work comparing timestamps and dates.
    SQL> select systimestamp, sysdate, sysdate+1
      2  from dual
      3  where systimestamp between sysdate and sysdate + 1;
    SYSTIMESTAMP                        SYSDATE              SYSDATE+1
    09-FEB-10 13.58.35.712017 +00:00    09-FEB-2010 13:58:35 10-FEB-2010 13:58:35But then I added an explain plan to show that implicit conversions were going on:
    1  explain plan for
      2  select systimestamp, sysdate, sysdate+1
      3  from dual
      4* where systimestamp between sysdate and sysdate + 1
    SQL> /
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4192335797
    | Id  | Operation        | Name              | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |                   |     1 |     1   (0)| 00:00:01 |
    |*  1 |  FILTER          |                   |       |            |          |
    |   2 |   INDEX FULL SCAN| SYS_IOT_TOP_57625 |     1 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter(SYS_EXTRACT_UTC(SYSTIMESTAMP(6))<=SYS_EXTRACT_UTC(SYSDATE@
                  !+1) AND SYS_EXTRACT_UTC(SYSTIMESTAMP(6))>=SYS_EXTRACT_UTC(SYSDATE@!))
    15 rows selected.
    SQL>However, this example is misleading because it's not the same implicit conversion you get with a proper table with a timestamp column:
    SQL> create table t1
      2  (col1 timestamp);
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1   explain plan
      2   for
      3   select *
      4   from   t1
      5   where col1 between to_date('08-JAN-2010','DD-MON-YYYY')
      6*             and     to_date('09-JAN-2010','DD-MON-YYYY')
    SQL> /
    Explained.
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3617692013
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |    13 |     2   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T1   |     1 |    13 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter("COL1">=TIMESTAMP' 2010-01-08 00:00:00' AND
                  "COL1"<=TIMESTAMP' 2010-01-09 00:00:00')
    Note
       - dynamic sampling used for this statement
    18 rows selected.
    SQL>Which is really what you want.
    It has an implicit conversion on the date parameters and no implicit conversion on the column which would prevent index usage if there were an index.
    Interestingly if you explicitly convert the dates to a timestamp, then you can get an extra filter predicate comparing the two parameters:
    SQL> explain plan
      2  for
      3  select *
      4  from   t1
      5  where col1 between cast(to_date('08-JAN-2010','DD-MON-YYYY') as timestamp)
      6             and     cast(to_date('09-JAN-2010','DD-MON-YYYY') as timestamp);
    Explained.
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3332582666
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |    13 |     2   (0)| 00:00:01 |
    |*  1 |  FILTER            |      |       |       |            |          |
    |*  2 |   TABLE ACCESS FULL| T1   |     1 |    13 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter(CAST(TO_DATE(' 2010-01-08 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AS timestamp)<=CAST(TO_DATE(' 2010-01-09 00:00:00',
                  'syyyy-mm-dd hh24:mi:ss') AS timestamp))
       2 - filter("COL1">=CAST(TO_DATE(' 2010-01-08 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AS timestamp) AND "COL1"<=CAST(TO_DATE(' 2010-01-09
                  00:00:00', 'syyyy-mm-dd hh24:mi:ss') AS timestamp))
    Note
    PLAN_TABLE_OUTPUT
       - dynamic sampling used for this statement
    23 rows selected.oracle version 11.1.0.6
    Sorry about the mistakes in previous version of this reply.
    Edited by: DomBrooks on Feb 9, 2010 2:25 PM

  • SELECT on TIMESTAMP field from ABAP with EXEC SQL

    Hello,
    I'm trying to get a field of one table which is defined as TIMESTAMP. MaxDB parameter DATE_TIME_FORMAT is set to INTERNAL. When I do the SELECT in SQL Studio I get ISO format 'YYYY-MM-DD HH:MM:SS.MMMMMM' back. So I tried a SELECT with ISO in WHERE clause, but I'm always getting a shortdump with this error:
    Database error text........: "POS(82) Invalid date input value"
    Database error code........: "-3065"
    Then I did a SELECT without a WHERE clause in ABAP and got value '06-FEB-09' back from this field. So I tried with this ABAP statement and got no shortdump, but I also need to add time and not only the date.
      EXEC SQL.
        SELECT recv_time INTO :l_time FROM ztest WHERE sent_recv_time = '06-FEB-09'
      ENDEXEC.
    I'm using Native SQL because the SELECT is on a table which is not located in SAP Schema User. "SELECT recv_time FROM ztest WHERE recv_time = '2009-02-24 10:02:55.888000'" works in SQL studio, but not from ABAP.
    Does anyone know which format I need to specify in the WHERE clause?
    Regards
    Markus Karsch
    Edited by: Markus Karsch on Feb 26, 2009 4:22 PM

    >
    Thomas Theodor Koetter  wrote:
    > Hello Markus
    >
    > I don't know whether this will work from ABAP, but at least MaxDB can internally handle the ODBC literals for time, date and timestamp.
    >
    > Therefore literals like
    >
    > "{d'0001-02-03'}"
    > "{t'01:02:03'}"
    > "{ts'0001-02-03 04:05:06'}"
    >
    > might work. See [http://msdn.microsoft.com/de-de/library/ms190234(SQL.90).aspx]
    >
    >
    > HTH & regards  Thomas
    Hi Thomas,
    Thanks for your help. Unfortunately doesn't seem to work, I get following shortdumps (tried with 3 different notations):
    Database error text........: " "
    Database error code........: "-4005"
    Triggering SQL statement...: "SELECT xxxxxx, status, sent_xxxx_time FROM
    xxx_xxxxxxxxx WHERE sent_recv_time = "{ts'2009-02-06 04:05:06'}""
    Database error text........: "POS(87) Invalid keyword or missing delimiter"
    Database error code........: "-3008"
    Triggering SQL statement...: "SELECT xxxxxx, status, sent_xxxx_time FROM
    xxx_xxxxxxxxx WHERE sent_recv_time = '{ts' 2009-02-06 04:05:06 '}'"
    Database error text........: "POS(81) Missing value specification"
    Database error code........: "-5010"
    Triggering SQL statement...: "SELECT xxxxxx, status, sent_xxxx_time FROM
    xxx_xxxxxxxxx WHERE sent_recv_time = { ts '2009-02-06 04:05:06.000' }"
    Regards
    Markus

  • Select  timestamp interval on leap year

    Hello,
    i tried to select a timestamp interval on leap year with following action
    select to_timestamp_tz('20000301 +0100','yyyymmdd tzhtzm')+INTERVAL '-3' YEAR from dual;
    The result is an error: ORA-01839: date not valid for month specified
    the year 2000 is a leap year.
    There is the same result with 36 months.
    Oracle Version 10.1.0.4
    What is wrong on it. Is there a workaround?
    Thanks and Greetings
    Silke Viet

    since you are moving 3 years into the past, the year 1997 is not a leap year, that seems to cause it to throw that error:
    SQL> select to_timestamp_tz('20000301 +0000','yyyymmdd tzhtzm') + INTERVAL '-3' YEAR from dual;
    TO_TIMESTAMP_TZ('20000301+0000','YYYYMMDDTZHTZM')+INTERVAL'-3'YEAR
    01-mar-1997 00:00:00.000000 +0000
    1 row selected.
    SQL> select to_timestamp_tz('20000301 -0100','yyyymmdd tzhtzm') + INTERVAL '-3' YEAR from dual;
    TO_TIMESTAMP_TZ('20000301-0100','YYYYMMDDTZHTZM')+INTERVAL'-3'YEAR
    01-mar-1997 00:00:00.000000 -0100
    1 row selected.
    SQL> select to_timestamp_tz('20000301 +0100','yyyymmdd tzhtzm') + INTERVAL '-3' YEAR from dual;
    select to_timestamp_tz('20000301 +0100','yyyymmdd tzhtzm') + INTERVAL '-3' YEAR from dual
    ERROR at line 1:
    ORA-01839: date not valid for month specified
    SQL>

  • Can I query with a select statement in the from statement

    I'm working with an application that creates a MASTERTABLE that keeps track of DATATABLEs as it creates them. These data tables are only allowed to be so big, so the data tables are time stamped. What I need to do is to be able to query the MASTERTABLE to find out what the latest datatable is and then query the specific datatable.
    I've tried
    select count(*) from (select max(timestamp) from mastertable)
    and it always comes back with a count of 1.
    Is this possible, or is there a better way?

    Well, I'm trying to understand... and if I understand, then you need something dynamic. I did create the following example, of course not exactly as yours (I don't have your data). Each employee has a table with his name, containing the sal history, and I want to query that table starting from actual sal :
    SCOTT@db102 SQL> select ename from emp where sal= 3000;
    ENAME
    SCOTT
    FORD
    SCOTT@db102 SQL> select * from scott;
    SAL_DATE         SAL
    01-JAN-85       2500
    01-JAN-95       2750
    01-JAN-05       3000
    SCOTT@db102 SQL> set serveroutput on
    SCOTT@db102 SQL> declare
      2     v_rc    sys_refcursor;
      3     tname   varchar2(30);
      4     v_date  date;
      5     v_sal   number;
      6  begin
      7     select max(ename) into tname
      8     from emp
      9     where sal = 3000;
    10     open v_rc for 'select * from '||tname;
    11     loop
    12             fetch v_rc into v_date,v_sal;
    13             exit when v_rc%notfound;
    14             dbms_output.put_line(v_date||' '||v_sal);
    15     end loop;
    16* end;
    SCOTT@db102 SQL> /
    01-JAN-85 2500
    01-JAN-95 2750
    01-JAN-05 3000
    PL/SQL procedure successfully completed.
    SCOTT@db102 SQL>                                                                          

  • Pop up on selection screen

    Hi all,
    i have a requirement to create a pop up for user selection as:
    there is a field -'date' on selection screen which user enters.
    this date  queries to a table which contains same date and time against each date we get suppose 3 timestamps of that date.
    so,we have to create a pop up so that user can select any of the 3 timestamps of this date which he enters.
    after the user selects the timestamp ,the table is again queried based on the date and time now.
    what should be the way to acheive this???

    Hi,
      You can use the FM "F4IF_INT_TABLE_VALUE_REQUEST" to display and get the value.

  • Why won't my Set Dynaminc Data Attributes timestamp my data

    Using LabView 2011. Built a program that uses a DAQ Assistant to read some sensors. Output is a Dynamic Data Array. Using the Write to Measurement File Express vi to log the data. Set the X Value (time) Columns to One Column only. Result: I get the dt value in the X Value column. How do I get it to display the timestamp instead?
    I have tried inserting a Set Attributes express vi between the DAQ Assistant and the Write to Measurement file and selected Start timestamp. No effect. Selected Timestamp under signal index. Nope. That didn't work. Tried setting them both. Still no luck.
    Any assistance would be appreciated.
    Thanks in advanced,
    Dean

    You are NOT going to belive this. After spending the afternoon writing VIs for handling existing filenames and exporting waveforms to spreadshet files, I start mucking around with the string because it is putting a blank line between the DAQ reads (5 rows for 5 samples, then a blank row and then the acquisition loops again). In the process of testing (removing the extra carriage returns in the string) I start getting Excel files that no longer have the date or hour, just the minutes and seconds. Wt?
    Turns out, Excel sometimes does that. Format the cells using the custom feature and chose dd/mm/yyyy hh:mm:ss.00 and suddenly its all back to normal.
    To add to my frustration I went back to the original data file my student was complaining about and formatted the cells and guess what? The standard express vi's export the date, hour, minutes, seconds. All you have to do is use the custom cell format in excel.
    However, the standard express vis will still drop those stupid blank rows in your data.
    Thanks for your assistance Dennis. I hope my frustrations as noted above will be of some use to you in the future.
    Best regards,
    Dean

  • Using a table alias to identify row with max timestamp for same ID, syntax?

    Hello experts
    I have created an alias of a table, so now I have table T1 and its alias T2. (T2 is not joined to anything in the universe currently)
    I need to identify the row from T1 with the maximum timestamp for any given ID:
    ID                       Timestamp
    1                         2011-01-24 16:26:00.000
    1                         2011-02-24 14:21:00.000
    1                         2011-02-24 13:49:00.000
    I couldn't find anything on the SAP forums, but elsewhere suggested my approach should be thus:
    1) Create a table alias (leave it free standing i.e. not joined) - DONE
    2) For T1, create a dimension object named Timestamp - DONE
    3) Create a seperate predefined condition icon funnel / filter - in the where clause:
    T1.timestamp = (SELECT max(T2.timestamp) from T2 WHERE
    T1.Key = T2.Key)
    I'm stuck with the BO XI 3.1 syntax on step 3. I can't get it to parse.
    In the where clause, mine starts with @select(T1\Timestamp) = max(@select(T2\Timestamp)
    @where T1.Claim_no = T2.Claim_no)
    Please can someone help me with the syntax so this thing will parse.
    Many thanks in anticipation.
    Eddie

    Hi ,
    Can you try
    SELECT   ID, MAX(datetime) FROM T1 GROUP BY by ID
    Thanks
    Ponnarasu

  • Timestamp field in Oracle

    I have an application to log some data into my Oracle via ODBC. There's a field called 'timestamp' which is generated automatically by my logging application.
    In Oracle, if I do a 'SELECT', it reads 07-MAY-04, but if I import all the data to Access, it reads like this: 5/7/2004 3:08:00 PM.
    I want to be able to select a range data based on time. For example, I want to select everything that is within 5/7/2004 1:00:00 PM to 5/7/2004 4:00:00 PM, how do I write my SQL query?

    I assume, first of all, that the column named "timestamp" is of type DATE, not of type TIMESTAMP.
    In Oracle, a date always contains a date and a time component. The default date format, however, omits the time part of the date when it comes time to display it. You can alter that behavior by using an explicit to_char cast or by altering your NLS_DATE_FORMAT
    SELECT to_char( timestamp, 'DD-MON-YYYY HH24:MI:SS' )
      FROM <<your table>>or
    ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
    SELECT timestamp
      FROM <<your table>>When you want to SELECT data, you will want to use the to_date cast to convert a string to a date for comparison, i.e.
    SELECT *
      FROM <<your table>>
    WHERE timestamp BETWEEN to_date( '5/7/2004 13', 'MM/DD/YYYY HH24' )
                         AND to_date( '5/7/2004 16', 'MM/DD/YYYY HH24' );Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Timestamp in HostFTP receiver channel

    Hello,
    I am working on one scenario which is having sender Proxy and receiver as HostFTP.There is a requirement to append timestamp in File name.Is it possible while using HostFTP receiver channel?
    If yes,please guide me how we can acheive this.
    Thanks,

    Hi Ruchi,
    In the receiver comm. channel , goto the the processing tab , there you will find "File Construction Mode" parameter,In the dropdown select "Add Timestamp".
    I hope this serves ur purpose.
    Regards,
    Rohit

  • Crash using Timestamps

    Hi,
    I have (at last!) a simple program that accesses a simple DB. I have one table that contains a column of type TIMESTAMP.
    I want to use this timestamp eventually to select a range of data (perhaps using between or something like that). But to test my program I have first just a simple query to select the timestamp field:
    Stmt->setSQL("SELECT dzupd FROM erec_t");
    Works fine. However I now want to select data with a particular timestamp. So I am trying:
    Timestamp tsStart;
    tsStart.fromText ("01/04/06 00:00:00", "DD/MM/YY HH24:MI:SS", "" , env);
    Now, without doing anything else with the timestamp, the program runs as before, outputs all the data, and then crashes. The information I have seems to indicate a problem with the oraclient10.dll:
    AppName: oracle2.exe     AppVer: 0.0.0.0     ModName: oraclient10.dll
    ModVer: 10.2.0.1     Offset: 000ad0f7
    I am using Oracle 10g on Windows XP.
    Any advice would be much appreciated.
    Many thanks.

    Thanks for the tip.
    I will need to study the link properly, but creating the environment is first thing I do and terminating it is the last.
    The code is very simple and looks like this:
    // Oracle2.cpp : Defines the entry point for the console application.
    #include "stdafx.h"
    using namespace oracle::occi;
    using namespace std;
    int tmain(int argc, TCHAR* argv[])
    //create environment and connection
    Environment* env = Environment::createEnvironment();
    cout << "Environment created" << endl;
    Connection* conn=env->createConnection("tester","tdb","testdb");
    //3rd parameter is db name/TNS alias
    cout << "Connection made" << endl;
    // build SELECT statement
    Statement* Stmt = conn->createStatement();
    Stmt->setSQL("SELECT dzupd FROM erec_t");
    Timestamp tsStart;
    tsStart.fromText("01/04/06 00:00:00", "DD/MM/YY HH24:MI:SS", "" , env);
    ResultSet *rs = Stmt->executeQuery();
    while (rs->next())
         Timestamp st = rs->getTimestamp(1);
         cout << "\t\t" << st.toText("dd/mm/yyyy hh:mi:ss",1) << endl;
    Stmt->closeResultSet(rs);//to free resources
    conn->terminateStatement(Stmt);
    //logoff and terminate connection
    env->terminateConnection(conn);
    cout << "Connection terminated" << endl;
    //terminate Environment by calling static method
    // Environment::terminateEnvironment(env);
    cout << "Environment terminated" << endl;
         return 0;
    I think it is all done within the correct scope but I will study it more closely.
    Thanks for the tip.
    Tristan

  • Select for update

    Hi,
    I have some problem.
    I think to use 'for update' clause for exclusive-data-lock.
    I tested in development environment, my program execute well.
    When I distribute my program, the problem is occur!
    I locked row. Another can lock same row. Because DBSession is connect to Oracle
    by only one session. oracle think that connected user is one, it is enable to
    lock same row.
    Someone give me good advice to lock row by oracle.
    And I want to know the way to exclusive-data-lock in forte standerd.
    Thanks.
    &#27;$B3t<02q<R&#27;(B &#27;$B%F%#!<!&%7!<!&%(%U&#27;(B
    &#27;$B!!!!!!;3ED&#27;(B &#27;$B8y&#27;(B([email protected])
    T.C.F.Co.Ltd.
    Isao Yamada([email protected])

    Tom,
    Instead of selecting the timestamp ahead of time, why not just include it
    in your update statement?
    ... where timeStamp <= :timeStamp
    If the update fails, it will return 0 rows, at which time you can do
    whatever exception processing you want to do.
    Don
    At 06:22 PM 9/25/97 +0800, Tom wrote:
    Dear folks,
    We're also studying how to handle concurrency in our project, including
    method of timestamp and object id. But we decide to use db resources and
    let the database handle the locking for us as timestamp method will
    incur a double data retrieval/IO, and an unique object id will
    bottleneck the system.
    Any comments on it, pls let me know.
    Cheers :-)
    Ivan Chung.
    Dale V. Georg wrote:
    On Fri, 12 Sep 1997 09:45:34 -0500, Schiek, Labeaux wrote:
    Hi Isao:
    I had the same problem, So let me start by saying thefollowing;
    This is a non-trivial task.
    Unfortunately, I'm in an environment which 'has no money' to
    purchase these excellent tools, so I'm forced to create my own.
    So here is a very rudimentry way of handling concurrancy
    Given that there is a unique id in each row of the DB table.
    Create an array of Textdata or IntegerData in your database
    service object(DBSO).
    When someone attempts a 'Select ....... for Update' request
    through the DBSO, it first checks the array to see if someone elsehas
    'checked it out'.
    If yes, then send a message saying 'this record is checkedout'
    if no , then append the unique id to the array and perform the
    SQL statement.
    When the update is performed through the DBSO, then deletethen
    Unique ID from the Array.
    There are a other few checks in these methods to keep things
    clean.
    I call this ' The Poor Man's Concurrancy Handler', but hey, so
    far it works for me. We have a low number of concurrent users(normally
    les than 10).
    No doubt, this method of attack is frought with futureproblems,
    but if you don't make mistakes, you not learning. :-)
    If you need further detail on what I've done, let me know andI
    will supply you with more info.
    And if others wish to comment on this way to handleconcurrancy
    (positive or negitive) - feel free!What we have done is another form of "poor-man's concurrency." We
    added a timestamp column to the tables of our database where we wanted
    to implement row-level locking, then added a DateTimeData attribute to
    the corresponding business object. Whenever a user selects rows, we
    load the timestamp value into the business object. If later on they
    go
    to save changes to that object, we first select the timestamp for the
    row from Oracle with intent to update. We then verify that the
    timestamp in the database matches the one in their object and if so,
    allow them to perform the update, including an update of the timestamp
    column. Otherwise we send an error message back to tell them that
    someone else has updated the database since they did their original
    select. This way the row is only locked during the brief period that
    it is actually being updated. (Note that this approach is marginally
    easier on Microsoft SQL Server than on Oracle since MS-SQL gives you a
    timestamp column that it automatically maintains.)
    Several people recommended this type of approach in this forum a few
    months back, and it has worked out well for us. In reality, we've
    never actually bumped into a conflict; it's just not the nature of the
    application I'm currently involved with to have multiple people
    potentially updating the same objects. Nevertheless, it's good to
    have
    SOMETHING there to handle those "what if" cases.
    Dale
    ====================================
    Don Nelson
    Senior Consultant
    Forte Software, Inc.
    Denver, CO
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ====================================
    "If you ask me, though, any game without push-ups, hits, burns or noogies
    is a sissy game." - Calvin

  • Max value for a TIMESTAMP column?

    What is the max value for a TIMESTAMP column?
    I'm using the ODP.NET provider 9.2.0.4. When i put C#'s DateTime.MaxValue (i.e. 12/31/9999 23:59:59,999) into a TIMESTAMP column, everything is ok. Retrieving this value (e.g. via SQL*Plus Worksheet) returns ora-01877 (string too long for internal buffer).
    Any ideas?
    Regards,
    Daniel

    Maybe you hit Bug 1782816 Select of TIMESTAMP gives ORA-1877 on some platforms
    Product (Component)                      : SQL*Plus (SQL*Plus)
    Range of versions believed to be affected: Versions >= 9.0 but < 9.2 
    Versions confirmed as being affected     : 9.0.1.3
    Platforms affected                       : Generic (all / most platforms affected)

Maybe you are looking for

  • Java sha1 and PHP sha1

    Hello to everyone. When encoding with PHP using sha1 i do not get the same result as Java's sha1 encoding. For example encoding letter 'e' in PHP produces: 58e6b3a414a1e0[b]90dfc6029add0f3555ccba127f whereas in Java it produces: 58e6b3a414a1e0[b]3fdf

  • To extend period for each alternative in BOM

    In BOM, we have couple of alternatives.  Each alternative includes valid date (valid from and valid to).  We want to change value for valid date (valid from and valid to).  Unfortunately, those fields are blocked for changes.  Therefore, can anyone t

  • Company wide Custom Outlook Events - Exchaneg 2010 sp3

    Is there a way to create a company wide related recurring event/holiday in Outlook at the exchange level which shows up in all the employees Outlook???? rather then manually doing it on each user mentiond here http://office.microsoft.com/en-ca/outloo

  • You can't open the application...

    Hey I am somewhere between a novice and a professional with computers so I have been stumped since I saw this error for Adobe CC You can't open the application "Creative Cloud" because it is not responding. Any insight on how to solve this? Thanks, a

  • Alpine 9885 head unit now works with 1.0.1 iPhone

    My iPhone was not liking my Alpine 9885 head unit with iPod cable - the music came out of the iPhone speakers instead of the car speakers. With 1.0.1 firmware, the iPhone now operates correctly. Music comes out of the car speakers as expected. So, I