I have a very large select statement. I was hoping to somehow take out the repeated code that is used and store it somewhere and access it through something like an include statement that is used in other lanuages. For example, I have a select statement that creates a column and then that code is expanded upon and stored as another column. SELECT (code here) AS column1, (code here)*5 AS column2, (code here)/345 AS column3 FROM table I have the same code written multiple times. Is there a way to store it somewhere else and include it in the statement instead of writing it multiple times? (code here) is usually a case statement with multiple whens.