Split String Alpha Vs Numeric

I have a text file that I'm reading into a SQL table, from there I need to run various scripts on it to clean it up. One being, there is field that comes in as:

ie:
JNJG12345
MAN5678
XY4656565

I need to split this by Alpha characters, then Numeric characters and be able to input them into seperate fields as such:

JNJG 12345
MAN 5678
XY 4656565

I have managed to locate a script that Memnoch came up with: http://forums.aspfree.com/t24666/s....ht=split+string that managed to get me where I am now.

How do I get the loop to stop once it finds the first occurence of a number? Below is the code I am using.

Code: ....

View Replies


ADVERTISEMENT

Numeric Value And String

I made up a table in database with access consists of columns with text type. Some of them I put in data with numeric value and some of them I put in "Unlimited" as the value.
Then, I allowed people to insert data but only with conditions. They can insert data if the value they are trying to insert is smaller than the one in the database. For "unlimited" value, they can insert any value.
My problem is.... if the limited value in the database is 35, we cant insert data of 40 but we can insert data of 100. It seems that the code only takes the first number to be compared to the value in the database. Code:

View Replies View Related

Web Forms / HTTP File Upload / String.Split A StreamReader.ReadLine() String

I'm developing an Asp.NET system to take a CSV file uploaded via the web, parse it, and insert the values into an SQL database. My sticking point comes when I try to split() the string returned by readline() on the file.

The following code snippet works for me:
tokens = "one,two,three,four".Split(",")
for each token in tokens
response.write("<td>"+token+"</td>")
next

However, if I take the next line in the CSV, read using StreamReader.ReadLine on the PostedFile.InputStream, I receive "Object reference not set to an instance of an object." which I have narrowed down to be my string holding the line. Further investigation reveals that no other string member functions work on my line (.ToCharArray, .ToString, etc).

I suspect that StreamReader.ReadLine is not correctly returning a string, even though Response.Write(line) displays what I would expect .....

View Replies View Related

Split For String

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.

View Replies View Related

Add A String After Split

I have an array which I split and then add the values into a table. In total there are 3 values in the array, two integers and one string. The integers are put smoothly but the string is not. Is it possible to add the string?

Code: ....

View Replies View Related

Split A String

how to do the following. Split a string var at each separate leter and then make an array out of it in asp(vb script). jump the cursor between textboxes automatically.

i.e tpye one letter into input field with a max length of 1 and then automatically tab to the second. The end result being able to type a whole word without looking up but still have the letters separated.

View Replies View Related

Split A String With No Delimiter

I know you can use the split function to split a comma delimited string but i want to split a string of numbers which have nothing delimiting them. Is there any way to do this?

eg split 12345

into 5 array elements of:

1
2
3
4
5

View Replies View Related

Split String Into Pages

I was wondering if it's possible to split a long string, taken from the database, into several pages. Just like the paging function but instead of rows in database you define the amount of rows in the string.. if it exceeds say 5 rows, then it will show a "Next" -button to contine showing the next 5 rows and so on ....

View Replies View Related

Split A String Which Stores A Mac Address

I have a field which stores a maccaddress. It has a constant length of 12 characters.

e.g 000000000012

When reading from the database and displaying that field I want to display it in the following format:

00-00-00-00-00-00-12.

So I want to split the string and add a "-" after every two characters.

Can you please tell me how this can be done?

View Replies View Related

Split String At A Certain Number Of Character

I have an input text area on a form the max field size in the database is 255 i need to split the string at the 250 caracter?

View Replies View Related

Pop Up Message And Split The String Into Two Line

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"

View Replies View Related

Data From A String ... Split Into Separate Strings

I need to get data from a string that is like:

2_1
34_1
126_3

I need the numbers on the left in one string and then the numbers on the right that needs to be in a separate string.

View Replies View Related

Split String To Perform Multiple Insert

I have the belwo code which i mean to do an multiple checkbox insert. I have managed to get it so i puts all the checkbox values into a string seperated by a comma, and it insert into a database, however just not how i need it to.

Curently inserst like :-

View Replies View Related

Alpha Multidimensional Array Sort

I have a multidimensional array with 5 keys. I need to perform a alpha sort on the 3rd key. Does anyone have an example on how to do this?Here is an example of what my array consists of:

mArray(i,0) = '2007-05-02"
mArray(i,1) = "6:00pm"
mArray(i,2) = "TEXT TEXT TEXT" <------------------ NEED TO DO ALPHA
SORT ON THIS KEY ----------------<<
mArray(i,3) = 6
mArray(i,4) = 4

View Replies View Related

Input A Randomly Alpha (letters) In A Specific Field

what i want to do is to put 2 fields in my table , username and password

what iwant to do is to create a page that ask you to unter your username only ,and when u click submit the other page will add new record for the username u enter and will input a randomly alpha(letters and numbers) to yr password field , so how can do this random thing throw the asp"!?!

View Replies View Related

Split Function To Split First Letters

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

View Replies View Related

Split Array But On Every Second Split?

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.

View Replies View Related

Numeric ASP

I need to display in my form fields the last record in my access database, which is a numerical value, then add 1 to that value. The code i have so far is: Code:

