dimanche 12 juin 2016

How to add many calculated columns to a view

I have a view with 42 fields: in this view about 30 tables are involved to join together (1.5 milions of records). All of these 42 fields are simply retrieval from one of these 30 tables so there are no difficulties.

My problems start because I have to add about 15 new columns in this view and all are calculated values by sum or by count on 5-6 tables that are already in join in the starting view. More, many queries are very similiar (only a condition in the where clause differs) and i don't know how to manage this situation without doing stupid and pleonastic joins.

I really don't know how to succeed to join the view with my new queries.

Any ideas? Thank you all!

Aucun commentaire:

Enregistrer un commentaire