Does Access Recognise Anti-join?

May 19, 2006

Hello,

I'm merging de-duping contact data from 2 tables with the same fields. One table is the master (lets call it X) and the other is new data (lets call it Y).

However, it's not a simple as adding the new recordset to the old recordset: there are many dupes - sometimes X data needs to be replaced with Y data, sometimes the X data is more comprehensive than the Y data so the Y data is discarded, but often Y and X records for matching email addresses needs to be merged.

I currently have a union query joining the two tables (X and Y), upon which a make table query is based. A de-duplication query has been based on the resulting table of all records (X + Y), and exact duplicate/fragment 'Y' records in the table have been removed.

I have in my mind a diagram of a right-outer-join query (where the left table is X + Y and the right table is the original table X) - and I want the data that would be excluded from this operation. I have come across un-join queries in discussions relating to Oracle, can I use this operator in Access or is it incompatible with the Jet engine?

Would I just be able to use "IS NOT" somewhere in the right-outer-join query instead?

Please help! Thank you!

View Replies


ADVERTISEMENT

Capitalisation Recognise Spaces

Oct 4, 2005

Right ive searched the forum and people are just asking silly questions that can be answered with an input mask but.

What im looking for is to be able to type a name for example in one textbox and the textbox will Capitalize the first Name and recognise the space key has been pressed and Capitalize the first letter of Second Name

Thanks for any help

View 5 Replies View Related

Doesn't Recognise Values As On The List In A Combobox

Jan 24, 2005

Hi,

I have a table of records, with one field of the records a combobox populated by a select query based onanother table.

My problem ism that it doesn't seem to recognise any of the values as on the list, though deleting one character and then replacing it results in the value being accepted with no problems.

This is a database I have inherited (Cheers predecessor!), the table is populated with a few thousand records and scrolling through this table results in an error message on this field for every record and is making displaying data on this form a nightmare! Anyone know of the cause or of a quick fix?

I don't know the history of this table unfortunately.

Cheers in advance

John

View 6 Replies View Related

Anti-querying?

Jun 2, 2006

OK,
I work for a political party. I work with voter history information. Normally, I am doing queries in order to bring up particular voters, and eliminate others.

Example - the basic table I work with contains the names, addresses, affilitations, and voting histories of everyone in my county. I normally query to bring up voters of a particular party, or people who voted in a particular election or number of elections or both. I more or less sort voters out, but in a positive manner, by creating tables with voters who did a particular thing.

For example: out of all the voters, I just want Democrats who voted in two of the past three primaries. I would then get a table that contained just those voters and no others.

Today, though, I was asked to create a table that would exclude voters based on their behavior, exluding voters who did a particular thing but showing everyone else.

Example, I have a request for all of the voters in the county, except those who voted in the 2004 and 2002 primaries. I know how to create a table with those voters and no others, but I don't know how to query for everyone but those voters. Can anyone help?

View 2 Replies View Related

Maybe It's A Anti-query

Oct 2, 2006

I need a query that shows the "not chosen" values.

That is:
I have table with MANY entry. If I choose FEW (query parameter) how can i write a query that show SOME=MANY-FEW

Thanks

View 3 Replies View Related

An Anti-Query?

Mar 18, 2008

Here's an odd one for you, but I bet it has a simple answer.

I have three tables: the first one is a list of orders, the second is a list of wages that should be paid out should a transaction fall into a certain range, and a table that has a list of the orders that should have those wages assigned. (any order not in the third table should be paid a static wage, no changes)

I made a query for any record that would need this list of wage ranges. The first and third tables (the orders and the list of orders that should be with the wage range)

SELECT completed.*, WageList.Wage
FROM WageList, [Pay for Performance List] INNER JOIN completed ON [Pay for Performance List].[Order Number] = completed.OrderNumber
WHERE (((completed.Eff)>=[WageList]![minPercentage] And (completed.Eff)<=[WageList]![maxPercentage]) AND (([Pay for Performance List].[Pay for Performance?])=Yes));

This query works just fine, thanks to the help of several people online here. Here's the problem: a second query would have to cover those records that are NOT part of the list. Since the two tables are linked in a one-to-many relationship, how do you ask for the records that are NOT part of the one side of the table?

View 2 Replies View Related

AVG Anti Virus And Lost Records

Nov 11, 2005

Hello all,

This is stricktly theory but I am wondering if any of you have had any problems with losing records while running antivirus software on a network type solution. i.e. AVG antivirus that uses one computer as the main server and all operations for antivirus software updates etc are run from this server. I am wondering if when the server does an automatic update on a computer if that is interupting the network connection for access (we all know how much access likes that)? I am having a horrible time with lost records. This week there have been three records lost.

Has anyone heard of any problems related to this or had similar experiences? After months of losing records this is just another theory. I don't want to start fooling around with my anti virus software but I just may just to see. Thanks for all your help.

Greg

View 8 Replies View Related

WHERE Clause On LEFT JOIN : Why Do I Get Join Expression Not Supported Message?

Nov 10, 2006

I've been toiling with the issue of WHERE clauses on the "Right" side of Left Joins. I'm aware that you need to use JOIN ON......AND.... rather than JOIN ON....WHERE.... if the WHERE relates to the Right Hand table.

I've even got an example in my DB where the above works, but now am struggling to use the same theory for other tables. Therefore, I went and created two Mickey Mouse tables to test the logic but am getting an error.

I have
Table 1 with one field called Field 1 - values A, B, C
Table 2 as follows

Field 1.....Field 2.......Field 3
A.............100
C.............200..........XXX

I hoped to have a query that finds all records on Table 1 and records on Table 2 where Field 1 matches on the two tables and Field3 = XXX

My SQL is
SELECT Table1.Field1, Table2.Field1, Table2.Field2, Table2.Field3
FROM Table1 INNER JOIN Table2 ON Table1.Field1 = Table2.Field1
AND Table2.Field3="XXX";

but I get Join Expression not supported

What am I doing wrong?

Thanks
Andrew

View 7 Replies View Related

Create A JOIN Of Different Tables Called Join A Variable And List

Nov 16, 2013

And then called this join as a symbol or variable, and then have it use to select the items from these joined tables, can this be done in Access? Here is an example of a code that I created, but it has an error message saying the FROM syntax is incorrect.

Code:
SELECT firstJOIN.trainID, firstJOIN.trainName, firstJOIN.stationID, firstJOIN.stationName, firstJOIN.distance_miles, firstJOIN.time_mins
FROM (trains INNER JOIN ((station INNER JOIN lineStation ON station.stationID = lineStation.stationID)
INNER JOIN bookingLeg ON bookingLeg.startID = station.stationID or bookingLeg.endID = station.stationID )
ON trains.trainID = bookingLeg.tid) as firstJOIN

Can Access do something similar to this, in the FROM statement I joined 4 tables, because each unique fields are in each table and I have to joined them to get those fields. I called this join firstJOIN and in the SELECT statement, I list those columns in the table by calling it firstJOIN.trainID. Can Access do something like this, but syntax it differently?

View 6 Replies View Related

Access Join Output

Apr 12, 2007

I have two access tables that I am joining. In the opty table I want all records that meet the WHERE clause and in the activity table I want any/all that meet the join clause. The opty table has a one to many relation to the activity table. The join works correctly, it is the display that I am having problems with. I want the output display as an opty then under that all the activities associated to the opty in ASC date order. My problem is I have a memo field in the opty table I want to display but if I put a GROUP BY clause in the sql then I only get part of the memo field (I know why this is happening). So, I tried to leave out the GROUP BY in the sql and use the OUTPUT GROUP BY in the display section. This works except if there are numerous activities associated to an opportunity then the opportunity (sometimes) will be displayed twice with different activities listed. Can some please help.

If I use the the ORDER BY, and put CDATE(acty_begin_dt), I get a NULL error. Which, I assume is because some of the opty's may not have an activity associated to it.

Below is the code I am using and it works fine except, the activities are not in the correct order. (I am using this query in a cold fusion application using access db)
Thanks


