Excluding An Entire Table?
Oct 9, 2006
I have one table that will consists of about 1,000 rows. I have another table that consists of product codes that we want to exclude from the report. I know how to include the two tables by joining, but I want to EXCLUDE the 2nd table of product codes. Basically, if any of the product codes listed on table 2 are on table 1, I don't want them to appear. So how can I do an exclude function in a query?
View Replies
ADVERTISEMENT
Oct 8, 2007
I read somewhere that the main difference between JET AND SQL server is that a query rn through JET transfers the whole table across the network to the client machine and then processes it. Whereas, SQL server just transfers the particular record, say if you use a stored procedure.
Is this actually true?
What about if it's usng a SQL back end?
Any links on this subject?
View 9 Replies
View Related
Sep 27, 2005
Hello, I'm new to the forum and relatively new to Access. There's something I'm trying to do but I'm not sure if it's even possible so I'm hoping someone can help me out and point me in the right direction
the situation:
I have one very big table containing data for around 250 petrol stations. The data is collected monthly, so each site has a record relating to each month. E.g site A has data for month 1, 2, 3 etc.
The problem is that in any month, some of this data needs to be excluded from analysis. And this will vary over the months. What I want to do is run a query where specific records are excluded, for example, exclude Site A data for month 1 and 3, Site B data for month 2 etc.
I have another table containing a list of which site + month data is bad and to be excluded. Ideally I want to simply add to the list each month before I run the select query.
the question:
Is there any way to exclude records from a select query based on their details appearing on another table?
help would be much appreciated!
thanks
Catherine
View 2 Replies
View Related
Dec 23, 2004
Is there a way to import the records from another database table? I have an inventory database, blank, only the backend data is there. So everyone goes out on their own and gets inventory. At the end of the day, I would like to get flie 1, file 2, file 3, and only open file one, and only import the record from the other two inventory tables.
All these files will be exactly the same(Tables, queries,forms, everything). The only thing that will be different will be the data in the inventory table. Thanks for you help!
View 2 Replies
View Related
Dec 28, 2005
I have a table that has the following: Joint Account, Employer, Employer1...Employer20, subemployer1, subemployer2... subemployer5, addemployer1, addemployer2... addemployer5, removeemployer1, removeemployer2....removeemployer5.
It might be possible that any of the columns with the word "employer" in them have the same number in them. The Joint Account column might have the repeating number in it as well.
I want to be able to push a button on a form open a input box and enter a 7 digit employer number and search through the whole table and return all the rows where that number particular number is.
I have tried building a query using "like" in the criteria but you can only use that 8 times.
I have searched through this forum, but I am unable to find something that I could use. As I m not a seasoned access user, I do not quite know what to do with some of the other "search" questions I have seen.
Thank you in advance for any help that could be given or pointing in the right direction.
John
View 4 Replies
View Related
Sep 19, 2004
Hello,
I am currently working with a database that has a table called "Students." I need to import records from a textfile that has a bunch of records, some new, some existing records but updated. I got them to import into a table used for imports (called "Import Table") and I was able to run a query to append the records if they were not already existing, but how do I get a Query to do both new inserts and updating existing records with new info from the imported data?
i.e.
Bob is in the database already, but needs to update his records. His updated record is in a textfile which is now in the "Import Table". But in that same textfile/table, there are some new people that need to be added.
Thanks!!!
View 2 Replies
View Related
Jul 1, 2005
Hello,
I have 2 tables.
1) Table A, which is a table of all 100,000 users
2) Table B, which is a table of all other users
I have a query qryA, which looks for everyone in table A with a certain type of job title.
I want to exclude anyone who works for a company that occurs in the table B from showing up in the qryA query.
Any ideas?
View 2 Replies
View Related
Mar 10, 2006
Hi All,
Say you've got 2 tables and you want to extract data from table 1 but exclude all records from table 1 which have a field value existing in table 2?
Table 1 fields:
Test_Code
Test_Desc
Table 2 fields:
Test_Code
Therefore, I would like to query out from Table 1 all Test_Code values which do not exist in Table 2. Any ideas please?
View 2 Replies
View Related
Apr 29, 2006
I created a report where is lists sales volume by day. I was asked to create a table where data can be excluded from this report. The exclusion table consists of only three fields:
Date Department and a check box
What do I need to do in the query to have it exclude the data listed in this exclusion table. The table only holds data we want excluded, not all dates and departments.
I originally added the table to the source query and made the criteria "False" for the check box but when the query runs it does return any data at all.
Please help!
View 1 Replies
View Related
Dec 4, 2012
I am building a query with a column of data, 'location number'.
I need to exclude any data where the location number is found in a pre-built table.
i.e. return all data except when the location number is found in the table.
View 3 Replies
View Related
Apr 27, 2005
I am trying to change all the fields of a table from All Caps to Propercase. I have used strconv propercase before, however only on a field by field basis. I have about 5 or tables that I have to do this to and am trying to save the typing. I know I can do this with a recordset (easily in asp), but am not familar enough to do this in vba. Can you do a for each fld, like in asp, or am I going at this the totally wrong way. I tried using an update query with the *, but access doesn't like that too much. Any help is greatly appreciated.
Thanks,
Josh
View 1 Replies
View Related
Mar 28, 2006
Please help....
I have combined 2 Tables using a select * query.
I have to do it this way as the data changes.
The issue I have is that in both tables there is a common field called "Amps"
Hence my resultant table has 2 columns, Table1.Amps and Table2.Amps.
Every time this occurs I want to delete Table2 column entirely as I use this table to plot a graph.
In short- I need to know the code to delete a column from an existing Table.
Please help..
Pipes
View 2 Replies
View Related
Jul 21, 2006
I'm a relative newbie and I'm trying to figure out if I can link individual rows in one table to entire whole tables.
Example:
I have a table with the following fields:
Ticker Quote Volume
MSFT $25.00 3000000
IBM $30.00 1093837
SNDK $20.00 5959483
Now each of these Tickers has a whole table of options associated with each particular ticker and the EASIEST way for me to proceed would be to simply link row MSFT with an ENTIRE table of MSFT_OPTIONS then link IBM with the table IBM_OPTIONS.
Keep in mind that I don't have a field called TICKER in the options table and MSFT does not appear anywhere in the options table.
I know I can go and add the TICKER field to the OPTIONS_TABLE and then assign a primary key and then link them both but this would involve a great deal more work since I have hundreds of stocks with options tables to link. The data I get is in a specific format and I don't want to have to massage the data too much.
I appreciate your help,
Mr. Opine.
View 1 Replies
View Related
Sep 24, 2007
I need to convert an entire table to lower case..
The table happens to only have one column in it, so each record only has one field..
How do I convert the entire thing to lower case?
I can not just convert the display info to lower case, this table is used as a cross-reference data table and I need to physically convert all the data in the entire table to lower case.
Oh, and I need this to be a macro of some sort, since the data is re-imported on a regular basis, and will re-convert to upper case on the import.
Thanks,
Bill
View 2 Replies
View Related
Apr 16, 2013
I have a form with two unbound text boxes: HireMovieID and HireCustomerID, and a button HireButton which runs my query: HireHistoryQuery. Then I have a table: HireHistory. In my HireHistory table, I have my CustomerID's along the top as column names. Then the records for those columns are in this sort of format: "0001 on 19/05/2006" as type Text.How can I make it so that when a user enters a Customer ID (e.g. 23) into my HireCustomerID box in my form, it shows column number 23 and all it's records?
Also, what code do I need so that if someone enters something into the HireMovieID text box in my form (e.g. 0001) it shows all of the instances of that from the whole table in its respective column?
View 5 Replies
View Related
Jun 6, 2007
Hi
I have a table that I am importing from FOXPRO DATABASE. When someone goes into the system and deletes a record, Foxpro does not really delete the records but marks it for deletion. There is no field to query on that I can see in the table, but when I go to Foxpro the record is "marked" for deletion.
Anyway to exclude these records when doing a query or importing the table?
Thanks
View 1 Replies
View Related
Feb 27, 2015
I have a local table that I am trying to append to a linked table. The fields are exactly the same. When I try to append the entire local table to the linked table I get an error code.
ODBC- insert on a link table failed.
[ctreeSQL]-17002 CT- Key value already exists in index (linked table field) (#-17002)
If I specify the criteria in the field to refer to a specific value in the local table, it updates it just fine. I want an append query because I don't want to manually update 500+ records!! I don't believe an update query would work because the values are not in the current linked table... so nothing to update!
View 8 Replies
View Related
Nov 11, 2013
No matter how much I maximize or minimize Access (2010) my tables fill the entire screen. This happened once before but I don't recall the fix. It was something very simple. How to make the table not fill the entire screen?
View 9 Replies
View Related
Jul 23, 2015
I want to run a query on a table that holds all speed information for our trucks imported from a third party. Some of the speed alerts in that table are not correct so we set up a second table managed by the users to enter a speed exception. So if we know that Main St in Dallas TX generates false alerts for speeding we know not to call the driver, the third party db speed limit is not up to date.
So I want my query to pull all the speed data from tblSpeedData, except leave out the records where the street and zip are listed in the tblSpeedExceptions.
View 3 Replies
View Related
Sep 12, 2014
I am trying to write a query that will check all records in a table but exclude the 10 newest records in the table.
The table is from a stock program i have wrote for the company i work for (i am a novice access user). what ive been asked to do is write a duplicate order system that will flag up if the order has already been packed.
the table logs the [OrderID] with each item [barcode] scanned out with a barcode scanner what i want is a query that checks the OrderID for a duplicate entry in the entire table but because the OrderID is entered with every item scanned i want to ommit the last 10 records as prety much no order has more than 10 items i understand this may not be 100% fool proof but it is close enough.
The other option is to have it ommit all records within the last 15 minutes there is also a [Time] and [PackDate] Field which im guessing could be used for this the time field records Now() and the PackDate records Date(). After searching the web i cant seem to find anyway to ommit the last 'n' records and the few things i have found with the Date("m",-15,Date()) doesnt seem to work
View 7 Replies
View Related
Jul 14, 2015
I have run into an issue with a basic DLookup. The database has grown in size and now we could have multiple entries, but I want it to return a certain one. So the information could be in it three times. Of course DLookup stops after the first one. How do I get it to loop to check the entire table? Someone mentioned to me to use a recordset, but how to write that as I have never used it before. Below is what I was using until this new request came up.
<code>
Private Sub txtloan1_AfterUpdate()
If IsNull(DLookup("[loan1]", _
"settlement", _
"[loan1]=""" & Me.txtloan1.Text & """ AND [status] = 'Open'")) = False Then
Cancel = True
MsgBox "Test", vbOKOnly, "Warning"
End If
End Sub
</code>
This was also executing after the user entered the information within a text field. I did not want them to enter all the data and then have it come back as a duplicate.
View 7 Replies
View Related
Feb 28, 2006
Hi All,
I'm trying to extract records that start with 10 but I need to exclude all that start with 1011,1015 & 1025
so far I can only extract records that I need but cant exlude the others when I use the SQL below
INSERT INTO tblConceptOrders ( TA_TASK_ID )
SELECT dbo_F_TASKS.TA_TASK_ID
FROM dbo_F_TASKS
GROUP BY dbo_F_TASKS.TA_TASK_ID
HAVING (((dbo_F_TASKS.TA_TASK_ID) Like "10*"))
ORDER BY dbo_F_TASKS.TA_TASK_ID;
I'm looking for a better way to exclude the records I don't want & collect the ones that I do
Any help will be appreciated
thanks :)
View 6 Replies
View Related
Feb 13, 2008
Good morning,
I'm trying to create a query and I'm asking for specific records, but also need to exclude certain records within that criteria. Here is my Select statement:
SELECT [MD IMPORT PURGE PEND].PROC,
[MD IMPORT PURGE PEND].SEG,
[MD IMPORT PURGE PEND].NAME,
[MD IMPORT PURGE PEND].GROUP,
[MD IMPORT PURGE PEND].BEN,
[MD IMPORT PURGE PEND].DATE,
[MD IMPORT PURGE PEND].RISK,
[MD IMPORT PURGE PEND].REASON,
[MD IMPORT PURGE PEND].PLAN,
[MD IMPORT PURGE PEND].PAR,
[MD IMPORT PURGE PEND].IND,
[MD IMPORT PURGE PEND].REC,
[MD IMPORT PURGE PEND].SUBNO,
[MD IMPORT PURGE PEND].CLIENT,
[MD IMPORT PURGE PEND].CLAIM,
[MD IMPORT PURGE PEND].FSDT,
[MD IMPORT PURGE PEND].PDDT,
[MD IMPORT PURGE PEND].CHECK,
[MD IMPORT PURGE PEND].PROV,
[MD IMPORT PURGE PEND].SOURCE,
[MD IMPORT PURGE PEND].PAYEE,
[MD IMPORT PURGE PEND].EFF2,
[MD IMPORT PURGE PEND].CSHRCNO,
([CARR] & [CARR1] & [CARR2]) AS CPL,
[MD IMPORT PURGE PEND].CLASS,
[MD IMPORT PURGE PEND].MKTSEG,
[MD IMPORT PURGE PEND].PAID
FROM [MD IMPORT PURGE PEND]
WHERE ((([MD IMPORT PURGE PEND].SEG)="CONTROL") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)="HOMES" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].SOURCE)<>"IN" And ([MD IMPORT PURGE PEND].SOURCE)<>"IP") AND
(([MD IMPORT PURGE PEND].PAYEE)="J" Or ([MD IMPORT PURGE PEND].PAYEE)="N")) OR
((([MD IMPORT PURGE PEND].SEG)="CONTROL") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)="HOMES" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].PAYEE)="S" Or ([MD IMPORT PURGE PEND].PAYEE)="M")) OR
((([MD IMPORT PURGE PEND].SEG)="CONTROL") AND
(([MD IMPORT PURGE PEND].REASON)="35") AND
(([MD IMPORT PURGE PEND].IND)="HOMES" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].EFF2)="3")) OR
((([MD IMPORT PURGE PEND].SEG)="NASCO-NASCO") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)="HOSTP" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].SOURCE)<>"IN" And ([MD IMPORT PURGE PEND].SOURCE)<>"IP") AND
(([MD IMPORT PURGE PEND].PAYEE)="J" Or ([MD IMPORT PURGE PEND].PAYEE)="N")) OR
((([MD IMPORT PURGE PEND].SEG)="NASCO-NASCO") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)="HOSTP" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].PAYEE)="S" Or ([MD IMPORT PURGE PEND].PAYEE)="M")) OR
((([MD IMPORT PURGE PEND].SEG)="NASCO-NASCO") AND
(([MD IMPORT PURGE PEND].REASON)="35") AND
(([MD IMPORT PURGE PEND].IND)="HOSTP" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].EFF2)="3")) OR
((([MD IMPORT PURGE PEND].SEG)="PAR") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)<>"HOSTS") AND
(([MD IMPORT PURGE PEND].SOURCE)<>"IN" And ([MD IMPORT PURGE PEND].SOURCE)<>"IP") AND
(([MD IMPORT PURGE PEND].PAYEE)="J" Or ([MD IMPORT PURGE PEND].PAYEE)="N")) OR
((([MD IMPORT PURGE PEND].SEG)="PAR") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)<>"HOSTS") AND
(([MD IMPORT PURGE PEND].PAYEE)="S" Or ([MD IMPORT PURGE PEND].PAYEE)="M")) OR
((([MD IMPORT PURGE PEND].SEG)="PAR") AND
(([MD IMPORT PURGE PEND].REASON)="35") AND
(([MD IMPORT PURGE PEND].IND)<>"HOSTS") AND
(([MD IMPORT PURGE PEND].EFF2)="3")) OR
((([MD IMPORT PURGE PEND].REASON)<>"35" And ([MD IMPORT PURGE PEND].REASON)<>"44" And ([MD IMPORT PURGE PEND].REASON)<>"51") AND
(([MD IMPORT PURGE PEND].IND)="HOMES") AND
(([MD IMPORT PURGE PEND].CHECK)="000000000") AND
(([MD IMPORT PURGE PEND].PAYEE)="S" Or ([MD IMPORT PURGE PEND].PAYEE)="M") AND
(([MD IMPORT PURGE PEND].EFF2)="3") AND
(([MD IMPORT PURGE PEND].CSHRCNO) Is Null));
The part in bold is the exclusion. I want it to exclude records where the reason is 35 or 44 or 51, IND is HOMES, check number is 000000000, payee is s or m, eff2 is 3 AND cshrcno is null.
Can anyone tell me how to achieve this? I really appreciate your help!
View 4 Replies
View Related
Sep 12, 2005
Hi :rolleyes:
I would like when I click a button for the system to automatically create a copy of the whole database and place it into a separate folder. How would I do this??? :confused:
Cheers
bikeboardsurf
View 1 Replies
View Related
Nov 24, 2004
We have a database that was being used by two different people to edit the same record at the same time. They both got error messages and now there is one record on the table that is now filled with ######. The table will no longer allow any queries to be ran against it. We figured that that table is somehow corrupt. We tried to compact and repair and that didn't work. It won't allow us to copy nor export any data from it. Are there anythoughts as to what we can do?
View 2 Replies
View Related
Jan 24, 2006
Hi Guys
I have a main table, which I then query specifying 'XXX' in multiple fields to bring back no records. Then I set up a form based on that query so I always have a blank form to enter details to the table.
Access is saving the record every time I amend a field. I'm now stipulating that many of the fields must have data in and am repeatedly getting the 'field name must not be zero' error message even when I'm nowhere near that field.
I need to disable autosave and then put the docmd.acsave etc once all fields are complete.
Any ideas how best to do this?
View 11 Replies
View Related