Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Link table with datetime field


Link table with datetime field

Author
Message
Sean Lange
Sean Lange
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16582 Visits: 17024
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. :-P

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 http://www.sqlservercentral.com/articles/Best+Practices/61537/ 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)
Gazareth
Gazareth
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2870 Visits: 5351
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search