-
Alias Columns in SQL 6.5
I'm running MSSQL 6.5 and would like to pull various column values from a single column and give it an alias according to its value. Ex. I currently have ACT, SAT, etc. test scores populating a single column with as many rows per student id. For reporting purposes, I believe I need to generate alias columns in my select statement, each alias column representing the score value of the respective ACT, SAT, etc. entry.
select people_id,
ACT Score (where score = ACT),
SAT Score (where score = SAT
from testscore
where score > '0'
group by people_id
The actual column name is "score"; the alias being the ACT/SAT Score.
Is this possible in SQL, and what would be the syntax?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|