473,326 Members | 2,680 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,326 software developers and data experts.

Stripping 0's from numbers and letters from alphanumeric data

Hello forum.

I need to learn how write a SQL script to strip 0s from data and strip alpha letters from alpha numeric data.


e.g.

I get data like 054, 006, 903, for a dept number. I need to strip the leading zeros from right. and keep the rest of the numbers. Whats the best way to script this striping?

Also,

IF you get alpha/numeric numbers like 5FD78, 000FG98, 00098FG dont want the alpha numbers or leading zeros

Appreciate any help.

Thanks
Oct 6 '07 #1
2 1760
pbmods
5,821 Expert 4TB
Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).
Oct 6 '07 #2
I dont know if this is possible in SQL ... but, one way could be to use a scripting language like perl to handle the database queries and then parse the results however you want with it's regular expression handler.
Oct 8 '07 #3

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

Similar topics

6
by: Ralph Freshour | last post by:
I'm taking text from a textarea object and want to strip out characters other than A-Za-z0-9 before I send the data to MySQL table - is there a function I can use to do this in PHP? Thanks...
15
by: Jeff North | last post by:
Hi, I'm using a control called HTMLArea which allows a person to enter text and converts the format instructions to html tags. Most of my users know nothing about html so this is perfect for my...
96
by: Gustav Hållberg | last post by:
I tried finding a discussion around adding the possibility to have optional underscores inside numbers in Python. This is a popular option available in several "competing" scripting langauges, that...
7
by: Raj | last post by:
Hi I was hoping someone could suggest a simple way of stripping non-numeric data from a string of numbers. For example, if I have "ADB12458789\n" I would like to remove the letters and the...
3
by: aahmad76 | last post by:
Can anyone please help me. I am trying to desing a program that will create a 10 digit alphanumeric password. I am new to the Vb.net environment, and sometimes have no idea what to do. I...
3
by: et | last post by:
How can I strip out unwanted characters in a string before updating the database? For instance, in names & addresses in our client table, we want only letters and numbers, no punctuation. Is...
3
by: rodchar | last post by:
hey all, given a string, if i only wanted to get only letters and number (no symbols) is there a function to do this? i.e. "Los Angeles, CA" i don't want the comma. thanks, rodchar
7
by: Edward Elliott | last post by:
I'm looking for the "best" way to strip a large set of chars from a filename string (my definition of best usually means succinct and readable). I only want to allow alphanumeric chars, dashes,...
7
by: Benway | last post by:
Hey all, I have a file name like Eng-Cat-01-01-01.txt. I need to do a loop that starts stripping the letters from the front of this file name (which I'll store as a variable) until it reaches the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
1
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.