[quoted text, click to view] --CELKO-- wrote:
> Read that sentence back to yourself. Like Britney Spears' record
> collection and squid farming statistics? How can such a result have
> any meaning?
More like a customer *guarantees* you that two business entities that
you're dealing with will **never** be viewed or reported together. Then
six months later he decides to combine them into a parent child
relationship, and now he wishes he had requested you to create
hierarchy instead of just duplicating a database and it's front end
components. Duplication took about ten minutes. That was what he wanted
to pay for. Creating dependant child objects that don't step on the
feet of the parent objects with duplicated primary keys and many other
issues would have taken weeks.
[quoted text, click to view] > And you are using IDENTITY columns in both unrelated tables, to further
> confuse things? Then you are converting numerics to strings so you can
> concatenate things to them. That is approximately the way we did it in
> COBOL in the old days.
Not much of an issue with read-only reporting, agree it would be a
morass if I needed to create updateable tables.
[quoted text, click to view] > Why not just add a column for the data source ('R' = record collection,
> 'S' = squids, etc.) and then do a two column sort without the overhead
> casting?
Because I needed to display a four-tiered hierarchy as one table for
the purpose of this read-only report. Having the translated values
spread across multiple columns simly wouldn't give me the report I
wanted.
[quoted text, click to view] > And I would add to that, ".. with elegance and not kludging."
Honestly, this can't be the same Joe Celko who wrote the foreword in my
favorite Ken Henderson T-Sql book. My solution was elegant, because it
took very little time, it's bullet-proof in a read-only report, and the
query runs in under a second, versus 5 seconds it used to take
manipulating values in the front-end!
Bob Graham