Eliminating Repeating Rows

dungstar

Registered User.
Local time
Today, 00:33
Joined
Mar 13, 2002
Messages
72
This sounds like a simple one, but I can't get it to work.

I'm trying to figure out how to modify a table with repeating rows, so there are none.
I tried to create a SQL Query that looks like this

SELECT DISTINCTROW *
FROM Table;

The resulting has no apparent filter effect on the table. I'm not to familiar with the distinctrow command, I suppose.

Here's some sample data:

Col1 Col2 Col3
1 1 1
1 1 1
1 1 2
1 1 2
1 2 1
2 1 1
2 1 2
2 1 2

Desired results:
1 1 1
1 1 2
1 2 1
2 1 1
2 1 2
 
I found a solution to my own problem
Ok this is what I did
SELECT DISTINCTROW Col1 & Col2 & Col3, *
FROM Table;
This gave me an Expression field that is unique to each column.
I turned that into a table and ran a SELECT DISTINCT on the new field.

If you know of a much simpler alternative method, please let me know. Thanks.
 

Users who are viewing this thread

Back
Top Bottom