Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase ««12

Link table with datetime field Expand / Collapse
Posted Monday, September 24, 2012 11:35 AM



Group: General Forum Members
Last Login: Yesterday @ 8:08 PM
Points: 16,145, Visits: 16,850
L' Eomot Inversé (9/24/2012)
Sean Lange (9/24/2012)

I don't understand what you are getting at, Sean.

Tom I was typing before I really understood the question completely. Maybe if I had used the word history instead of audit it would have been more clear. Either way within the next couple posts I was in total understanding and also said his ddl looks totally fine. I took the bumpy road to the same conclusion that you have, no need to change anything.

Yes, I saw that after I'd posted - there was a bit of conversation between you and the OP while I was typing - I should have spotted that an not posted something what was unneeded.

Nah because if it had not been cleared up I would have asked the same thing. As I read my own post I kind of wonder where my brain was going because it had clearly wandered far off track. Need to engage the brain before the keyboard sometimes.


Need help? Help us help you.

Read the article at for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1363653
Posted Tuesday, September 25, 2012 3:45 AM


Group: General Forum Members
Last Login: Today @ 12:07 PM
Points: 2,754, Visits: 5,199
Thanks guys. In this case, the 'whodunnit' is the updateserver, so no need for another field.
The updatetime is the date/time the sourcefile was last processed by the updateserver, and so can be updated after initial creation.

So basically it's a history table masquerading in the format of a junction table.

The original question was something half-remember from a db design class years ago - specifically where there's only the two FK's/compound PK and a datetime field. This is the first time since then that I've created a table with this specific format so not really a worry!
Daftly enough, if there had been additional attributes within the table then I wouldn't have had any doubts.
Post #1363887
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse