Query Builder (SQL View) - Like Command

I am trying to join 2 tables.  I want to join if 'Field B' is in 'Field A'.

ie.
Field A = 'ABCDE'
Field B= 'BC'
....the join would be successful cause 'BC' is in 'ABCDE'.  Is this possible?


I tried...
SELECT FROM table1 INNER JOIN table2 ON table1.name like (% table2.
partial_name %);

Keep getting errors.

Any help greatly appreciated!
Warren

0
warrenk
5/9/2007 7:59:08 PM
access.queries 6343 articles. 1 followers. Follow

1 Replies
647 Views

Similar Articles

[PageSpeed] 26

Depending on the "flavor" of SQL you are using

SELECT *
FROM table1 INNER JOIN table2
ON table1.name like '%' & table2.partial_name & '%'

Or

SELECT *
FROM table1 INNER JOIN table2
ON table1.name like "*" & table2.partial_name & "*"

-- 
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"warrenk" <u34060@uwe> wrote in message news:71eeeb3e6987e@uwe...
>I am trying to join 2 tables.  I want to join if 'Field B' is in 'Field A'.
>
> ie.
> Field A = 'ABCDE'
> Field B= 'BC'
> ...the join would be successful cause 'BC' is in 'ABCDE'.  Is this 
> possible?
>
>
> I tried...
> SELECT FROM table1 INNER JOIN table2 ON table1.name like (% table2.
> partial_name %);
>
> Keep getting errors.
>
> Any help greatly appreciated!
> Warren
> 


0
John
5/10/2007 11:05:39 AM
Reply:

Similar Artilces:

Query Problems
I have a table of ecards that is populated from a website and includes receiver, sender, and Team leader. The problem I am having is names can be entered into the table like this "Tom Thumb", but Team leader is a dropdown menu that is constant and lists name like this: "Tom S. Thumb". When I make a query to find all the members of Tom S. Thumb's team, I get everyone except Tom Thumb, who is member too. Tom Thumb has his own higher team leader, so I can't change that. How do I get Tom Thumb to be included when I enter "Tom S. Thumb" as Team Leader? ...

Excel web query returns no data
When I enter a web addreess into IE it shows the page When I set up a web query in Excel it allows me to select the relevant tables, but then returns no data The same Excel query worked on previuous versions of Excel Web address for query http://www.bmreports.com/servlet/com.logica.neta.bwp_PanBM DataServlet?param1=T_CNQPS- 4&param2=&param3=&param4=&param5=2001-04-01&param6=* Any help appreciated ...

Can see form in design view but not in open or layout view
I have set up the tables, relationships and forms. When I first created the form I was able to view when clicking open. I made a couple of changes and now when I click on open a box pops up to enter perimeter value. Also, I can no longer see the form in opne or layout but if I click for design view, I can see my form and all the tabs. There is either something missing or somthing is named incorrectly. Had a similar problem recently where a new version was installed in the front end, but the table in the back end had not been updated properly (a new field) and the new version of the...

Query to Mail Merge issue
I am running Access2003 on WinXP SP2. I send out dues letters for members of a retiree group. When I try to do a mail merge to my Dues Query all goes fine except the telephone number in the query which is (555)555-1234 comes out 5555551234. If I copy the query into an excel spreadsheet and use that as the datasource for the mail merge it works fine. Is there something I need to do to format the query so it merges with the right format. Thanks Billa In the query format the field to include the parentheses and dash. In query design view, instead of the field name put an expression alo...

Outlook 2003 viewing problem
We are using Outlook 2003 from the Small Business Edition 2003 software, we have wireless router for our LAN and the modem connected to the router. We have 7 PCs in the Office. The problem is only on one computer, the user is receiving emails from people outside OK, but emails sent internally is another matter. Internal emails although they seem to be being received because the sound alert for new messages happens, but then the message doesn't display in any of the mail boxes. Also sending email from that PC to another internal PC on the LAN is not working. I have checked the ru...

Export query to Excel with formated heading
When export from query to Excel, I'd like to turn some columns into heading row on top of Excel sheets how to turn this: LastName FirstName SID Section Instructor Doe John 1234 0545 Su Doe Jane 2345 0545 Su into this? Class Roster Instructor: Su Section: 0545 LastName FirstName SID Doe John 1234 Doe Jane 2345 I think one way of achieving this would be to create a report in Access where you would group under instructor with the students in the detail section. From the report you can then use the analyze with Ex...

