Trim questerion

  • Thread starter Thread starter CMcGrann
  • Start date Start date
C

CMcGrann

This should be so simple!!!

I have a field that I want only the information after the paranthese, but
the paranthese is not always in the same spot and the information after the
paranthese is not the same. For example:

P (1J01
SOC (2B02
OK (3C04

I only want:
1J01
2B02
3C04

Thanks!!!
 
CMcGrann said:
This should be so simple!!!

I have a field that I want only the information after the paranthese, but
the paranthese is not always in the same spot and the information after
the
paranthese is not the same. For example:

P (1J01
SOC (2B02
OK (3C04

I only want:
1J01
2B02
3C04

Thanks!!!


SELECT Mid$([testtext],InStr(1,[testtext],"(")+1) AS Expr1, tblTest.testtext
FROM tblTest
WHERE (((tblTest.testtext) Is Not Null));


In query design view the expression looks like this ...

Expr1: Mid$([testtext],InStr(1,[testtext],"(")+1)
 
Thank you. This works perfect. Now, another wrinkle. I have blank lines
between info. I want to bring down the info from the line above until I get
to new info and then bring that down:
I now show:
1J01
blank
2B02
blank
3C04
blank
I want to show:
1J01
1J01
2B02
2B02
3C04
3C04

Can I fill in the blank lines with what is above it?


Brendan Reynolds said:
CMcGrann said:
This should be so simple!!!

I have a field that I want only the information after the paranthese, but
the paranthese is not always in the same spot and the information after
the
paranthese is not the same. For example:

P (1J01
SOC (2B02
OK (3C04

I only want:
1J01
2B02
3C04

Thanks!!!


SELECT Mid$([testtext],InStr(1,[testtext],"(")+1) AS Expr1, tblTest.testtext
FROM tblTest
WHERE (((tblTest.testtext) Is Not Null));


In query design view the expression looks like this ...

Expr1: Mid$([testtext],InStr(1,[testtext],"(")+1)
 
Back
Top