I am trying to insert values into table 1 from table 2, there are certain columns from table 1 where I do not want the values from values from table 2. Instead I would like to insert NULL to the values in the table 1.
Below is the example.
insert into dbo.Student
[Number], [Timestamp], [Education], [Roll No],
[Name], [Age],[marks])
Select
[Number], [Timestamp],
convert(nvarchar(max),dbo.Table1([a.Description Description])) as [Education],
Convert(nvarchar(50),dbo.Table2([a.Description Description])) as [Roll No],
convert(nvarchar(50),dbo.Table3([a.Description Description])) as [Name],
dbo.Table4([a.Description Description]) as [Age],
convert(nvarchar(50),dbo.Table5([a.Description Description])) as [marks]
from dbo.Data a
I would like to update the columns [Number]
, [Timestamp]
, [Education]
to NULL
and for the rest of the columns I would like to fetch the values from where it is fetching right now.