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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSERT INTO giving application error

Status
Not open for further replies.

Philly44

Programmer
Jul 17, 2001
277
CA
I have a table that is used to track mail history. One of the ways it gets updated is through an INSERT INTO query. The problem I have is this, when I try to run the query I get an application error(Division by Zero). It doesn't make any sence to me. I can see the datasheet of the query no problem. The syntax is as follows:

INSERT INTO tblMailHistory (CustID) SELECT DISTINCT CustID FROM tblReport;

tblReport is a temporary table used for geerating reports and things. Any help would be greatly appreciated. Thanx
 
Do you have any null values in the CustID field? What happens if you make a select query with a field

CustIDDivTest: 1/[CustID]

Does it run?
 
I figured out the problem. I changed DISTINCT to DISTINCTROW and it works fine now. I have no idea why this made a difference but hey it works. Thanx anyways
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top