Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>Is it at all possible to add a view to the Entity model without a unique identifier? </p> </blockquote> <p>It's possible to have a views where there isn't a single column or set of columns that create the primary key; thus, you end up with spurious relationships. Data warehouse tables sometimes follow that form. In short, normalization is sometimes not followed for either performance reasons or reporting reasons.</p> <p><strong>Now to your second point:</strong> </p> <blockquote> <p>Or is there an easy way to add a unique row identifier to the view?</p> </blockquote> <p>What i suggest you do is to select all the columns from slbtransinsured and see if you can find the one column that uniquely identifies each record. It seems to me that the data is there should be a code type in slblinecodes that you need to select, somewhat like a lookup. </p> <p>For kicks, try running this and tell me what you get:</p> <pre><code>SELECT filingmonth, CEIL (filingmonth / 3), licnum, filingyear, DECODE (GROUPING (insurername), '1', '- All Insured -', insurername), insurername, policylinecode, linedescription, SUM (NVL (grosspremium, 0)), SUM (DECODE (taxexempt, 1, grosspremium, 0)), TRUNC ( CASE WHEN (b.rsn IS NOT NULL OR a.zeroreport = 1) AND b.datereceived IS NULL THEN a.datereceived ELSE b.datereceived END), SUM (aip.iscompanyadmitted (b.naiccocode, b.naicalienid)), a.insuredid FROM aip.slbtransinsured a LEFT OUTER JOIN aip.slbtransinsurer b ON a.insuredid = b.insuredid LEFT OUTER JOIN aip.slblinecodes c ON b.policylinecode = c.linecode WHERE a.submitted = 1 AND a.entryincomplete = 0 GROUP BY filingmonth, licnum, filingyear, DECODE (GROUPING (insurername), '1', '- All Insured -', insurername), insurername, policylinecode, linedescription, TRUNC ( CASE WHEN (b.rsn IS NOT NULL OR a.zeroreport = 1) AND b.datereceived IS NULL THEN a.datereceived ELSE b.datereceived END), a.insuredid; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload