Eliminate 1st 3 digits in query

  • Thread starter Thread starter cjborntorun
  • Start date Start date
C

cjborntorun

In my query, I have a product code formatted as text, such as
"00013800055000". I want to eliminate the first 3 digits. Any suggestions
on a "MID" type function that will work for this? I've tried a couple
different things, but have not hit upon the correct answer to this. Thanks
for your help.
 
cjborntorun said:
In my query, I have a product code formatted as text, such as
"00013800055000". I want to eliminate the first 3 digits. Any
suggestions on a "MID" type function that will work for this? I've
tried a couple different things, but have not hit upon the correct
answer to this. Thanks for your help.

Select Mid(ProductCode,4) as TruncatedCode
 
In my query, I have a product code formatted as text, such as
"00013800055000". I want to eliminate the first 3 digits. Any suggestions
on a "MID" type function that will work for this? I've tried a couple
different things, but have not hit upon the correct answer to this. Thanks
for your help.

Mid([fieldname], 4)

will work. The third argument to Mid is the number of characters to return -
if it's omitted it will return to the end of the string.
 
Back
Top