Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2008
    Posts
    28

    Unanswered: where is incorrect?

    select EmployeeID from Employees where FirstName like 'a%' order by EmployeeID

    when run..! can't have data show out..
    do you see where is incorrect

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Try with * as the wildcard.
    Paul

  3. #3
    Join Date
    Aug 2008
    Posts
    28
    do you mean:select CustomerID from Customers where CustomerID like 'a*'

    true or false?

    but my book write 'a%'

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Yes; did you try it?
    Paul

  5. #5
    Join Date
    Aug 2008
    Posts
    28
    Thank you very much

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    or if you are using acces 2000 and above consider setting the SQL compatbility moe to true (its one of the settings). this means that you will be able to use the ansi sql wild cards
    or alernatively get a book which refers to Access (and preferably the version of access you are using)
    or use a SQL engive (such as MySQL, SQL Server etc) which matches the book or course you do have

    ...just a thought
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I use % mainly for writing match statements against SQL Server tables (in SQL Server views and procedures) and * when writing matches against MSAccess tables (although I'll also use * against linked SQL Server tables in my MSAccess code.)
    Last edited by pkstormy; 08-12-08 at 09:24.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •