Hi everyone,

I had a dataset like so:

Servername|Primary class
----------------------------------
Server1| retail
Server2| dmz
Server3 | NA


And I used this query to summarize it for automated tools:
select environment|| ':' || string_agg(name,',') from servers group by 
environment order by environment;


Now my dataset has changed to:
Servername text|Primary class text|Secondary class text[1d array]
--------------------------------------------------------------------------------
Server1| retail |['dmz']



There can be multiple classes for secondary but they will be the same classes 
as the primary classes.  Input is controlled via web pages so that should be 
guaranteed.  For instance, servers that have primary class of SQL but also 
belong to an application class.  Now I need to change my summary query to 
include all the servers for each class taking into account the secondary class 
column and I'm completely baffled on how to do so with the array.  I know the 
any trick and use it to match against the array when querying for specific 
primary and secondary classes but I can't figure out how to generate the 
listing the same as the old summary query I was using.


Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Corporate
One La-Z-Boy Drive | Monroe, Michigan 48162  | * 734-384-6403 | | * 7349151444 
| *  scot.kreienk...@la-z-boy.com<mailto:%7BE-mail%7D>
www<http://www.la-z-boy.com/>.la-z-boy.com<http://www.la-z-boy.com/> | 
facebook.<https://www.facebook.com/lazboy>com<https://www.facebook.com/lazboy>/<https://www.facebook.com/lazboy>lazboy<http://facebook.com/lazboy>
 | twitter.com/lazboy<https://twitter.com/lazboy> | 
youtube.com/<https://www.youtube.com/user/lazboy>lazboy<https://www.youtube.com/user/lazboy>

[cid:lzbVertical_hres.jpg]



This message is intended only for the individual or entity to which it is 
addressed.  It may contain privileged, confidential information which is exempt 
from disclosure under applicable laws.  If you are not the intended recipient, 
you are strictly prohibited from disseminating or distributing this information 
(other than to the intended recipient) or copying this information.  If you 
have received this communication in error, please notify us immediately by 
e-mail or by telephone at the above number. Thank you.

Reply via email to