473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Creating query which uses first letter of last name as a range

2
Hi everyone,

Apologies in advance as I'm somewhat of a novice with Access. I use an Access project (2002 SP3) via XP and am trying to create a query which will show me a range of last names beginning wiht the first letter. The results I want to see are where last name = A through K, for example, so that it only returns records with last names begininning with these letters. Any ideas as to how the criteria should be written? Thanks!
Dec 2 '06 #1
5 15367
NeoPa
32,556 Expert Mod 16PB
Expand|Select|Wrap|Line Numbers
  1. SELECT Blah Blah Blah
  2. FROM Table
  3. WHERE (Left([LastName],2) Between 'A' And 'KZ')
Dec 3 '06 #2
kukady
2
Thanks a lot. Worked like a charm!
Dec 3 '06 #3
NeoPa
32,556 Expert Mod 16PB
You're welcome - pleased to have helped :).
Dec 3 '06 #4
ADezii
8,834 Expert 8TB
Hi everyone,

Apologies in advance as I'm somewhat of a novice with Access. I use an Access project (2002 SP3) via XP and am trying to create a query which will show me a range of last names beginning wiht the first letter. The results I want to see are where last name = A through K, for example, so that it only returns records with last names begininning with these letters. Any ideas as to how the criteria should be written? Thanks!
'If you are doing this from the Query Grid then in the Criteria Row of the Query
'Grid for the desired Field, type Like "[A-K]*" as the criteria
Dec 3 '06 #5
NeoPa
32,556 Expert Mod 16PB
'If you are doing this from the Query Grid then in the Criteria Row of the Query
'Grid for the desired Field, type Like "[A-K]*" as the criteria
This is a MUCH better answer (Thank you ADezii).
Expand|Select|Wrap|Line Numbers
  1. SELECT Blah Blah Blah
  2. FROM Table
  3. WHERE ([LastName] Like '[A-K]*')
Dec 3 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Got2Go | last post by:
Hello Group, I have a table that has 3 columns: ID (int), datetime, Value(varchar) ID = ID for the SNMP device datetime = time record was added value = value added for that device. This...
9
by: Paul | last post by:
Hi all Arggghhh........... The problem.....I want the user to be able to create an excel document and name particular cells in the document where they want the data to be placed and then save...
3
by: Pakku | last post by:
This is on DB2 V7 on OS/390 I have 2 tables PATIENT and SPECIMEN. PATIENT columns are IDENTIFICATION LAST NAME FIRST NAME SPECIMEN columns are SPECIMEN_NUMBER (this is a manufactured...
4
by: Minitman | last post by:
I have an address database and I want to have the query prompt for me to enter an expression that will bring up ALL names begining with same first ltr for individual page on my report. I am...
5
by: Rupert Street | last post by:
Hi I am new at setting up a database and requesting info from groups so please excuse any mistakes that I inadvertently make. I have set up a table with client info including a ClientID. The...
2
by: deja | last post by:
Hello, I am creating an a to z list - basically a count of all results that start with the letter "A", "B", "C" .... and so on. I am pretty poor at SQL so I am sure some brains out there can...
10
by: Jaye | last post by:
Hi. I am a relative newbie to ASP and I am working on an application that uses ASP and an Oracle 9i database. I have a form that allows the user to query the database by selecting a client name(s)...
5
by: ladybug via AccessMonster.com | last post by:
I am trying to create a report using multiple tables. The first table has Employee info in it (name and id's). the next three tables have employee info for training, test, scores, etc. I am...
2
by: wevans | last post by:
I have 3 tables, Customer, Offsite Service and service. I need to create a sales report/query based on the results of the user input, which is a date range. I've got it working great with two of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.