Select Query Problem/question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ravman

    #1

    Select Query Problem/question

    How could I create a "select query" in Access that would find an
    employee whose first and last name begin with the same letter?
    Fields: Fname, Lname
    Table name: employee
    Thank you in advance.
  • John Baker

    #2
    Re: Select Query Problem/question

    Ravman wrote:[color=blue]
    > How could I create a "select query" in Access that would find an
    > employee whose first and last name begin with the same letter?
    > Fields: Fname, Lname
    > Table name: employee[/color]

    SELECT *
    FROM employee
    WHERE left(fname,1)=l eft(lname,1);

    If the first letters of your names aren't always capitalized you'll have
    to correct for that.
    --
    To Email Me, ROT13 My Shown Email Address

    Comment

    • Salad

      #3
      Re: Select Query Problem/question

      Ravman wrote:
      [color=blue]
      > How could I create a "select query" in Access that would find an
      > employee whose first and last name begin with the same letter?
      > Fields: Fname, Lname
      > Table name: employee
      > Thank you in advance.[/color]

      Select * from Employee Where Left(FName,1) = Left(LName,1) Order By
      Lname,fname

      Comment

      Working...