How do i use left function in Microsoft Access?

G

Guest

I can't get the left function to work in Microsoft access. I need to separate
out numbers on a chain taking several quiries into three separate instances
to break it up. Can i do this in a table format from the orinal data or a
query, i cant get it to work even though i tried several ways that i found
such as : Left(string,2) or Left([string],2)

Thanks
Jason
 
J

John Vinson

I can't get the left function to work in Microsoft access. I need to separate
out numbers on a chain taking several quiries into three separate instances
to break it up. Can i do this in a table format from the orinal data or a
query, i cant get it to work even though i tried several ways that i found
such as : Left(string,2) or Left([string],2)

Thanks
Jason

Could you give a bit more information? What fieldname in the table are
you trying to substring? What do you mean by "numbers on a chain"?
Could you post an example of the data currently in the table, and the
desired result?

John W. Vinson[MVP]
 
G

Guest

i put the fuction in the criteria box as. Left([Serial Number], 2) and it
won't work, i've tried serval varients of it too.

Jason


John Vinson said:
I can't get the left function to work in Microsoft access. I need to separate
out numbers on a chain taking several quiries into three separate instances
to break it up. Can i do this in a table format from the orinal data or a
query, i cant get it to work even though i tried several ways that i found
such as : Left(string,2) or Left([string],2)

Thanks
Jason

Could you give a bit more information? What fieldname in the table are
you trying to substring? What do you mean by "numbers on a chain"?
Could you post an example of the data currently in the table, and the
desired result?

John W. Vinson[MVP]
 
G

Guest

Put the expression in an empty field box

Jason said:
i put the fuction in the criteria box as. Left([Serial Number], 2) and it
won't work, i've tried serval varients of it too.

Jason


John Vinson said:
I can't get the left function to work in Microsoft access. I need to separate
out numbers on a chain taking several quiries into three separate instances
to break it up. Can i do this in a table format from the orinal data or a
query, i cant get it to work even though i tried several ways that i found
such as : Left(string,2) or Left([string],2)

Thanks
Jason

Could you give a bit more information? What fieldname in the table are
you trying to substring? What do you mean by "numbers on a chain"?
Could you post an example of the data currently in the table, and the
desired result?

John W. Vinson[MVP]
 
G

Guest

If put in a query field name, it says there is a syntax error due to the
comma being there, and won't do anything at all if the comma is removed.

Jason

schasteen said:
Put the expression in an empty field box

Jason said:
i put the fuction in the criteria box as. Left([Serial Number], 2) and it
won't work, i've tried serval varients of it too.

Jason


John Vinson said:
On Mon, 15 May 2006 12:54:02 -0700, Jason

I can't get the left function to work in Microsoft access. I need to separate
out numbers on a chain taking several quiries into three separate instances
to break it up. Can i do this in a table format from the orinal data or a
query, i cant get it to work even though i tried several ways that i found
such as : Left(string,2) or Left([string],2)

Thanks
Jason

Could you give a bit more information? What fieldname in the table are
you trying to substring? What do you mean by "numbers on a chain"?
Could you post an example of the data currently in the table, and the
desired result?

John W. Vinson[MVP]
 
G

Guest

Please post the sql string that you are getting the error from. You can get
the SQL by going to the view menu and selecting SQL view. It is hard for me
to know much else since I can not see your screen so I am left to guess
without any more information.

Jason said:
If put in a query field name, it says there is a syntax error due to the
comma being there, and won't do anything at all if the comma is removed.

Jason

schasteen said:
Put the expression in an empty field box

Jason said:
i put the fuction in the criteria box as. Left([Serial Number], 2) and it
won't work, i've tried serval varients of it too.

Jason


:

On Mon, 15 May 2006 12:54:02 -0700, Jason

I can't get the left function to work in Microsoft access. I need to separate
out numbers on a chain taking several quiries into three separate instances
to break it up. Can i do this in a table format from the orinal data or a
query, i cant get it to work even though i tried several ways that i found
such as : Left(string,2) or Left([string],2)

Thanks
Jason

Could you give a bit more information? What fieldname in the table are
you trying to substring? What do you mean by "numbers on a chain"?
Could you post an example of the data currently in the table, and the
desired result?

John W. Vinson[MVP]
 
J

John Vinson

If put in a query field name, it says there is a syntax error due to the
comma being there, and won't do anything at all if the comma is removed.

What you should have there is:

NewFieldName: Left([fieldname], 2)

Some distinct field name (different from any existing field names) to
the left of the colon;

the word Left followed by a left parenthesis;

the name of the field that you want to extract in square brackets;

a comma;

the number of characters to extract;

A right parenthesis.


John W. Vinson[MVP]
 
G

Guest

Thanks, i figured out how to use it.

schasteen said:
Please post the sql string that you are getting the error from. You can get
the SQL by going to the view menu and selecting SQL view. It is hard for me
to know much else since I can not see your screen so I am left to guess
without any more information.

Jason said:
If put in a query field name, it says there is a syntax error due to the
comma being there, and won't do anything at all if the comma is removed.

Jason

schasteen said:
Put the expression in an empty field box

:

i put the fuction in the criteria box as. Left([Serial Number], 2) and it
won't work, i've tried serval varients of it too.

Jason


:

On Mon, 15 May 2006 12:54:02 -0700, Jason

I can't get the left function to work in Microsoft access. I need to separate
out numbers on a chain taking several quiries into three separate instances
to break it up. Can i do this in a table format from the orinal data or a
query, i cant get it to work even though i tried several ways that i found
such as : Left(string,2) or Left([string],2)

Thanks
Jason

Could you give a bit more information? What fieldname in the table are
you trying to substring? What do you mean by "numbers on a chain"?
Could you post an example of the data currently in the table, and the
desired result?

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top