473,320 Members | 1,804 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,320 software developers and data experts.

Wildcard in searches beginning and ending terms

Ok, so I have got my search form working now (thanks to various people for helping with previous issues!), and I have wildcards for all but the date entries (not sure if it's possible for that?). However, the wildcards are only for the END of an entry, so for example 'ab*' will find 'abc123' (and 'abd234', etc) but I was wonderign if it's possible to do the same with the sart, so '*c123' would find 'abc123' and acc123' etc?

Cheers :)
Jul 4 '13 #1
2 1180
zmbd
5,501 Expert Mod 4TB
Access wildcard character reference (v2003)
Will answer most of your questions.

The date becomes tricky...
Say I have a table with shipping dates, and I want to return every instance where there was a shipment on the 10th day of the month for evey record then the sql would be:
Expand|Select|Wrap|Line Numbers
  1. SELECT tbl_shipdate.ShippedDate
  2. FROM tbl_shipdate
  3. WHERE (((tbl_shipdate.ShippedDate) Like "*/10/*"));
  4.  
However say I want between dates

Expand|Select|Wrap|Line Numbers
  1. SELECT tbl_shipdate.ShippedDate
  2. FROM tbl_shipdate
  3. WHERE (((tbl_shipdate.ShippedDate) 
  4.    Between #1/1/2010# 
  5.       And #1/15/2010#));
What about every date past a given date:

Expand|Select|Wrap|Line Numbers
  1. SELECT tbl_shipdate.ShippedDate
  2. FROM tbl_shipdate
  3. WHERE (((tbl_shipdate.ShippedDate)>=#1/1/2010#));
  4.  
To make my life easier from a coding standpoint, I try to keep to the "#" type constructs and bracket the time frame using either the between or ">=" or "=<" types. However, that doesn't always work.

If you have a specfic filter issue post back and we can straighten that out.
Jul 4 '13 #2
Seth Schrock
2,965 Expert 2GB
I didn't know that wildcards could be used in dates like your first example. I normally use
Expand|Select|Wrap|Line Numbers
  1. WHERE Day(tbl_shipdate.ShippedDate) = 10
Is there a benefit of one over the other?
Jul 5 '13 #3

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

Similar topics

5
by: Robert Brown | last post by:
I have researched newsgroups and the web very thoroughly and unsuccessfully for a solution to what I believe is a very common problem. I know it's easy to do wildcard match against data in DB...
39
by: Noticedtrends | last post by:
Can inference search-engines narrow-down the number of often irrelevant results, by using specific keywords; for the purpose of discerning emerging social & business trends? For example, if...
1
by: deko | last post by:
I have a form where users can enter a string with asterisks to perform a wildcard search. Currently, the string entered by the user looks like this: *somestring* The purpose is to match any...
2
by: MB | last post by:
Hi, I am using a datagrid and the datagrid is filled through the SQL query. The SQL query searches for the match in the database. The SQL Query that i am writing is as follows Dim selprod As...
2
by: JohnT | last post by:
Okay... I'm using VB.net (2003) and I am accessing an MS Access DB file. I have two DataAdapters that I use to search for specific info. The two of them are similar except one is a Date, the...
3
by: george.lengel | last post by:
Hello experts, I have been struggling for days to solve this problem and every suggestion I find via Google does not work for me. There is probably a solution out there that will do what I want,...
14
by: Jeff S. | last post by:
In a Windows Forms application I plan to have a collection of structs - each of which contains a bunch of properties describing a person (e.g., LastName, FirstName, EmployeeID, HomeAddress,...
4
by: madeleine.macphail | last post by:
I'm currently tearing my hair out on this one. I'm trying to run through a bunch of worksheets in a bunch of workbooks and only run an import on the ones that match the type of name I'm looking...
34
by: Umesh | last post by:
I want to extract a string abc*xyz from a text file. * indicates arbitrary no. of characters. I'm only able to do it when the string has definite no. of characters or the string length is...
0
by: savage678 | last post by:
Hi Everyone, I am new to this forum and am i dire need of some help. I am trying to use wildcard searches in infopath. I have it connected to an access database using data connection. I have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.