'SQL Server - Add results of a SELECT query to an existing table
I currently have a table in SQL Server called masterTable
. What I'd like to do is to add a new column to this table called report_Date
.
I would like to store the results of a SELECT
query in the report_Date
column. The query works fine (it converts a nvarchar
into a desired date format). What I can't do is append the results to the column.
My query:
SELECT
CONVERT(varchar(10), CAST(FileName AS date), 103) AS FileName
FROM dbo.masterTable
Any suggestions please?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|