I have another newbie question for you guys... I apologize in advance for how simple it is...
I've got a string of data, included in that string is 11* as it appears, the * is not a wildcard. I'm using the function
Like "*" & "11*" & "*" to find any records that have "11*", again, the * is not a wildcard. But it's interpreting it as a wildcard, so I'm getting 1105 and 11X and so on. How can I change the formula so that it will return 11* in the middle of the string?
Thanks in advance for the help.
7 1722
I have another newbie question for you guys... I apologize in advance for how simple it is...
I've got a string of data, included in that string is 11* as it appears, the * is not a wildcard. I'm using the function
Like "*" & "11*" & "*" to find any records that have "11*", again, the * is not a wildcard. But it's interpreting it as a wildcard, so I'm getting 1105 and 11X and so on. How can I change the formula so that it will return 11* in the middle of the string?
Thanks in advance for the help.
Avoid the confusion with treating the * Wildcard as a Literal. This will accomplish exactly what you are requesting, but only specifying an explicit Criteria instead of using the Like Operator: - InStr([Your String],"11*") > 0
Can I put that on the Criteria line of my query? Or do I put it somewhere else?
Select * From TABLENAME Where substr(FIELDNAME,1,3) = '11*'
Substitute TABLENAME and FIELDNAME according to what table and field your looking at.
Select * From TABLENAME Where substr(FIELDNAME,1,3) = '11*'
Substitute TABLENAME and FIELDNAME according to what table and field your looking at.
goodmanstl7, there is no substr Function that I am aware of. Are you referring to the Transact-SQL Function SubString()?
Can I put that on the Criteria line of my query? Or do I put it somewhere else?
Assuming you are looking for the String '11*' anywhere in the [LastName] Field of tblEmployees: - You can place it in the Criteria Row of the Query Grid, in this demo in the [LastName] Field:
- InStr([LastName],"11*")>"0"
- You can place it in an SQL Statement directly and return all Records meeting the Criteria:
- SELECT tblEmployeePFD.LastName, *
-
FROM tblEmployeePFD
-
WHERE ((InStr([LastName],"11*")>"0"));
Just out of curiosity, ADezii, could you have used - InStr([LastName],"11" & Chr(42))>"0"
as well?
Linq ;0)>
Just out of curiosity, ADezii, could you have used - InStr([LastName],"11" & Chr(42))>"0"
as well?
Linq ;0)>
Sorry Linq, don't know how I missed this one but InStr([LastName],"11" & Chr(42))>"0" will work equally as well.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Matt |
last post by:
I have 2 questions:
1. strlen returns an unsigned (size_t) quantity. Why is an unsigned
value more approprate than a signed value? Why is unsighned value less
appropriate?
2. Would there...
|
by: Friday |
last post by:
Being an Old L.A.M.P guy, I beg you to please excuse my ignorance of
dot.net (and all things Windows, for that matter).
As part of an experiment (to learn enough ASP/VB.net to port a series
of ...
|
by: N. Graves |
last post by:
Thanks for taking time to read my questions.
I'm looking for a way in Access that I could run a query that would
return table schema information. Specifically I need to get the
column name,...
|
by: jason.awlt |
last post by:
Greetings,
I recently being bugged by the following error on my DB2.
SQL0902C
SQLSTATE = 58005
Reason Code = 14
This error comes out everytime i tried to insert some record to a table...
|
by: NH |
last post by:
I have a girdview with paging enabled. How can I add a message in the footer
to say "Viewing records 1-15 of 45" etc
Thanks
|
by: Jurgen Haan |
last post by:
Hi hi, I'm trying to perform a redirected restore, but I get a nice
error returned. Does anyone have an idea of what the -5130 errorcode means?
db2inst@ELMO:~> db2 restore db efproddb into...
|
by: Tristán White |
last post by:
Hi
I am very new to PHP - actually, this is my second day at it, as I've only
recently started a new job last week. We're a charity.
I have a "No input file selected" problem. A Google search...
|
by: Randy |
last post by:
Hi,
I have a table which contains a unique value in a column called "Idx",
which is a smallint data type. I need to find the maximum value in
this column, which I have been attempting to do with...
|
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...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
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...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
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)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| | |