January 19, 2007 at 11:05 am
Hi Everyone,
I have some data that I need to strip some data from. It is a series of numbers and letters that I need only the first 4 and last 4 Alphnumeric characters from.
Is there a query I can use to strip the first 4 and last 4 characters from the data and place it in another field?
Thanks in advance for your help...
David
January 19, 2007 at 1:24 pm
this might get you started; LEFT,RIGHT and SUBSTRING functions can be used to get parts of strings.
note how im checking to make sure that the field is at least 8 characters...that may or may not be correct in your situation.
SELECT LEFT(SOMEFIELD,4) + RIGHT(SOMEFIELD,4) FROM SOMETABLE WHERE SOMEFIELD IS NOT NULL AND LEN(SOMEFIELD) >=8
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply