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

Microsoft JET Engine - SQL Error (Cant figure out)

Status
Not open for further replies.

jetar

Programmer
Oct 16, 2003
49
US
I am using an excel sheet as a data source and created a range on the excel sheet to pull my data from. There are four columns. All I am trying to do is run the following SQL statement on one of the columns:

SELECT DISTINCT core_process FROM coreprocessrange

This query gives me the following error:

"The field is too small to accept the amount of data you attempted to add. Try inserting or passing less data."

However if I run the query without the DISTINCT portion like:

SELECT core_process FROM coreprocessrange

Everything works fine. Not to mention that running the SELECT on all the other 3 columns with or without the DISTINCT clause works fine.

A little information on the core_process column that is giving me the error is that:
1. There are a lot of rows in the worksheet about 1500
2. This particular column has a lot of blank fields for each row and a lot of duplicate entries (hence the need for the DISTINCT clause)

I just dont understand why running the SELECT statement works without the DISTINCT clause but not with.

Any help is appreciated, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top