473,569 Members | 3,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stripping 0's from numbers and letters from alphanumeric data

1 New Member
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 1767
pbmods
5,821 Recognized Expert Expert
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
kaioshin00
46 New Member
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
4910
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
6009
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 use. http://www.interactivetools.com/products/htmlarea/ This only works with IE5.5+. What I need to do is to take this html formatted text and only...
96
6267
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 I would love to see in Python. Examples: 1_234_567 0xdead_beef 3.141_592
7
4859
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 newline from this string. I am new to C so am sure this is simple ut I don't know how to do it! Sorry!
3
2216
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 appreciate any help!!! Thank you
3
2570
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 there a way to do this?
3
12095
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
2280
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, and periods. This is what I would write in Perl (bless me father, for I have sinned...): $filename =~ tr/\w.-//cd, or equivalently $filename =~...
7
1377
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 "Cat" part. So I would have a variable "Cat-01-01-01.txt" that I can use to build up another string. Trouble is, I'm lost. Can't figure out...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7619
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7930
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.