Results 1 to 3 of 3

Thread: timestamp problem

  1. #1
    Vikram Swami Guest

    timestamp problem

    I have a table in SQL server 6.5 which has two columns. One is a timestamp column and another is an int column. Now I need to change the int column to numeric (16). For this I cannot use the alter table statement as it is not there in sql server 6.5. I tried creating another table with two columns- one as numeric(16) and the other as timestamp. I transferred the data from he old table to the new table and dropped the old table and finally renamed the new table as the name of the old table. But the problem is that the timestamp column now contains data that is different from the data that was there in the original column. I cannot update the timestamp column as that is done automatically neither can I insert the values. How do I make sure that the data in the timestamp column remains the same.

    Any help would be greatly appreciated.

    Vikram

  2. #2
    Davy Guest

    timestamp problem (reply)

    1. Backup the database
    2. Script the Original Table (TABLE A)
    3. Rename the Original Table )TABLE A)
    4. Run script to create NEW EMPTY Table (TABLE B)
    5. Restore from Backup into NEW EMPTY Table (TABLE B)


    ------------
    Vikram Swami at 2/8/2002 12:56:18 AM

    I have a table in SQL server 6.5 which has two columns. One is a timestamp column and another is an int column. Now I need to change the int column to numeric (16). For this I cannot use the alter table statement as it is not there in sql server 6.5. I tried creating another table with two columns- one as numeric(16) and the other as timestamp. I transferred the data from he old table to the new table and dropped the old table and finally renamed the new table as the name of the old table. But the problem is that the timestamp column now contains data that is different from the data that was there in the original column. I cannot update the timestamp column as that is done automatically neither can I insert the values. How do I make sure that the data in the timestamp column remains the same.

    Any help would be greatly appreciated.

    Vikram

  3. #3
    Davy Guest

    timestamp problem (reply)

    Ignore that last reply it was pants...!!


    ------------
    Vikram Swami at 2/8/2002 12:56:18 AM

    I have a table in SQL server 6.5 which has two columns. One is a timestamp column and another is an int column. Now I need to change the int column to numeric (16). For this I cannot use the alter table statement as it is not there in sql server 6.5. I tried creating another table with two columns- one as numeric(16) and the other as timestamp. I transferred the data from he old table to the new table and dropped the old table and finally renamed the new table as the name of the old table. But the problem is that the timestamp column now contains data that is different from the data that was there in the original column. I cannot update the timestamp column as that is done automatically neither can I insert the values. How do I make sure that the data in the timestamp column remains the same.

    Any help would be greatly appreciated.

    Vikram

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •