I want to get all the char before a "-". Please help.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have numbers like this:
3808-M-RF04
3809A-M-TG06

How to I pick up everything before the first "-"?
 
That worked great. Thanks for your help. How would I convert :

3809A-M-RF01-FRT or read 3809A-M-RF01 ? Sometimes there are 4 bits in the
first block and sometimes 5.

Ofer Cohen said:
Try

NewFieldName: Left(FieldName],Instr([FieldName],"-")-1)


--
Good Luck
BS"D


Jon said:
I have numbers like this:
3808-M-RF04
3809A-M-TG06

How to I pick up everything before the first "-"?
 
I'm not sure what you are asking for, what do you want to convert?

--
Good Luck
BS"D


Jon said:
That worked great. Thanks for your help. How would I convert :

3809A-M-RF01-FRT or read 3809A-M-RF01 ? Sometimes there are 4 bits in the
first block and sometimes 5.

Ofer Cohen said:
Try

NewFieldName: Left(FieldName],Instr([FieldName],"-")-1)


--
Good Luck
BS"D


Jon said:
I have numbers like this:
3808-M-RF04
3809A-M-TG06

How to I pick up everything before the first "-"?
 
I would like for a number such as 3809A-M-RF01-FRT to read 3809A-M-RF01. I
know I could do this: NewName:left([field],12) but sometimes the number will
read 3821-M-RF01-FRT. Therefore I can't count on 12 to be right, sometimes
it is 13.

Ofer Cohen said:
I'm not sure what you are asking for, what do you want to convert?

--
Good Luck
BS"D


Jon said:
That worked great. Thanks for your help. How would I convert :

3809A-M-RF01-FRT or read 3809A-M-RF01 ? Sometimes there are 4 bits in the
first block and sometimes 5.

Ofer Cohen said:
Try

NewFieldName: Left(FieldName],Instr([FieldName],"-")-1)


--
Good Luck
BS"D


:

I have numbers like this:
3808-M-RF04
3809A-M-TG06

How to I pick up everything before the first "-"?
 
If you want to remove the right part, try using InstrRev

Left([FieldName],InstrRev([FieldName],"-")-1)

--
Good Luck
BS"D


Jon said:
I would like for a number such as 3809A-M-RF01-FRT to read 3809A-M-RF01. I
know I could do this: NewName:left([field],12) but sometimes the number will
read 3821-M-RF01-FRT. Therefore I can't count on 12 to be right, sometimes
it is 13.

Ofer Cohen said:
I'm not sure what you are asking for, what do you want to convert?

--
Good Luck
BS"D


Jon said:
That worked great. Thanks for your help. How would I convert :

3809A-M-RF01-FRT or read 3809A-M-RF01 ? Sometimes there are 4 bits in the
first block and sometimes 5.

:

Try

NewFieldName: Left(FieldName],Instr([FieldName],"-")-1)


--
Good Luck
BS"D


:

I have numbers like this:
3808-M-RF04
3809A-M-TG06

How to I pick up everything before the first "-"?
 
Back
Top