It is currently Sun Aug 31, 2014 11:35 pm




Post new topic Reply to topic  [ 1 post ] 
 Hide Table Column if no values exist 
Author Message
Trooper
Trooper

Joined: Mon Jun 11, 2012 4:13 pm
Posts: 24
Post Hide Table Column if no values exist
I am running the following query to populate a table:
SELECT *
FROM
(
SELECT pvp.MaterialDescription, pvp.CurrentPrice, cb.ShortDesc
FROM
po_vendor_prices_1270 as pvp
JOIN Codes_Branch as cb
ON (pvp.Branch = cb.Branch)
WHERE cb.BranchGroup = 'NW' AND pvp.SupplierNo = '{Root Container.selectedName}'
GROUP BY cb.ShortDesc, pvp.MaterialDescription, pvp.CurrentPrice
) x
pivot
(
sum(CurrentPrice)
FOR ShortDesc
IN ([ANCHORAGE],[BEND OR],[BILLINGS],[EUGENE OR],[PASCO WA],[PORTLAND],[TACOMA WA],[WHITE CITY],[WOODINVILL])
) p


I would like to hide the established columns that do not have values in any of the rows, I understand that I will have to tap into the Column Attributes Data via scripting but I'm not quite sure of how to this. Can I change my query to not create a column if values are NULL, would that be easier to do? What would the scripting look like to do this?


Fri Sep 07, 2012 9:17 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: