Using group by function

K

Kali

Hello

I am trying to use a group by function where if the Business Name and Type
are the same, I want it to sum the total. But, for some reason, access is
giving me 2 rows instead of one. when I view the data, everthing is the
same, the only thing I notice it that Type column is blank in both rows,
which is fine, but when I click on the 1st one, its a space before the
blinking cursor, the 2nd row, shows the cursor with no space. I've tried
everything, formatting, etc... I can't figure it out. I wish I could send a
screen shot of what's happening. Is there something wrong in the way that I
am linking my excel file into access? Does anyone have any ideas. Thanks.
 
K

KARL DEWEY

You need to clean up your data and remove the leading space using an update
query.

In the mean time do your query this way --
SELECT [Business Name], Trim([Type]) AS [Type Name]
FROM YourTable
GROUP BY [Business Name], Trim([Type]);
 

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

Top