From: John on 29 Mar 2010 16:45 First of all by accident I also posted this in the General Questions section of the discussion board. So if it shows in both places my aplogies, I think it is a better post here. I need to find employees names that show up in two tables (duplicates). I have a table called Did Not Receive Gift Card and a table called Tax List (the table names are saved with the spaces exactly as shown). I need to find employees whose name is on the Did Not Receive Gift Card table AS WELL AS on the tax list table. Both tables use the field of name. This field is the employees full name. I did not set up the table this way, I inherited it so I cannot change it now. In essence what I am looking for are those employees who did not receive a gift card (Name on Did Not Receive Gift Card table) but were taxed for a card in their pay (name also on Tax List table). An office mate suggested a Join Query, but not sure how to write such.
From: kc-mass on 29 Mar 2010 23:29 This will show you who did not get a gift card but Paid Tax. Fix the table names to suit. SELECT tblNoGiftCard.Name, tblTaxPaid.Name FROM tblTaxPaid INNER JOIN tblNoGiftCard ON tblTaxPaid.Name = tblNoGiftCard.Name; Regards Kevin "John" <John(a)discussions.microsoft.com> wrote in message news:788606B4-3FFF-4FF8-AEA4-84F3B05458AE(a)microsoft.com... > First of all by accident I also posted this in the General Questions > section > of the discussion board. So if it shows in both places my aplogies, I > think > it is a better post here. > I need to find employees names that show up in two tables (duplicates). I > have a table called Did Not Receive Gift Card and a table called Tax List > (the table names are saved with the spaces exactly as shown). I need to > find > employees whose name is on the Did Not Receive Gift Card table AS WELL AS > on > the tax list table. Both tables use the field of name. This field is the > employees full name. I did not set up the table this way, I inherited it > so I > cannot change it now. In essence what I am looking for are those employees > who did not receive a gift card (Name on Did Not Receive Gift Card table) > but > were taxed for a card in their pay (name also on Tax List table). An > office > mate suggested a Join Query, but not sure how to write such. >
From: Rob on 30 Mar 2010 08:13 I was wondering where that Query string woud be placed? I'd like to use it for my own needs, with adjustments of course. Thanks. "kc-mass" wrote: > This will show you who did not get a gift card but Paid Tax. Fix the table > names to suit. > > SELECT tblNoGiftCard.Name, tblTaxPaid.Name > FROM tblTaxPaid INNER JOIN tblNoGiftCard ON tblTaxPaid.Name = > tblNoGiftCard.Name; > > Regards > > Kevin > > > "John" <John(a)discussions.microsoft.com> wrote in message > news:788606B4-3FFF-4FF8-AEA4-84F3B05458AE(a)microsoft.com... > > First of all by accident I also posted this in the General Questions > > section > > of the discussion board. So if it shows in both places my aplogies, I > > think > > it is a better post here. > > I need to find employees names that show up in two tables (duplicates). I > > have a table called Did Not Receive Gift Card and a table called Tax List > > (the table names are saved with the spaces exactly as shown). I need to > > find > > employees whose name is on the Did Not Receive Gift Card table AS WELL AS > > on > > the tax list table. Both tables use the field of name. This field is the > > employees full name. I did not set up the table this way, I inherited it > > so I > > cannot change it now. In essence what I am looking for are those employees > > who did not receive a gift card (Name on Did Not Receive Gift Card table) > > but > > were taxed for a card in their pay (name also on Tax List table). An > > office > > mate suggested a Join Query, but not sure how to write such. > > > > > . >
From: John W. Vinson on 30 Mar 2010 12:02 On Tue, 30 Mar 2010 05:13:01 -0700, Rob <Rob(a)discussions.microsoft.com> wrote: >I was wondering where that Query string woud be placed? I'd like to use it >for my own needs, with adjustments of course. All Queries consist of SQL strings. The query grid is just a tool to help build those strings. You can create a new Query in query design view, and choose SQL as the view from the dropdown; or in 2003 and before, choose View... SQL on the menu. You can then copy and paste a SQL string from a message here into the SQL window. Edit the fieldnames and tablenames to match your database. -- John W. Vinson [MVP]
|
Pages: 1 Prev: Thanks Jerry W. and John V.!!! Next: Query. How to add this calculated field? |