I need to make all the records in the new ExportedSMAll distinct – (as each entrance for the same story should have different category2).
I’m not able to make up a statement that lists all the entries needed.
What I want is a set of results as listed by any of the 2 queries below but with all of the columns:
select distinct ref, Category2
from ExportedSMAll
order by ref
SELECT ref, Category2
FROM ExportedSMAll
group by ref, Category2
order by ref
Another words something like this:
SELECT *
FROM ExportedSMAll
group by ref, Category2
order by ref
This of course has incorrect syntax though.
I many of the other fields are text so I can't do Distinct on the whole table (as it results in an error - saying that Distinct can't be run on Text fields)
The table is like this:
ref title dated author summary article Category2
It contains multiple copies or each article with many different categories (Category2) the problem is that Category2 needs to me unique - but it's not at the moment. There is no other unique field at the moment.
If I can't do it like that I'll do it on the application level but would rather avoid that.
I’d really appreciate your help.
Thanks
I’m not able to make up a statement that lists all the entries needed.
What I want is a set of results as listed by any of the 2 queries below but with all of the columns:
select distinct ref, Category2
from ExportedSMAll
order by ref
SELECT ref, Category2
FROM ExportedSMAll
group by ref, Category2
order by ref
Another words something like this:
SELECT *
FROM ExportedSMAll
group by ref, Category2
order by ref
This of course has incorrect syntax though.
I many of the other fields are text so I can't do Distinct on the whole table (as it results in an error - saying that Distinct can't be run on Text fields)
The table is like this:
ref title dated author summary article Category2
It contains multiple copies or each article with many different categories (Category2) the problem is that Category2 needs to me unique - but it's not at the moment. There is no other unique field at the moment.
If I can't do it like that I'll do it on the application level but would rather avoid that.
I’d really appreciate your help.
Thanks