Board index » delphi » Creating Day Of Week columns
Laurie McIntosh
![]() Delphi Developer |
Creating Day Of Week columns2006-01-09 10:44:21 AM delphi171 Hi all I've got a table that looks like this VNAME BDATE QTY VALUE Suess 1/1/2006 2 3.50 Suess 1/2/2006 3 4.70 Suess 1/8/2006 5 8.30 King 1/1/2006 1 5.30 King 1/2/2006 3 11.6 King 1/8/2006 2 3.20 Now. I want to create from this, via the magic of SQL, Name SuQ SuP MoQ MoP TuQ TuP WeQ WeP ThQ ThP FrQ FrP SaQ SaP Suess 7 11.80 3 4.70 0 0 0 0 0 0 0 0 0 0 King 3 8.50 3 11.60 0 0 0 0 0 0 0 0 0 0 So, I want to create a result set that has the days-of-the-week quantities and Values (I'm not multiplying Qty x Price here) as columns. I suspect there's a way to do this with case statements... anyone done anything like this? Regards, Laurie |