Excel Get Data - Unique Records only

A

Adam

Dear all

I am connecting from excel to an ODBC server and pulling off a Date field which is kept in an Integer format. Now I'm pulling this into Excel but only want to pull the unique records i.e not the same date integer twice which has been occuring.

Does anyone know how to use the Microsoft Query application in Get Data of Excel to only pull unique records?

Many Thanks
 
P

Paul Falla

Dear Adam
One thing you could try is to open your query in MS Query,
and pull the field that has the date data to the far left
hand side (ie it becomes the first field), then preview
the SQL for your query. When the SQL preview window opens
type in DISTINCT between the SELECT statement and the
first field name. Close the SQl preview window and return
the data to Excel.

That might resolve your problem.

Hope this helps

Paul Falla
-----Original Message-----
Dear all

I am connecting from excel to an ODBC server and pulling
off a Date field which is kept in an Integer format. Now
I'm pulling this into Excel but only want to pull the
unique records i.e not the same date integer twice which
has been occuring.
Does anyone know how to use the Microsoft Query
application in Get Data of Excel to only pull unique
records?
 
J

Jamie Collins

...
I am connecting from excel to an ODBC server and pulling off a Date field which is kept in an Integer format. Now I'm pulling this into Excel but only want to pull the unique records i.e not the same date integer twice which has been occuring.

Does anyone know how to use the Microsoft Query application in Get Data of Excel to only pull unique records?

View, Query Properties, Unique Values Only.

Jamie.

--
 
Top