Databases

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Regarding Timestamp

    2 answers - 640 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Greetings,
    This may be very basic but i still would like to ask
    this.
    I have a table with a timestamp field that gets updated by the DB
    engine.
    select * from test
    go
    id timestamp_value
    1 0x00000000003da03b
    (1 row affected)
    If i try to bcp out the content of this table into flat files, the
    content appears as below
    1|00000000003da03b
    The "x" from the timestamp value is not getting exported out.
    How can i make the entire timestamp value to be exported to flat files
    without truncating anything?
    Any help would be appreciated.
    TIA
  • No.1 | | 1332 bytes | |



    pankaj_wolfhunter@yahoo.co.in wrote:

    Greetings,
    This may be very basic but i still would like to ask
    this.
    I have a table with a timestamp field that gets updated by the DB
    engine.

    select * from test
    go

    id timestamp_value

    1 0x00000000003da03b

    (1 row affected)

    If i try to bcp out the content of this table into flat files, the
    content appears as below

    1|00000000003da03b

    The "x" from the timestamp value is not getting exported out.

    How can i make the entire timestamp value to be exported to flat files
    without truncating anything?

    Any help would be appreciated.

    TIA

    Hi. In fact the '0x' is not part of the data. It is just a syntactical
    tag, added by ISQL in output, and needed to parse inputs or other
    Sybase-supplied query tool. The data itself is a small binary column
    with exactly the data you see in the BCP file. It is put that way in
    the BCP file, and expected to be that way by BCP when it goes back in
    to the DBMS via BCP. In other words, BCP doesn't need or want the extra
    hint about the column type attached to the data. If you want to convert
    BCP files to input for ISQL etc, you would have to add it yourself.
    HTH,
    Joe Weinstein at BEA Systems

  • No.2 | | 70 bytes | |

    thanks Joe, that was very helpful info. thanx again

Re: Regarding Timestamp


max 4000 letters.
Your nickname that display:
In order to stop the spam: 8 + 7 =
QUESTION ON "Databases"

EMSDN.COM