SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SQL Server only allows 1 TIMESTAMP column per table

    Hallo -- due to some fairly horrendous sins in a previous life (I can only imagine genocide or something similarly grave), I am having to use SQL Server 2000 as the db for my web app.
    When I've tried to create both created_on and updated_on columns in a table, I have been informed that I am only allowed one timestamp per table.
    Has anyone else come up against this & managed to find a workaround?
    Please believe me when I say that if switching to postgres or mysql was an option, I would have taken it already!
    I hate M$.
    Cheers for any & all help,
    doug.

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Edit:

    this thread has nothing to do with Ruby so I'm moving it.


    Why don't you use a datetime datatype for one of those fields?

    I also don't see what's so horrible about SQL Server; I prefer using it to most other database systems. Using M$ is also a surefire way to sound smart

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,251
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by biot023
    I have been informed that I am only allowed one timestamp per table.
    who told you this? sql server doesn't have timestamp data types, just DATETIME
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe this post is related to the SQL Server driver for RubyOnRails, so perhaps is best in the Ruby forum after all.

  5. #5
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I perhaps should have put a little more detail in -- I am specifically creating created_on and updated_on attributes in Ruby ActiveRecord objects -- I was hoping this was kind of explicit in the context of the Ruby forum.
    Will be using a DATETIME now & I'll let people know how I get on.
    BTW -- the M$ thing would be a flaming issue for another place, and as it's me that raised it here, I'll retract & apologise!
    Cheers,
    doug.

  6. #6
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DATETIME seems to be working great, cheers -- there does appear to be a TIMESTAMP datatype, but it isn't what anyone coming over from standardised SQL might think it is.
    Thanks again,
    doug.


Bookmarks

Posting Permissions

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