I have a column call Title
, and I need to split it in 3 with the following delimiter : <BR>
. If the title is empty, I have to set the three column as empty
I use a temporary table that was filled with multiple row and I want to split the Title
during the insert in the temporary table.
Here is a snapshot of my table :
CREATE TABLE #tempResults (
[...]
EMM_TITLE nvarchar(255),
TITLE_LINE_1 nvarchar(255),
TITLE_LINE_2 nvarchar(255),
TITLE_LINE_3 nvarchar(255))
Here is my insert request. The line EMM_TITLE
is retrieve from a database
INSERT INTO [#tempResults]
SELECT
[...]
'Fooooo<BR>Fooooo2<BR>Foooooo3'
'' -- Expect : Fooooo
'' -- Expect : Fooooo2
'' -- Expect : Foooooo3
How is it possible for me to split the columns in three and set empty if the TITLE is empty ?
I find posts about similar issue, but wasn't able to apply them to my case : Link
TITLE_LINE_2
TITLE_LINE_3
` ? – CompanyDroneFromSector7G Apr 21 '16 at 14:38