Solved

Add a column to SQL View (sql 2008r2)

Posted on 2014-01-22
2
756 Views
Last Modified: 2014-01-23
I have a view that I want to add a new column to and be able to enter static values for reference. Thanks for any assistance.

 Example of current view to add new column
0
Comment
Question by:srodgers45
2 Comments
 
LVL 9

Accepted Solution

by:
Vijaya Reddy Pinnapa Reddy earned 500 total points
ID: 39802603
Syntax to add news columns to View
ALTER VIEW dbo.viewname
AS
SELECT originalcolumnlist, ColA+ColB AS col1, ColC+ColD as col2, ColE+ColF as col3, ColG+ColH as col4
FROM yourtable
0
 

Author Closing Comment

by:srodgers45
ID: 39803648
Thank you for the help.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question