Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $95

How do i use left function in Microsoft Access?

Discussion in 'Information Technology' started by Jason, Jul 28, 2006.

  1. Jason

    Jason
    Expand Collapse
    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
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News How The Left & Indian Nationalists Distorted The History Of Sikh Gadhar Movement - Breaking News Sep 21, 2016
    SciTech Voyager 1 has left the solar system — almost Breaking News Mar 23, 2013
    General Right to Left all shades participated in March for Punjabi language Hard Talk Feb 25, 2013
    Heritage Priceless Belongings of Guru Gobind Singh Left to Decay in Neglected Forts History of Sikhism Feb 17, 2013
    Opinion Poll Pact: Left Wants 30 Seats From Ppp Punjab, Punjabi, Punjabiyat Aug 31, 2011

  3. schasteen

    schasteen
    Expand Collapse
    Guest

    in a queary you would do:
    Left([YourFieldName],2)


    "Jason" wrote:

    > 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
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Mon, 15 May 2006 12:54:02 -0700, Jason
    <Jason@discussions.microsoft.com> wrote:

    >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]
     
  5. Jason

    Jason
    Expand Collapse
    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" wrote:

    > On Mon, 15 May 2006 12:54:02 -0700, Jason
    > <Jason@discussions.microsoft.com> wrote:
    >
    > >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]
    >
     
  6. schasteen

    schasteen
    Expand Collapse
    Guest

    Put the expression in an empty field box

    "Jason" wrote:

    > 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" wrote:
    >
    > > On Mon, 15 May 2006 12:54:02 -0700, Jason
    > > <Jason@discussions.microsoft.com> wrote:
    > >
    > > >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]
    > >
     
  7. Jason

    Jason
    Expand Collapse
    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" wrote:

    > Put the expression in an empty field box
    >
    > "Jason" wrote:
    >
    > > 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" wrote:
    > >
    > > > On Mon, 15 May 2006 12:54:02 -0700, Jason
    > > > <Jason@discussions.microsoft.com> wrote:
    > > >
    > > > >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]
    > > >
     
  8. schasteen

    schasteen
    Expand Collapse
    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" wrote:

    > 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" wrote:
    >
    > > Put the expression in an empty field box
    > >
    > > "Jason" wrote:
    > >
    > > > 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" wrote:
    > > >
    > > > > On Mon, 15 May 2006 12:54:02 -0700, Jason
    > > > > <Jason@discussions.microsoft.com> wrote:
    > > > >
    > > > > >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]
    > > > >
     
  9. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Tue, 16 May 2006 07:50:02 -0700, Jason
    <Jason@discussions.microsoft.com> wrote:

    >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]
     
  10. Jason

    Jason
    Expand Collapse
    Guest

    Thanks, i figured out how to use it.

    "schasteen" wrote:

    > 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" wrote:
    >
    > > 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" wrote:
    > >
    > > > Put the expression in an empty field box
    > > >
    > > > "Jason" wrote:
    > > >
    > > > > 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" wrote:
    > > > >
    > > > > > On Mon, 15 May 2006 12:54:02 -0700, Jason
    > > > > > <Jason@discussions.microsoft.com> wrote:
    > > > > >
    > > > > > >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]
    > > > > >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page