<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 7 October 2014 20:05, John Winters <span dir="ltr"><<a href="mailto:john@sinodun.org.uk" target="_blank">john@sinodun.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm extracting data from a legacy (sort of - still actively sold) system<br>
which has the following table:<br>
<br>
(CSV dump of the table)<br>
<br>
<br>
Days,DateIdent<br>
2000-01-03 00:00:00.000,1<br>
2000-01-05 00:00:00.000,2<br>
2000-01-06 00:00:00.000,3<br>
2000-01-07 00:00:00.000,4<br>
2000-01-08 00:00:00.000,5<br>
2000-01-10 00:00:00.000,6<br>
2000-01-11 00:00:00.000,7<br><br></blockquote><div><br></div><div>[snip]</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I'm no database guru, but this seems to me to be bordering on the<br>
insane. Apart from anything else, it means you have to error check<br>
every attempt to retrieve a record with a date in it, in case the date<br>
integer does not have a corresponding row in the Date table.<br>
<br>
Is there a good design reason to do this?<br>
<br></blockquote><div><br></div><div>Somebody didn't want to write the logic to handle dates but just wanted to add integers? </div></div></div></div>