So I am using a function that was built based on this thread
thread732-1352819
in my newest SP I am getting a data field that looks similer to this
"1,56786789|2,787667976|3,658765666"
every pipe is a row, every comma is a column.
I have declared this tables in my SP
declare @tempdat varchar(800)
set @tempdat = '1,56786789|2,787667976|3,658765666'
DECLARE @rows TABLE
(
num varchar(25),
Ident smallint
)
and have so far progressed with this sql statement
insert into @rows (ccnum, ccIdent) select * from Split(select [Value] from Split(@tempdat, '|'), ',')
which isnt even close.
Am I going to be forced to create 2 temp tables to hold the information, or is there a slick statement that will take care of it all at once.
thread732-1352819
in my newest SP I am getting a data field that looks similer to this
"1,56786789|2,787667976|3,658765666"
every pipe is a row, every comma is a column.
I have declared this tables in my SP
declare @tempdat varchar(800)
set @tempdat = '1,56786789|2,787667976|3,658765666'
DECLARE @rows TABLE
(
num varchar(25),
Ident smallint
)
and have so far progressed with this sql statement
insert into @rows (ccnum, ccIdent) select * from Split(select [Value] from Split(@tempdat, '|'), ',')
which isnt even close.
Am I going to be forced to create 2 temp tables to hold the information, or is there a slick statement that will take care of it all at once.