Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Creating new field values in SQL using a view

$
0
0

This may seem naive or rudimentary but really trying to understand this before I execute it and then write it up in a processing manual.

I have a series of tables which have a field titled size class. It is a code that measures a range of employment such as 0-4, 5-9, and so on. There are 43 different values for this in the tables (xyzfirms20171, xyzfirms20172, xyzfirms20173, and xyzfirms20174). The report that I am tasked with constructing only uses 9 size classes.

My first thought was to add a new field and then update the tables using this new range of values for size class. However, in recent days, I have became aware of doing operations such as this in a "view" or essentially in the background. This would be where it is not a permanent addition to the table but is still queried. Would it look like the code snippet below or is there a...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>