473,406 Members | 2,345 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,406 software developers and data experts.

Help? Need to combine lists but need instr to query substrings..

I'm having problems finding the syntax/comands that do the this
correctly. I'm must not be doing the join right or something..

List one
AAC1234
CDA2w31
12ZZC12
12TRE1
23234
243
....

List two
1234
A2w
C12
12TRE1

Query needs to get the substrings out. I couldn't get find the return
all the entries of list 2 in list one, but usually they are
substrings. Instr didn't work as it doesn't like static values
('1234' not list.value1)

Result
AAC1234
CDA2w31
12ZZC12
12TRE1

Suggestions?? instr is the only way I know how, but someone may have
a better approach...

Thanks,

kubie
Jul 31 '08 #1
3 1422
Hi Kubie,

Easiest way is to use a query like this:

SELECT Table1.[Value1]
FROM Table1, Table2
WHERE (((Table1.[Value1]) Like "*" & [Table2].[Value2] & "*"));

All this does is look for any values in table one (List 1 in your
example) that have the string contained in table two (List 2 in your
example). This is a simplification as my example assumes one field in
each table but the comparison should be the same.

Dean...
Jul 31 '08 #2
On Jul 31, 4:39*pm, DeanL <deanpmlonghu...@yahoo.comwrote:
HiKubie,

Easiest way is to use a query like this:

SELECT Table1.[Value1]
FROM Table1, Table2
WHERE (((Table1.[Value1]) Like "*" & [Table2].[Value2] & "*"));

All this does is look for any values in table one (List 1 in your
example) that have the string contained in table two (List 2 in your
example). *This is a simplification as my example assumes one field in
each table but the comparison should be the same.

Dean...
Worked flawlessly.... Thank you...
Kubie
Aug 1 '08 #3
On Aug 1, 6:43 am, Kubie <c_ku...@yahoo.comwrote:
On Jul 31, 4:39 pm, DeanL <deanpmlonghu...@yahoo.comwrote:
HiKubie,
Easiest way is to use a query like this:
SELECT Table1.[Value1]
FROM Table1, Table2
WHERE (((Table1.[Value1]) Like "*" & [Table2].[Value2] & "*"));
All this does is look for any values in table one (List 1 in your
example) that have the string contained in table two (List 2 in your
example). This is a simplification as my example assumes one field in
each table but the comparison should be the same.
Dean...

Worked flawlessly.... Thank you...
Kubie
You're very welcome.

All the best, Dean...
Aug 1 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Christian Christmann | last post by:
Hi, in the past I always appreciated your help and hope that you also can help me this time. I've spent many many hours but still can't solve the problem by myself and you are my last hope. ...
2
by: Ryan Ternier | last post by:
I'm currently run into a snag on one of my projects. We need to create an ordered list (Mutli levels). Ie: 1. Some Title ....A....Something here ....B....Something Else 2. Another Title
3
by: Jamie Pittman via AccessMonster.com | last post by:
I am having trouble bellow wit this query. I have the total regular hours and the overtime. The problem is that if it is 8 hours and under, I need it to show as regular hours. Any thoughts? ...
5
by: talktozee | last post by:
Hello, everyone! Here's are the basics: 1. The query looks at all positions that are active and haven't been filled. 2. It then has to look at every single position and determine three...
3
by: Hutch | last post by:
I have a field called "Model" and another field called "Revision" I have seen it done where both fields are combined after the query runs, but for the life of me cant figure it out, i'm pretty sure...
1
by: LSGKelly | last post by:
Hi all. I need to combine two fields that contain numbers that are in a currency format (Ex: $1,500 $3,500). When I combine them, I want them to look like this -- $1,500/$3,500. When I combine...
1
by: lcmts | last post by:
I have a customer database in which a number of companies have modified their company names. When I look at my sales performance query I have to manually total the numbers for these different "name...
9
by: SusanK4305 | last post by:
I know I have asked this once before but no one answered. I have 2 tables Action Type and Reason. I took those 2 and created 1 Query1 a.k.a Action Type vs Reason. Then created a Query so that 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.