I have an SQL Server stored procedure which reads from a csv using SSIS and populates data in different tables in SQL Server 2008.
The issue that I have is that in the csv, I have a column called name
, which I pass into the variable @name
but this name has first and last name separated by a space.
Sample value:
@name = 'sullivian white'
However, this single variable value has to be saved into the database under two columns, named firstname
and last name
.
How can I extract the data? Is there a way to use substring to split this variable?