Re: SUBSTR in query
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Mon, 01 Oct 2007 18:18:27 -0500
Dan @BCBS <DanBCBS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Did not think this would be so difficult.
I just want to add a SUBSTR to capture the first 5 digits of a field.
AM I close???
SELECT
SUBSTR (MBR_GROUPNO, 1,5)
From tblMember
Or this one???
SELECT tblMember.MBR_GROUPNO
FROM tblMember
WHERE (((tblMember.MBR_GROUPNO)="need a substr"));
Access/Jet do not have a SubStr function.
Try using:
SELECT Mid(MBR_GROUPNO, 1, 5)
From tblMember
Or
SELECT MBR_GROUPNO
FROM tblMember
WHERE MBR_GROUPNO Like "abcde*"
--
Marsh
MVP [MS Access]
.
- Prev by Date: Re: Filtering Queries
- Next by Date: Re: What is Subscript out of range in MSACCESS?
- Previous by thread: Re: SUBSTR in query
- Next by thread: Re: Assign the result of this simple query to a variable
- Index(es):
Relevant Pages
|