> Greetings,
> In Sybase, a timestamp column is automatically loaded
[quoted text clipped - 15 lines]
>
> TIA
Sybase's timestamp column has nothing to do with human times and dates.
The Sybase DATETIME column type is for that. A Sybase timestamp column
is for OPTIMISTIC LOCKING, so you can read a row without locking it,
and later do a transaction that says 'WHERE timestampcol = XXX' (XXX is
the value you read before). This will only update the row if some other
transaction has not altered it since you read it.
That's the purpose. If your application uses that column, you will have
to do some deeper understanding of your application, and likely have
to alter it's SQL and/or augment DB2 to implement this sort of behavior.
Joe Weinstein at BEA
Serge Rielau - 10 Dec 2005 01:15 GMT
>> Greetings,
>> In Sybase, a timestamp column is automatically loaded
[quoted text clipped - 27 lines]
>
> Joe Weinstein at BEA
Ah.... In that case I propose an IDENTITY column in conjuction with a
BEFORE UPDATE trigger. a SET versionid = DEFAULT; on the identity column
will force re-issuance.
Cheers
Serge

Signature
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
pankaj_wolfhunter@yahoo.co.in - 10 Dec 2005 03:04 GMT
thnx for the replies.
Joe, i didnt quite get u. i mean if we have a column with that data
type and
we want to migrate it, how exactly should i do it.
i mean can u ellaborate on that with some example.
TIA
Joe Weinstein - 10 Dec 2005 16:28 GMT
> thnx for the replies.
> Joe, i didnt quite get u. i mean if we have a column with that data
[quoted text clipped - 3 lines]
>
> TIA
Serge posted a way to do the DBMS-side implementation, but it seems
you have the job of porting an application from one DBMS to another,
and that is much more complicated a task than simply creating tables.
You fundamentally have to understand how your application is using
the Sybase timestamp column (and likely many other design semantics)
before you have a hope of a successful performant conversion.
The DBMS is never a simple row store in any performant application,
and what works well in one DBMS type works differently or not at all
in another.
Joe Weinstein at BEA Systems
pankaj_wolfhunter@yahoo.co.in - 12 Dec 2005 03:13 GMT