View Replies View Related

SQL Numeric

I'm trying to write an SQL statement that will pull out only numbers from a field. Within that field will be records that contain text, but i just want the records that have numbers in that field. Can I say something like:

SELECT *
FROM Table
WHERE Variable = Numeric

Is something like that possible?

View Replies View Related

Numeric Variables

After moving my website from one server to another (Windows 2000, IIS 5,
same as old server), I am forced to use the cInt function to convert all
variables that compare against a numeric value.

For example, on the old server I could code something like this:
If sRecCount > 0 then . . .

The new server requires me to use:
If cInt(RecCount) > 0 then . . .

If I don't use the cInt function, I get a Type Mismatch error. I can't see
anything that is different from one server to another.

Any ideas?

View Replies View Related

How To Check Given Value Is Numeric Or Not

How can I check that entered value in a text box is numeric or not in next page?

View Replies View Related

Numeric Characters

I have a variable I'm pulling from a database that's a phone number in XXX-XXX-XXXX format. What I'm looking for is a way to strip out all non-numeric characters from the variable (XXXXXXXXXX). I don't want it to look only for "-", since sometimes, there are also alpha characters entered as well.

View Replies View Related

Numeric Entry

how to control numeric entry into a textbox? so that no other character is allowed only numbers and decimal?

View Replies View Related

Numeric Validations

I need some help on validating the number entered by the user in the ASP form .
The number should be accepted in the format : 1,234.5648 and should be rejected in the format : 1, 234.456.46 or 1, 234.456 i.e. the format with more then one blank space or more then one decimal point etc.

i am trying with /^[0-9]*.[0-9]+$/; format. I checking all space and decimal point but also not taking data like 1.234

View Replies View Related

How To Check A Numeric

if i have a text as follow :

my phone number is 0123456789

i need to check the text and not allow to have more than 7 digit number occur in the text and then change the 0123456789 to xxxxxxxxx.Finally the text will become :

my phone number is xxxxxxxxxx

View Replies View Related

Numeric Fields

I have a few ASP pages for my companies web site that allows members to enter reports. A big problem I am running into is for dollar amount/numeric data. The entry line consists of 7 input boxes.

3 of those boxes are used for dollar amounts, but I am having a problem when the member types anything other than what is expected; instead of 32.56 they may type in 32..56 this is just one of the types of keying errors. When the page is submitted and the validation/update script runs I will get "Type mismatch: 'ccur' " errors and the script will stop. is there a way to validate the numeric data so I can avoid these problems?

View Replies View Related

Decimal Numeric Values

Normally to declare a value as numeric I use Clng() HOWEVER I now have some Numeric values with decimal places, which I need to tell the page when they are picked up from the form that they are in fact numeric, but retaining the decimal places too, which would I use... as all the ones I have used previously Cint, Clng, Fix, etc. do not retain the decimal places.

View Replies View Related

INSERT Numeric Variable

I just can't seem to figure out this problem Here's the code:

minv = request.form("min")
maxv = request.form("max")
price = request.form("price")

Response.write(minv &" "& maxv &" "& price)

sSQK = "INSERT INTO tbl_weight (min, max, price) Values (" & minv &","& maxv &",'"& price &"')"
conn.Execute(sSQK)
Response.write("Gegevens toegevoegd!")

But it just keeps givving me an error

"Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement. "

I think it has to do something with the "minv" and "maxv" those two are numbers and if I remove them the INSERT command goes fine... but what am I doing wrong ?

View Replies View Related

Issue With Numeric Variables

I recently moved our website to a new server (Windows 2000 / IIS 5 - same as
the previous server), and now I get type mismatch errors whenever a variable
is compared against a numeric value, unless I use the cInt function to
convert it to an explicit integer type.

For example, the following code:

dim sRecordCount
[open a database and assign the record count to the above variable...]
if sRecordCount > 0 then ...

On the new server I am forced to use: if cInt(sRecordCount) > 0 then ...

I can't figure out what has changed, if anything. Same OS version, same IIS
version.

Any ideas?

View Replies View Related

Convert Byte To Numeric Value

I need access to the bits of a Byte expression and the logical functions operatge bit-wise on numeric vales - per the VBScript CHM.

So how do I convert a Byte to its numeric value?

View Replies View Related

Comparing Numeric Values

i have numeric value in my database with two decimal. now i have search page where user can type numeric value. so i want to compare user entered value with my db value. the result will give less than or equal value to user entered value. i had tried following

est = request.form("est")

sql = "select * from mytable where est_cost <= '%"&est&"%'"

but is not working. i think there is some syntax error in comparing numeric value.

View Replies View Related

Converting A Byte Value To Its Numeric Value

How do I do that? This is for some bit-diddling, but the logical functions like AND require numeric expressions, per the book.

View Replies View Related

Numeric Output Instead Of Letters

How do I change this output to give me numbers instead of letters: Code:

Dim intCounter, intDecimal, strTicket

For intCounter = 1 To 6
Randomize
intDecimal = Int((26 * Rnd) + 1) + 64

strTicket = strTicket & Chr(intDecimal)...

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved