Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding Records that APpear in One Table and Not Another

Status
Not open for further replies.

md092686

IS-IT--Management
Jul 20, 2007
18
0
0
US
I have two tables called RetailSales0607A and RetailSales0607B. Both tables contain the same field names
with data.

The field names are: StoreNumber, StateCode, and BottleSales.

RetailSales0607A contains 91,000 records.
RetailSales0607B contains an update of 92,000 records.

I need to select all of the new records that have been added by StateCode. There are 200 stores that can have sales in the different StateCodes which represent a Product.
The Primary Keys are Store Number and StateCode.

I need to pull sll of the records and activity by State Code for each particular store.

I know a Compound Select Statement which involves a Select within a Select is the way to go. But, I am not too interested in having a query that operates efficiently, I just need the data for requests sometimes that require me to present to management that data I have compiled is accurate. Sometimes a Select within a Select is not the way to go. But I need to learn to Compound Select Statements anyway and understand what I am doing.

Any Help out there.

MB92686
 
Is this a home work assignment?

-George

"the screen with the little boxes in the window." - Moron
 
Why the thread reminds me to thread183-1389864?

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
Can you please explain why your question is soooo similiar to the one that Boris pointed out?

The only thing different is the table name.

-George

"the screen with the little boxes in the window." - Moron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top