biot023 — 2005-11-28T06:42:56-05:00 — #1
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,
vgarcia — 2005-11-28T06:56:44-05:00 — #2
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
r937 — 2005-11-28T07:12:34-05:00 — #3
who told you this? sql server doesn't have timestamp data types, just DATETIME
luke_redpath — 2005-11-28T07:32:05-05:00 — #4
I believe this post is related to the SQL Server driver for RubyOnRails, so perhaps is best in the Ruby forum after all.
biot023 — 2005-11-28T08:38:53-05:00 — #5
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!
biot023 — 2005-11-28T10:53:09-05:00 — #6
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.
mittineague — 2014-09-24T01:34:11-04:00 — #7
This topic is now archived. It is frozen and cannot be changed in any way.