How To Use Split Function In SQL Line?
i want to use split function in sql line ....
View Repliesi want to use split function in sql line ....
View RepliesI have a variable which holds college names
strcollege="University of California"
i want a variable to save UoC
what i meant was there are 3 words University of California
so i want the first letter in each word to be stored in a variable ....
I would like to have a textarea and have a user input multiple part numbers and return the results. I have gotten it to work if there is a space in between part numbers but if there is a line break it will not work. Anyone have a clue how to split on a line break.
Array = split(request("part"), ch(13) )
doesnt work, just returns first input.
Can anyone please tell me how can i do the pop up message in ASP without blank the background of the page when the pop up message pop up?
Besides that, how can i split the string in one line into two line by using asp?
for example if i wan to split the
"science computer"
into
"science"
"computer"
I want to take a server variable and split it. It would look something like this:
varServerVariable = fistname.lastname
I want it to look something like:
first = firstname
last = lastname
I know that I need to use the Split Function, but I'm not sure of the syntax.
I have a textbox that will have this kind of value.
eg. 1+1, 1+2, 1 +2, 1 + 2.....
So now i need to get the 1 and 2 to add it up. This textbox is for add function.
Before this i using the Mid Function. But this is only work if they entered btwn 1 - 9. If 10 then unable to find it.
I remember there is a function where it will find the value then stop at there. then i only grab the bfore the value. I try to lookup but i can't find the function. I need to get the value bfore + and after + to add it up.
What I am doing is:
If Term = Spring2005 then display everything belongs to Spring2005
If Term = Fall2005 then display everything belongs to Fall2005
And so on.
I used Sub function to do that, but it doesn’t split it? How can we do that?
Code:
User enters a string of words and it's stored in txtHAR.
I then do this,
txtArray = split(txtHAR," ")
After this step i'm lost. Because user can enter as many words as they want how am i to track the number of words txtHAR has split into?
this code gives me one short of the ubound function, what is wrong?
e.g if i have 353425432,325423,2542354
it gives me 2 instead of 3
jumvar = request.QueryString("one")
jumvarsplt = split(jumvar,",")
valnum = CInt(ubound(jumvarsplt))
I am trying to loop around a split and the code I have is below:
response.Write("<tr>")
response.Write("<td class=""tableHeader"" valign=""top"">Keywords</td>")
keywordsSplits = Split (keywords, ", ")
For each keywordsSplit in keywordsSplits
response.Write("<td>")
response.Write(keywordsSplit)
response.Write("</td>")
Next
response.Write("</tr>")
The problem is that it does actually put the seperate keywords into seperate cells (td's)
I get the following:
<tr>
<td class="tableHeader" valign="top">Keywords</td>
<td>test test1 test2 test3</td>
</tr>
I actually want
<tr>
<td class="tableHeader" valign="top">Keywords</td>
<td>test</td>
<td>test 1</td>
<td>test 2</td>
<td>test 3</td>
</tr>
Can anyone help?
I'm using the split function to split forename and surname, but sometimes there is no second name, is there any way of doing a check to see if there is a second part in the array?
this is the split:-
WordArray = Split(strUsername, " ")
How do I highlight a split function text?
code ....
Basically I am using XMLHTTP to pull a file ( template ) then I am using replace to replace tags i.e. [code] with a HTML equiv.
So now I need to know how I can split [Menu|http://localhost/root3/cgi-bin/templates/menu.asp?Top] so that I can use XMLHTTP to pull that file and output it as HTML.
I know how to split a string, but I can't call this [Menu|http://localhost/root3/cgi-bin/templates/menu.asp?Top] as a variable as it can change at any time.
p.s I mean how Sitepoint does the url replacement, it will have a replace function that will first search for URL and then convert what ever is after the = into a url, then what ever is after that as the name.
[-URL=http://]test[/-URL] ( I put -'s in to stop the replacement )
I have a multiple select drop down. It will load into it the following information: Student ID, Last Name, First Name
There will be another drop down box that loads with classes, only this is not a multiple select.
I need the user to be able to select all students they need from the first drop down and then select the class they want to insert them into. Then, when they hit the button, it will break up the data from the first, Student ID, Last Name, First Name and insert those three things into the database under those respective column names.
Does anybody know how I can split these up properly when there will be multiple students selected, or does anybody have a better way of doing this?
I am having trouble loading the result of a VBscript split function into an array. The script is supposed to take the user's login name (the form for this is name separated by underscores such as john_foo or lisa_wilson), split it at the underscores, and load first, middle and last name into an array. The problem I keep getting though, is that I am getting a type mismatch error. Here is the code:
<%dim LogName, NameArray(), FirstName, LastName, MiddleName, LastPage
'Get NT authorized login info
LogName = request.servervariables("logon_user")
NameArray = Split(LogName, "_")
for x = 0 to UBound(NameArray)
response.write NameArray(x) & "<br>"
next
%>
The FirstName, MiddleName, LastName vars are supposed to take the array values later.
I am trying to split a mgrgroup field to extract the MD codes. It correctly grabs the MD codes if all records in a mass update are updated, but if only one record in the loop is updated then it puts the last 5 digits of the mgr name in the MD field.
THIS IS THE CODE: ....
I am using the following code to split/join values in a multi-select field. It is combining all the values in All the records into one long string in each record in recordset.
Example: I have a recordset with 2 records. The 1st contains the split/joined values: Alan Smir, Jeff Karl The 2nd contains the value: Keith Robb
When it updates database, it will put Alan Smir, Jeff Karl, Keith Robb into each record in the recordset. Instead it should be putting Alan Smir, Jeff Karl into the 1st record
and Keith Robb into the 2nd record in the recordset.
Does anyone see what is wrong with the code ....
I had created a macro to read data from an excel sheet and write the values to a text file. I had used "ActiveSheet.Range("GB" & k).Value" command to read the values from the excel.some cells in the excel sheet is having two lines value and four lines data, the text file is generating that value in a single line. (Ex. the cell value in address column is in four lines and should display in four lines in the text file generated from the macro)
Can i do something in the excel sheet or in vb script to read the address value line by line and write line by line in text file?
I have a string
212334||327362737||437437||47347837||8347834||
etc
but i want to enter them into a databse
but it must be as 1356235 then field 2 is 125662
dont know if this makes sense
each number is a team in a match so team 1 plays team 2, enters into databse
then move on to the next 2, in that array.
i cant seem to get it to do 2 at a time, without ending up with an endless loop or team 2 being team 1 on the second entry.
I have an encrypted .txt file created by asp. Its formatted with lines etc. Title followed by description underneath. I need to read this into ASP now, and parse it line by line. On each line read, run the function to unencrpt and add line to a new file.
Its the line by line Im having trouble with. If i do the full textstream no formatting takes place coz im adding the fulltextstream all in one addline call. How can I loop through lines ?
One of my fields is the customer's social security number, all originally
entered as a 9-character string. How can I split and display that into 3-2-4
format?
As I can split a string that contains char " "
split(string, " ") it is not correct
What I need to do is get the content of a text file, one line at a time, and break it up using , as a delimiter.
So far I can open the file and print out all the content, but all I am getting is a million ???????'s on the screen, and not the file. Here is what I am using: Code:
How can I calculate the number of the substrings below?
Code:
Dim txt
do until rs.EOF
txt=Split(rs("diastima"), ",")
For i=1 to number_of_substrings
Response.Write txt(i)&"<br>"
next
rs.MoveNext
loop
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?
I need to send a mail for each address I found in one var. The var is as follows:
emails = "onemail@onedomain.com , other@othermail.com , another@another.com "
How Can I make a "do while var not end"?
Plz guide me on the follwoing..
database=storedb
table=product
for e.g i m having 50 records in databse i would like to display the 10 records
on one page and other on second page and so on.. using asp.
I have a section where users can add their 'favourite venues' to a list. This is stored in a column in the users table, for example:
10,8,1,18,26
On the user area I can do a select drop-down with all their favourite venues easy.
When I try to use the same (slightly modified) code on the venue detail page to determine whether the user has the venue in their favourite to link either to ADD venue (not currently a fave) or REMOVE venue (already on the faves list) it only recognises the last added venue, i.e. (working on the list above) venue #26.
Here is the code I'm using: Code:
What I'm trying to do is to split up a value into two images.
For example: Rs("num") displays "12". How do i display the 12 as "1.gif" and "2.gif"?
how can I double split this string and pu the values into an array?
string = 2_3, 4_5, 6_8;6_9, 4_6; 3_1
I need the split after "," and ";"
I am looking for a function to split my string into subsequent parts. I am having a textbox from where user can enter more then one numbers (23, 456, 89, 394 etc), and now I want to write a function which return this sting into this fashion i.e.
23
456
89
394
there is a method to split a string with a delimiter
checkDelete = Request("checkDelete")
arrayDelete = Split(checkDelete, ",")
my string is Trim(arrayDelete(i)), that has the format "number_number".
I want to put the two numbers in two different variables.
i am trying to split an email address into a string.Basically, what i wanna do is take the first part of the email just before the "@" symbol and insert it into the database.
How can I do this using asp?