SQL Server Reporting Services Reports in Access
Using Access 2007 and SQL Server 2008. Is there a way to display SQL Server Reporting Services reports in Access 2007? If so, links to documentation/examples would be appreciated. -- AG Email: npATadhdataDOTcom Hi AG, No,there is no compatible interface for converting SSRS report to Access 2007 now.You may consider first export your SSRS report to an Excel file and then embed an OLE object "Microsoft Office Excel 97-2003 Worksheet". If you only need the data, you can directly import data from Excel to your Access database. Best regards, Charles Wa...

Cannot view itme in Public Folder between 2 different exchange 2003
I have 2 Exchange 2003 on WIN2k server. Exchange 2003 (A) has 300 mailboxes and store the public folder. Exchange 2003 (B) has 100 mailboxes. User at Exchange 2003 (B) found that they can view the public folder but no items in it. User at Exchange 2003 (A) do not have this problem. Is the public folder must replicate to other server? Is any suggestion to view the item if no replication on public folder ?? Thanks Dennis JoJo These 2 servers in the same routing group. Exchange 2003 (A) is the Master Exchange 2003 (B) is the Member "omer maydan" <omermaydan@yahoo.com> wr...

Great Plains Invoice History view?
Has anyone built a view in MSCRM that will show Great Plains Invoice history? I would be willing to purchase one. Jake ...

viewing a user's email account
I have been charged with reviewing a user's email activity / mailbox for a possible impropriety. Is there a way to do this from exchange, or better yet what is the best way to accomplish this steathfuly? On Mon, 23 Oct 2006 18:20:02 -0700, Rossel1 <Rossel1@discussions.microsoft.com> wrote: >I have been charged with reviewing a user's email activity / mailbox for a >possible impropriety. Is there a way to do this from exchange, or better yet >what is the best way to accomplish this steathfuly? I really hope that the users' employment contract provides for this ...

How do I fix this so I can view my attachments?
I can't view my attachment. I found the following topic in help but it doesn't give me way to fix this so I can view my attachments? I anivirus protection I don't need this feature from outlook. Please advise I see a paperclip next to a message, but when I open it, the attachment is gone. You may have received a message that contains a level 1 e- mail security attachment file type. To prevent the inadvertent spread of viruses, Microsoft Outlook checks the file type of each attachment in a received message against the file types on the e-mail security attachment file type...

cannot view all of text in large cell, even though I have it to w.
I have cell format to wrap text and it works fine to a p[oint then no more text is displayed....casn increase the size of the cell, but still only so much will display....rest of the cell show blank. Hi +the limit is 1024 characters. You can extend this with manually inserting linebrekas using aLT+ENTER -- Regards Frank Kabel Frankfurt, Germany sydme wrote: > I have cell format to wrap text and it works fine to a p[oint then no > more text is displayed....casn increase the size of the cell, but > still only so much will display....rest of the cell show blank. ...

Query Criteria issue
Access 2003: Trying to create a demographics report that will allow the following. Gender example On the form "frmStudentDemographics" is a drop down field named "cboGender" When the user makes a selection "Male" a report is generated for only Males. But in some cases the user will want to run a report for both (all) genders. So I added a check box next to the drop down named "ckAllGender" My idea is that if that box is checked then the report will show information on Both (all) genders. So in the query that generates the report, in the c...

Is it possible to add a "View" button under the purchase order section?
Would be nice to have the abilty to allow someone to be able to view the purchase order as opposed to the given "new, delete, edit, or receive" buttons. This way someone who needed the information and did not have the appropriate security would not be able to delete or change the PO. I tried to CTL S the new, delete, edit and receive buttons, but that basically locks them out completely. Is this something that may be possible? You can make excel pivot table so any employee can view that worksheet from their terminal. This way you can define the fields you want to show as well ...

Outlook/Access 2003
I've been doing a lot of research and purchased (but haven't completely read) Sue Mosher's book. However, before I spend much more time I'd like to find out if my idea is even feasible. The basic idea is to create an appointment system for multiple therapists that can be used by a receptionist and other staff. Using Outlook and Exchange is very nice but the appointment data needs to end up in an Access table immediately. We can purchase SBS 2003 with Exchange 2003 or we can buy a third party tool for calendar sharing whichever would be the easiest to use. I currently...

Can you record a macro in Publisher like you can in Excel?
In Excel I use the feature to Record a Macro. Excel records the keystrokes and converts to VB. Does Publisher have that option? In my version, Publisher 2003, I can Create a Macro, and it takes me into VB. However, I don't know how to code VB. Darlene wrote: > In Excel I use the feature to Record a Macro. Excel records the keystrokes > and converts to VB. Does Publisher have that option? In my version, > Publisher 2003, I can Create a Macro, and it takes me into VB. However, I > don't know how to code VB. Publisher does not have a Macro Recorder, sorry. --...

IE8 'View Source' opens minimised
Suddenly, after no previous problems, when I open 'Page / View Source' in IE8 it flashes on screen then minimises immediately to the Taskbar. It can be viewed when maximised ok. It can be resized and I have then tried closing whilst holding down Ctrl. It only happens to 'View Source' not any other window. I am perplexed? Hi Bob, It is probably hidden from view behind the IE Window. Just move the IE Window down your screen to see the View Source window behind it. I have noticed the same issue since the last IE security update (last night my time)... It is a...

Spontaneous 'Compile Error' In Queries
I've got a half-dozen queries that contain this expression: IssuerName: IIf(IsNull([tblIssuer].[IssuerID]),"[Issuer Unknown]",[tblIssuer].[IssuerName]) Haven't touched any of them, but suddenly they were all throwing "Compile error. in query expression 'IssuerName: IIf(IsNull([tblIssuer].[IssuerID]),"[Issuer Unknown]",[tblIssuer].[IssuerName])'." tblIssuer.IssuerID is still there in a link. My kneejerk was to somehow force recompiles of all the queries, so I did a Compact/Repair. After the compact/repair, all was well: the errors went away. C...

Upgrading from Great Plains 7 (SQL) to Great Plains 8
When upgrading from Great Plains 7 to Great Plains 8 will all dexterity and other supported customizations be persisted? I would doubt it since some there were changes in some of the tables. I know that some of our customized reports, specifically Purchase Orders and most of the documents in Sales Order Processing that we customized had to be redone. "GaryG" wrote: > When upgrading from Great Plains 7 to Great Plains 8 will all dexterity and > other supported customizations be persisted? Hi If you have had any bespoke work added to your v7 GP, you will need to up...

Editing more than 1 table at a time with SQL.
Say I have two tables in a DB called TABLE1, and TABLE2. TABLE1 [IDNUMBER] [FIRSTNAME] 1 Ryan 2 Jennifer 3 Monica TABLE2 [IDNUMBER] [LASTNAME] 1 Johnson 2 Snipes 3 Smith My question is would I be able to use SQL in code to Edit, Delete or Insert data to both tables in one string rather than one table at a time? For instance what if I want to change both tables with a [IDNUMBER] = 2 to a [IDNUMBER] = 4, OR change the ...

Default Case View
Could someone tell me how I can setup default views for cases for different users? I know how to change the default view for all users, however I want to make the view different for different users or groups (eg developers, support, etc...) can someone tell me how this can be done in CRM 3.0 please? Thanks, K2 What you are looking for is making the view private so that only certain users can see it. This is done by opening the view in customization and selecting sharing from the actions menu. By adding one or more teams, you'll make the view private to those selected. In other ...

Do you need MS Access to query on an Access table?
I'm asking these questions because I have looked at a lot of stuff in the discussion groups and still confused. I am fairly good at Excel programming but haven't been able to get Excel and Access to talk. First, I have Office 2003 Professional at work and Office 2003 without Access at home. I want to work on developing Excel programming at home which will get data from Access to Excel with either MS Query or with programming. Is it possible to just have the .mdb files on the home computer for Excel to work with, or do I need the Access program too? The info I want ...

Month view: scroll to see more?
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Power PC Email Client: Exchange Hello-- At MIT we have recently migrated to Exchange, which seems to be a setback in myriad ways. Does anyone know how to scroll in calendar Month View to see all items on a single day? I need to stay in Month View but have the ability to see all items on each day. I don't want to move to day view. Thanks! ...

Cannot view vendor list on Business Portal
I try view the vendor list on purchasing center Page, but show this message "An error occurred while retrieving data from Microsoft Dynamics GP. Administrator, see the server log for more information" ...

Sorting records in the Report Design View
Currently, I use "Sorting and Grouping" tool in the Report Design View to create group headers so that I can group my data accordingly. However, I would like to know if I can apply a custom sort order. For example, the field name that I want to group is "Region". I have records of "East", "North", "South", and "West". Is there a way that I can order by "North", "South", "East", and "West" instead? If I use the "Sorting and Grouping" tool, it won't work because it only accepts a...