B
Bryan Dickerson
Hi all. Newbie to the group and woefully lacking in SQL skills and
terminology so I'll beg your patience.
I have an existing query that I want to make data-driven. The query
produces 3 columns: Part Number, Warranty Type, and Qty. I would like to
make each Warranty Type a column that sums the quantities of each part
number. That way if at some point a new Wrty Type is added, the query
automatically picks it up. Now having said that, the query is part of a
stored procedure that uses several temp tables to create and hold data until
a final query pulls them all together. So there would need to be some way
to pick up all warranty types in the final query without hard-coding any
values. Surely this has been done before, right?
TIA!
Bryan
terminology so I'll beg your patience.
I have an existing query that I want to make data-driven. The query
produces 3 columns: Part Number, Warranty Type, and Qty. I would like to
make each Warranty Type a column that sums the quantities of each part
number. That way if at some point a new Wrty Type is added, the query
automatically picks it up. Now having said that, the query is part of a
stored procedure that uses several temp tables to create and hold data until
a final query pulls them all together. So there would need to be some way
to pick up all warranty types in the final query without hard-coding any
values. Surely this has been done before, right?
TIA!
Bryan