0

I have two columns extracted from our data base and I would like to group one of the column (Norms) depends on the value in another column (Directive).
The norms are connected to some directives and this relation exist only in an excel file. So i am trying to build a view which realizes this relation.

The data looks like this,

 Directive           |      Norms       
 CE, 650, No Flicker | CEI EN 60598-2-22  
 CE, 650, No Flicker | CEI EN 60598-2-2  
 CE, 650, No Flicker | CEI EN 60598-1   
 CE, 650, No Flicker | EN 62471         
 CE, 650, No Flicker | 2009/125/CE      
 CE, 650, No Flicker | 874/2012/CE       
 CE, 650, No Flicker | 2014/30/EU       
 CE, 650, No Flicker | 2014/35/EU       
 CE, 650, No Flicker | ISO 15714        
 CE, 650, No Flicker | EN 60335-2-65  

and I would like to generate something like this

 Directive       |              Norms                     
 CE              | CEI EN 60598-2-22, CEI EN 60598-2-2, CEI EN60598-1  
 650             | 2009/125/CE, 874/2012/CE, 2014/30/EU,2014/35/EU   
 No Flicker      | EN 62471, ISO 15714, EN 60335-2-65  

Sample Image

M.Ali
  • 67,945
  • 13
  • 101
  • 127
Aamir
  • 1
  • 1
  • What defines what value is aggregated into what? If I am honest, your data looks like it's the real problem, your column `Directive` appears to be denormalised, and the result you *want* is also denormalised. – Thom A Nov 09 '22 at 15:27
  • 1
    If the relationship "exist only in an excel file", there is no way you can have a view/query return what you want. You would need to import the excel relationship information (probably normalizing it first) into SQL. Then you could build a view/query using that. – Eric Kassan Nov 09 '22 at 17:10

0 Answers0