stored procedure to split and loop
Posted on 2011-10-04
I need help in writing logic in stored procedure, to inser into TABLEA.
in the SQL stored procedure,
i have string ( that is @FeildInfo ) with
i want to split the above string ( @feildInfo) into indivual values so that i can insert into table like,
valu1 should go to colum 'n' in the TABLEA
value2 should go to column 'P' in TABLEA
as one record.
value3 should go to column 'n' in the TABLEA,
value4 should go ro column 'p' in the TABELA
basically, i need to do
please help on this
i am using SQLSERVER2008