I currently have 8 SQL views that give some detailed calculations based on a Customer ID which in turn will be used to generate a scoring model. Is there a way for me to create another view that will show all Customer ID's, all 8 results, and a SUM?
Here's the kicker. One view holds a DISTINCT listing of every Customer ID in the database along side it's Customer Type with a score given to the type. Other views do not show every Customer ID as they may not receive a score due to not meeting the criteria.
CustID | CustType | TypeScore
1234 | O | 5
5678 | B | 15
6543 | O | 5
3456 | B | 15
(The view I would want to create w/ the three "Score" columns with any and all Distinct Customer ID's - from "View 3", the customer ID's that aren't there would get a default value of "0"...) SUM View:
CustID | TypeScore | StateScore | CountScore | ScoreSUM
1234 | 5 | 0 | 20 | 25
5678 | 15 | 20 | 0 | 35
6543 | 5 | 20 | 15 | 40
3456 | 15 | 0 | 0 | 15
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
by Mark Wills
Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server... So if you are the accidental DBA, or, simp…
I am showing a way to read/import the excel data in table using SQL server 2005...
Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name".
Now to import this Excel data into the table, we will use…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA).
For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651
If you want to manage em…