|
Posted by pb648174 on 12/16/05 21:10
There is a way to do a pivot using temp tables and dynamic SQL... I
have used that with some success, i.e. get the distinct values, make
columns for them at run time in a temp table, fill the values and then
get the results. Doesn't SQL 2005 have the ability to do it without the
kludges?
Doug wrote:
> Celko??? Perhaps you might have some insight?
>
> The gentleman has correctly stored his data in relatively, for purposes
> of this discussion, normalized form.
> Now, he wants to present it in human readable form using standard,
> simple, SQL select commands.
>
> Mr. BIhn, you might look into Pivot tables in Excel. Drag your card
> thingy record on the left side, and the non-unique serial numbers
> across the top right.
>
> Towards the mononamed CELKO (not to be confused with the artist
> FORMERLY known as Prince,) Fundamentally, SQL does not solve this
> problem, and you will have to resort to kludges in order to solve this
> fundamental, yet oh so common business need.
> Or, do what the old timers did, and tell the users they really don't
> need this information, they just think they do.
Navigation:
[Reply to this message]
|