Full Version: Stripping out data
tair23
I used to know how to do this and I am pretty sure I use the mid function but:
10.0% 1D
I have the above in a field. I need everything to teh left of the % and I nee to trim off the O and 1 space so I am only left with the #'s. What is the syntax of my mid statement?
Tom
freakazeud
Hi,
Mid([YourField],Start Position, How many positions)
o it would be something like:
Mid([YourField],3,4)
Is that what you want?
HTH
Good luck
tair23
I know how to do that it may have been a ltrim or rtrim function. I want to get everything from the left of the %.
freakazeud
Check this for all functions listed and explained!
HTH
Good luck
tair23
That site is not helpful at all. As I stated I do not remember if it was the mid function but I think it is. But how ouwl d you or anyone look at data in a field such as:
10.0% 1D
And make the field end up with 10 in it after an update query?
freakazeud
Why is that site not helpfull. It explains all string manipulation functions and you just have to go through it and pick the one you think will work.
There are many options, but you are not being clear on what you want. First you said you wanted to use the mid functio
The mid function example I provided would result in only the numbers being left "10.0"!
Then you are saying you want You could use the mid function or the left function or a combination of instr and left function or...!
Now you are saying you just want:
So again something else and again you could just easily use the mid function!
HTH
Good luck
tair23
I don't understand what is not clear?
need the syntax on how to use the mid function when looking for the % symbol in a field.
Ocannot simply say mid([test],3,4) because the % symbol is not always going to be at the 3rd position in the field so the field may have the following:
123%456
12%3456
12345%6
Thus each time i need what is to the let of the %. So how do I tell the mid function to look for the % symbol instead of saying start inposition 3
truittb
Mid(Test,1,InStr(Test,"%")-1)
tair23
Thank you sooooo much!
freakazeud
Now that is a clear description of what you need. You have never mentioned any of this before. As mentioned use the mid and instr function together. Truit also gave you a sample!
HTH
Good luck
truittb
You are welcome.