how to make result column permanent?

Microsoft Excel 2013 32/64-bit - license...
November 15, 2017 at 16:24:11
Specs: Windows 7
SELECT player_name,
year,
CASE WHEN year = 'SR' THEN 'yes'
ELSE 'no' END AS is_a_senior
FROM benn.college_football_players

I want to make this result column, ' is_a_senior', permanent! Can't seem to figure out.


See More: how to make result column permanent?

Reply ↓  Report •

#1
November 16, 2017 at 00:36:21
Well if you took the time to present your data properly, and gave us some idea of what you are doing and trying to achieve maybe someone will be able to help.

Look at your questions and think, the people on computing.net have no idea what my workbook looks like, have no idea what I am doing, so does the "question" I have posted make any sense?

I think you will find the answer is no.

try again


Reply ↓  Report •

#2
November 16, 2017 at 08:27:23
Sorry buddy, I uploaded the question rather hastily. Let me explain, so, every time you use the Case--Then--Else condition you receive a new column on the fly as the output. For instance in the following example which is just a dummy example,

SELECT player_name,
year,
CASE WHEN year = 'SR' THEN 'yes'
ELSE 'no' END AS is_a_senior
FROM benn.college_football_players

If I use a CASE condition on the imaginary data considering there are columns called 'player_name', 'year' in the table called 'benn.college_football_players'. Let's say column 'year' suggests the seniority of the player and if he is a senior player or not. Then the case query is generating a new column on the fly called 'is_a_senior' where if 'year' says 'SR' then 'is_a_senior' column says 'yes' otherwise the entry in 'is_a_senior' will say 'no'!

But, this newly generated 'is_a_senior' column is created only in the output and I want to pull this column or the entire data from this column into the 'benn.college_football_players' table so that next time I take a look at the 'benn.college_football_players' table I'll see the one extra column which has the data from 'is_a_senior' column!!!

Any ideas on how to achieve that? Keep in mind that the 'is_a_senior' column could have a million entries, meaning I can't insert the values into the 'is_a_senior' manually! Hope this elaboration is clear enough! Thanks in advance.


Reply ↓  Report •

#3
November 16, 2017 at 10:42:27
It sounds like you're going against database normalization. Have you considered just making a view instead of updating, and potentially modifying the structure of, a table?

How To Ask Questions The Smart Way


Reply ↓  Report •
Related Solutions


Ask Question