TWO DATABASE

  • Thread starter Thread starter TYE
  • Start date Start date
T

TYE

Hi,

Can u help me.

i have two database one with all the sales.
the second one with all the information.

what i need to do is the following
1. select the data the sale is form
2. they are linked by phonenumber.
3. the code that are in partone table under spare1 and
spare2 do be undata in tblcontracts under spare1 and two
spare2.
can you help


SELECT Left([TransactionID],8) AS [Date],
tblContracts.HomePhone, dbo_Campaign.Spare1,
dbo_Campaign.Spare2 INTO Partone
FROM tblContracts INNER JOIN dbo_Campaign ON
tblContracts.HomePhone = dbo_Campaign.PhoneNum
WHERE (((Left([TransactionID],8)) Like ([Enter Date -
YYYYMMDD] & "*") Or (Left([TransactionID],8)) Like ([Enter
Date - YYYYMMDD] & "*")));
 
Hi Tye,

I'm confused. Do you have two *tables*, or two *databases*? Big
difference.

LeAnne
 
i have one table and the other is a link thats is called
dbo_Campaign.

-----Original Message-----
Hi Tye,

I'm confused. Do you have two *tables*, or two *databases*? Big
difference.

LeAnne
Hi,

Can u help me.

i have two database one with all the sales.
the second one with all the information.

what i need to do is the following
1. select the data the sale is form
2. they are linked by phonenumber.
3. the code that are in partone table under spare1 and
spare2 do be undata in tblcontracts under spare1 and two
spare2.
can you help

SELECT Left([TransactionID],8) AS [Date],
tblContracts.HomePhone, dbo_Campaign.Spare1,
dbo_Campaign.Spare2 INTO Partone
FROM tblContracts INNER JOIN dbo_Campaign ON
tblContracts.HomePhone = dbo_Campaign.PhoneNum
WHERE (((Left([TransactionID],8)) Like ([Enter Date -
YYYYMMDD] & "*") Or (Left([TransactionID],8)) Like ([Enter
Date - YYYYMMDD] & "*")));
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

HELP ON QUERYS 1
Query DATE 1
DateDiff returning incorrect years 11
filtering data 2
Getting only the last transaction for each customer 1
Union Query 6
Combining 3 queries 2
Query trouble 2

Back
Top