Avatar of ram27
ram27

asked on 

stored procedure to split and loop

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

value1|Value2#value3|Value4#value5|value6 etc....

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
etc..

basically, i need to do
please help on this
i am using SQLSERVER2008

thanks,
Ram
Microsoft SQL Server.NET Programming

Avatar of undefined
Last Comment
wdosanjos
ASKER CERTIFIED SOLUTION
Avatar of wdosanjos
wdosanjos
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo