|
-
Jun 26th, 2010, 08:41 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Simplify this SQL Statement?
In the Access Query Designer I am limited to 255 characters in the 'Criteria' field.
Is there any way to accomplish this with less characters?
Like "*" & "06-" & "*" And Not Like "*" & "106-" & "*" Or Like "*" & "07-" & "*" And Not Like "*" & "107-" & "*" Or Like "*" & "08-" & "*" And Not Like "*" & "108-" & "*" Or Like "*" & "09-" & "*" And Not Like "*" & "109-" & "*" Or Like "*" & "10-" & "*" And Not Like "*" & "110-" & "*" Or Like "*" & "11-" & "*" And Not Like "*" & "111-" & "*" Or Like "*" & "12-" & "*" And Not Like "*" & "112-" & "*" Or Like "*" & "13-" & "*" And Not Like "*" & "113-" & "*"
I have values in my table which are like "06-01", "06-02",...."106-01", "106-02", etc.
I'm trying to get only the values that equal "06" and not "106". Withouth the above criteria, the query returns both "06" and "106", for example, when only "06" is wanted.
The SQL criteria above works great, but since I'm limited to 255 characters, I cannot get "06-" through "20"... had to stop at "13", save the query, print the report, then change the criteria for pages 14-20.
Not ideal at all.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|