SELECT opty_row_id, opty_name, opty_created_by, opty_stage, opty_type, acty_type, acty_created_by, acty_status, acty_opty_row_id, acty_desc, acty_comments, opty_primary, opty_create_dt, opty_close_dt, opty_est_value, opty_desc, acty_row_id, acty_begin_dt, acty_end_dt
FROM opty LEFT JOIN activity ON (opty.opty_row_id = activity.acty_opty_row_id)
WHERE (Trim(opty_primary) = '#form.rpt_user_name#' AND (CDate(opty_create_dt) between #get_first# AND #get_last#)) OR (Trim(opty_primary) = '#form.rpt_user_name#' AND (CDate(opty_create_dt) < #past_date# AND (Trim(opty_stage = '01 - Prospecting') OR Trim(opty_stage = '04 - Opportunity') OR Trim(opty_stage = '03 - Qualification'))))
GROUP BY opty_row_id, acty_row_id, acty_begin_dt, opty_name, opty_created_by, opty_stage, opty_type, acty_type, acty_created_by, acty_status, acty_opty_row_id, opty_primary, opty_create_dt, opty_close_dt, opty_est_value, opty_desc, acty_end_dt, acty_desc, acty_comments
ORDER BY CDate(opty_create_dt) Desc

View 1 Replies View Related

Syntax For Nest JOIN In MS Access?

Feb 22, 2008

This query works:

SELECT p.AcntNumber, p.Name, d.FromDate
FROM Daysheet AS d
INNER JOIN Patient AS p ON d.AcntNumber=p.AcntNumber

But this does not:

SELECT p.AcntNumber, p.Name, d.FromDate, c.CPT
FROM Daysheet AS d
INNER JOIN Patient AS p ON d.AcntNumber=p.AcntNumber
INNER JOIN Charge AS c ON c.Id=d.ChargeNum

Nor this:

SELECT p.AcntNumber, p.Name, d.FromDate, c.CPT
FROM Daysheet AS d
(INNER JOIN Patient AS p
(INNER JOIN Charge AS c ON c.Id=d.ChargeNum)
ON d.AcntNumber=p.AcntNumber)

How do you word a nested join?

View 2 Replies View Related

Access Slow To Sum Or Join On Null Values?

Oct 5, 2006

Is Access slower at summing null records than SQL server?
I have a query which takes less than 1second in SQL server but takes about 5-10 in Access but can't think why there is such a lag in processing speeds.

View 7 Replies View Related

Join Syntax Errors Translating Oracle SQL To Access SQL

Mar 21, 2008

I've developed a working query to grab some information from my Oracle 9i database using SQL Developer. I have a tool in MS Access 2003 that I'm developing for other users so they can input some options through the GUI and query the same data that I do.

I'm trying to translate the query I developed in Oracle and have it work in Access. I have my ODBC connection set up so that Access can get to the same tables.

Here is my Oracle Query:

[QUERY]...

The error I'm receiving is: Run-time error '3296'

Join expression not support.

I believe the error has something to do with the "LEFT JOIN CPCF ... " but I can't seem to figure out how to fix it. The query will run in Access if I change that to an "INNER JOIN CPCF ...." but the result set is not what I need it to be. Any thoughts on how to fix this?

View 1 Replies View Related

Queries :: Full Outer Join In Access 2010?

Jan 21, 2015

I would like to create a full outer join in Access2010 between two tables with many to many relationship.

So I have tblServer and tblApplication and there is also the ServerID-ApplicationID table that connects these tables.

I found online many examples but all of them where for two tables with one-to-many relationship.

View 6 Replies View Related

Queries :: Access 2010 / Join Expression Not Supported

Jul 1, 2015

I am trying to execute the query below with multiple left joins because of the data I am trying to get back. The weird thing is sometimes it work and then sometimes it gives me a join expression error. It seems that access strangely removes brackets around the ON clauses. However even when I put those brackets back in this query it isn't working. why this query isn't running or why the brackets disappear in Access 2010.

SELECT Patients.[First Name] & " " & Patients.[Surname] AS Fullname
, [Clinic Patient].[MYMOP ID]
, NZ(MYMOPs.[MYMOP Date], [Clinic Patient].[First Appointment]) AS [MYMOP1 Date]
, MYMOPs.Completed AS [MYMOP1 Completed]

[code]....

View 14 Replies View Related

Queries :: Access 2003 - Join Via Calculated Field

Apr 28, 2013

I'm stuck in Access 2003 - the group I am working with is unwilling to upgrade due to costs, and I've inherited this database (or I should say, a glorified spreadsheet), so unfortunately I am stuck with the tools that I have to use.

So I have Table A:MemberID (autonumber, Primary Key)

NameLast (Text)
NameFirst (Text)
TLBeginner (Yes/No) - Training level
TLIntermediate (Yes/No) - Training level
TLContinuing (Yes/No) - Training level
TLAdvanced (Yes/No) - Training level

I have created Query1 with the above table and added in a calculated field which essentially takes the training levels and converts it to a decimal number (basing it off a binary number of the 4-bits/Yes-no fields) with the calculated field below:

TrLevelTxtID: IIf([TLFundamental]=True,1,0)*1 + IIf([TLIntermediate]=True,1,0)*2 + IIf([TLContinuing]=True,1,0)*4 + IIf([TLAdvanced]=True,1,0)*8

So the calculated field works great - Depending what training levels are selected or not selected, I get a range between 0 through 15.

Table B: I want a list of "friendly name" for the different training levels.

TLID (Number, No duplicates)
TLFriendlyText (Text)

So what I want to be able to do, is to have Query1, that will pull the training level text (TLFriendlyText) within the query based on the calculated field (TrLevelTxtID). The catch is, I can't seem to create a join between the two tables with the calculated field.

Ideally, I want the final query to pull, [NameFirst], [NameLast] from TableA and [TrLevelTxtID] (from TableB) based on the queries calculated field [TrLevelTxtID].

How best to achieve this with the Access 2003 limitations. Also, this query will only be used for reporting/mail merging so there are no update requirements or concerns.

View 4 Replies View Related

Queries :: Access 2010 - Inline Query Using Inner Join And Group By?

Nov 14, 2013

I am currently using INNER JOIN and GROUP BY to narrow down the RowSource of a combo box based on the value selected in the active combo box where the code is located "onClick".

The value being selected is a StoreID, This ID is matched against the AssetRegister to find all group names, The GroupID and GroupName are then retrieved from the AssetGroup table, then finally the list is grouped on the Group ID and Group Name.

I have tested this query in SQL Server Management Studio and it works without any issues, however when I use it as an inline query to adjust the row source of the combo box it returns no values.

Here is the SQL query:

Code:
SELECT AssetGroup.ID, AssetGroup.GroupName
FROM AssetGroup
INNER JOIN
(SELECT AssetRegister.AssetGroup, AssetRegister.Store
FROM AssetRegister
WHERE AssetRegister.Store=7) AS ar ON (ar.AssetGroup = AssetGroup.ID)
INNER JOIN Store ON Store.ID = ar.Store
GROUP BY AssetGroup.ID, AssetGroup.GroupName ORDER BY AssetGroup.GroupName

And here is the inline query applied to the RowSource:

Code:
AssetGroup.RowSource = "SELECT AssetGroup.ID, AssetGroup.GroupName FROM AssetGroup INNER JOIN " _
& "(SELECT AssetRegister.AssetGroup, AssetRegister.Store FROM AssetRegister WHERE AssetRegister.Store=" & StoreID & ") AS ar ON (ar.AssetGroup = AssetGroup.ID) " _
& "INNER JOIN Store ON Store.ID = ar.Store GROUP BY AssetGroup.ID, AssetGroup.GroupName ORDER BY AssetGroup.GroupName"
AssetGroup.Requery

View 4 Replies View Related

Develop A Query In MS Access 2010 To Join Two Tables Using Three Joins One Of Which Is A Date Range

Apr 15, 2015

I am trying to develop a query in MS Access 2010 to join two tables using three joins one of which is a (between) date range. The tables are contained in Access.

ABCPART links to XYZPART. ABCSERIAL links to XYZSERIAL. ABCDATE links to (between) XYZDATE1 and ZYZDATE2.
[ABCTABLE]
ABCORDER
ABCPART

[code]...

View 4 Replies View Related

Inner Join And Left Join

Jan 3, 2007

I am trying to do an inner join with a left join. The only problem is, I want to inner join the table that is being joined. This is how I thought it would work below, but it doesn't work.

SELECT * FROM ((Submissions LEFT JOIN Candidates ON Submissions.`Candidate Code` = Candidates.`Candidate Code`) INNER JOIN `Type Candidate Status` ON Candidate.Status = `Type Candidate Status`.`Status ID`)
WHERE Submissions.Status <> 7 ORDER BY `School Interest` DESC;

I want to get the Candidate.Status to inner join with the `Type Candidate Status`.`Status ID`.

If you can help, thanks in advance.
Dave

View 1 Replies View Related

MS Access "Joins", Possible To Join Via A Range Or Add Code?

Nov 2, 2007

hi im pretty new to this, using access2000 i believe


i have a large amount of data and have been able to join them successfully. using the "left" "Operator" "right"


one of the things id like to join are dates, but the dates i want to join are not exactly equal to each other so i cant just use a operator "=".


i need to be able to tell access to link the dates within say 30 days of each other.



Ideally something like “left” “>” “right” -30


currently im using excel to do this for me but if access can do it then it would be great.


in excel i use a macro which matches dates within 30 days, and just use a simple

If range("A1") < range("A2") + 30 and range("A1") > range("A2") - 30 then ...........




so is it possible to have access join things within a range?


would be grateful for any help ;)

View 2 Replies View Related

"OUTER JOIN" On Access

Jun 19, 2006

Hello Everybody...

Pls, does someone have any idea of how I can do an "OUTER JOIN"-like effect on an Access querie? I tried to use this statement in his standard but it didn't work...

Thanks!

View 1 Replies View Related

JOIN DB2 Table With Access (or Other) Table

Apr 8, 2008

I have most of my data in DB2 tables which I am linking to. However, there are a few pieces of data I am gathering from text files. I put them into a little Access table and tried to JOIN with a DB2 table field. My query died....

Is Access amenable to joining different types of tables? If anyone can advise I would be most grateful!

Arpeggione

View 2 Replies View Related

Join

Nov 27, 2007

I have two queries containing this information (example):

View 3 Replies View Related

Right Join?

Jul 21, 2005

I having a little trouble with a query I was hoping someone could help me with. Basically I have the following SQL statement

[code].....

I would like to show all records for the tblCService.CService field however it won't let me change the join to a RIGHT JOIN. I get an "ambigious outer joins" error message. As far as schema tblEList is the main table and the tblCService is a lookup table. Any ideas?

View 1 Replies View Related

Join Where Contains ?????

Aug 23, 2006

hello everyone,Please can someone tell me if it is possible to create a Join on two tables where the value from 1 field is contained within a field from the other table.eg.table1.field = "xyz"table2.field = "the xyz super thingy"This is the SQL it gave me orrigionally but this is an "= to" join which is not what i want. I tried replacing the = with a LIKE but am still getting the same results.SELECT table1.*, table2.*FROM table1 INNER JOIN table2 ON table1.modelno = table2.name;SELECT table1.*, table2.*FROM table1 INNER JOIN table2 ON table1.modelno LIKE table2.name;

View 1 Replies View Related

Need Help With INNER JOIN

Sep 10, 2006

I have a database with PCs and installed hardware. An external program scans all PCs, the result of the scan can be saved as Access file.
Now I need a query to select from each PC the installed hardware (Monitor, Printer...) but only with the latest date. I have written a query MaxDatum to select the the lastest date. Here's my query code:

SELECT [Table1.needed fields], [Table2.neede fields]...
FROM (((Table1 INNER JOIN (Table2 INNER JOIN qryMaxDatum ON (Table2.Field1 = qryMaxDatum.Field1) AND (Table2.Field2 = qryMaxDatum.MDate)) ON Telle1.Field1 = Telle2.Field1)
INNER JOIN Table3 ON Table2.Field2 = Table3.Field2)
INNER JOIN Table4 ON Table2.Field2 = Table4.Field2)
INNER JOIN Table5 ON Table2.Field2 = Table5.Field2
ORDER BY Table1.Field1;

My problem: this query mulitply the number of data records so that I have 80 data records with exactly the same content per PC. How do I neesd to change the query to get only one data record per PC?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved