473,320 Members | 1,839 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,320 software developers and data experts.

split question

Can anyone help me with a simple split problem. I've never done it
before and I have no clue.

I have value sSearch = Lastname Firstname

I need to split it into two separate field:
sLast = Lastname
sFirst = Firstname

I tried
arrSearch = split(sSearch, " " )
but how do I actually get the values?

thanks in advance for your help
Lisa

Jun 15 '06 #1
4 1195
for i = 0 to ubound(arrSearch)
response.write i & " = " & arrSearch(i) & "<br>"
next
"peashoe" <pe*****@yahoo.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Can anyone help me with a simple split problem. I've never done it
before and I have no clue.

I have value sSearch = Lastname Firstname

I need to split it into two separate field:
sLast = Lastname
sFirst = Firstname

I tried
arrSearch = split(sSearch, " " )
but how do I actually get the values?

thanks in advance for your help
Lisa

Jun 15 '06 #2
thanks Aaron,
but I don't need to display the data. I just need to grab it so I can
do a sql select to get other data. Therefore, I need to actually have
two values:

sLast and sFirst...

Make sense?
~L~

Jun 15 '06 #3
"peashoe" <pe*****@yahoo.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
thanks Aaron,
but I don't need to display the data. I just need to grab it


Okay, so don't response write, I was just showing you how to quickly see the
data after the split.
Jun 15 '06 #4
the problem was I didn't know how to do it - but I found the answer on
here anyway:

arrSearch = split(sSearch, " ")

this is what I didn't know how to do...
sLast = arrSearch(0)
sFirst = arrSearch(1)

Thanks~!

Jun 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: alexk | last post by:
I've a simple question. Why the following: words = "123#@$#$@^% wordB#@$".split('~`!@#$%^&*()_+-={},./') doesn't work? The length of the result vector is 1. I'm using ActivePython 2.4 Alex
2
by: SL_McManus | last post by:
Hi All; I am fairly new to Perl. I have a file with close to 3000 lines that I would like to split out in a certain way. I would like to put the record type starting in column 1 for 2 spaces,...
3
by: rxl124 | last post by:
Hi, room Beginner of learning perl here!! I have question to all, I have below file name datebook.master which contains only 2 lines Mike wolf:12/3/44:144 park ave, paramus: 44000 Sarah kim:...
6
by: Senthil | last post by:
Code ---------------------- string Line = "\"A\",\"B\",\"C\",\"D\""; string Line2 = Line.Replace("\",\"","\"\",\"\""); string CSVColumns = Line2.Split("\",\"".ToCharArray());
3
by: John Salerno | last post by:
This is an example in the book I'm reading: string fullName = " Edward C Koop "; fullName = fullName.Trim(); string names = fullName.Split(' '); string firstName = names; //...
5
by: KC | last post by:
Can I do a split() on a string where the delimiter is one or more space characters? I have a string with spaces between the numbers but I don't know how many. You can do this easy in Perl, but...
4
by: Michele Petrazzo | last post by:
Hello ng, I don't understand why split (string split) doesn't work with the same method if I can't pass values or if I pass a whitespace value: >>> "".split() >>> "".split(" ") But into...
7
by: Matthias Winterland | last post by:
Hi, I have a simple question. When I read in a string like: a='1,2,3,4,5 6 7,3,4', can I get the list l= with a single split-call? Thx, Matthias
9
by: dtex23 | last post by:
Good afternoon all, Question about list assignment in perl... Given a piece of code that looks kinda like this for parsing some '|' delimited input text lines : ($var1, $var2, $var3) =...
1
by: John | last post by:
Hi I have written a Split function which in turn calls the standard string split function. Code is below; Function Split1(ByVal Expression As String, Optional ByVal Delimiter As String = " ",...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.