473,425 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

how to split value form field and drill down list

So,please help me to split value from table like below

field A has value below
13974;14098;14237;14269;14317;14319;14392;14393;13 257;13983;13820

and i need to split and down value in row like below
file B
13974
14098
14237
14269
....
please help me to supports
many thanks
Jul 10 '10 #1
1 1193
You may try to play around te code below, however, if you pass this string to SQL from VB, C++ or other, it could be easier to split it before passing it to SQL.

declare @str as varchar(50)
set @str = '13974;14098;14237;14269;14317;14319;14392;14393;1 3 257;13983;13820'

while charindex(';',@str)>0 begin
select left(@str, charindex(';',@str)-1)
set @str = right(@str,len(@str)-charindex(';',@str))
end
Jul 10 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: TekWiz | last post by:
I've got a system that automatically generates a form. I have it set up so that the backend will return to the inital form page with an error object in sessions data (assuming the backend detected...
1
by: darrel | last post by:
I'm binding data to a drop down list. Then, via another query, selecting one of the items from that list by default. What I'd like to do is change the text of that particular item as well. Can...
5
by: TB | last post by:
Hi All: The following is probably a newbie question, but please bear with me: I am populating a drop down list with items from a database, and would the default selected item to be the current...
0
by: weiwei | last post by:
Hi here is my scenario, I create a drop down list in itemtemplate.(that drop down is created from db), after user click edit command, my ideal plan is have another drop down list in...
3
by: Gurpreet22 | last post by:
I have designed a web form, which has a drop down list. What i would like to do is when a user selects a value from the drop down list and submits the form, the user is redirected to the next page,...
5
by: sharmilah | last post by:
Hi All I wish to use a drop down list with the values 'Active' and 'Inactive' and select one of those values to go into my table 'users' which has a field called 'status'. I do not want to store...
5
by: nuevaenvb | last post by:
Hi all, I was wondering if someone could help me solve this problem, I have created a form which is supposed to do a simple update, these are my fields ProductId.text ...
3
by: zzzxxxyyy | last post by:
i ve 2 dynamic drop down lists... after the user chooses a value in the first drop down ...the second list gets populated..this is done thru reloading... my prob is after reloading it once ,the value...
0
kirubagari
by: kirubagari | last post by:
I'm having the issue where unable fetch the data if the value in combo box is chosen. The problem is when user choose the value from combo box,i want the code fetch for the rest data from the table....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.