SofiaMaria
Technical User
Hi there,
I have a database where I want several fields to be distinct and I managed to get that working fine, however I still get several release dates for the same version number of a product. I want to have only the most recent date to be returned though.
SELECT DISTINCT [K1k3 licenses].SITE_ID, [K1k3 licenses].CO_NAME, [K1k3 licenses].PROD_NAME, [K1k3 licenses].PROD_RELEASE, [K1k3 licenses].SUPP_EFFECTIVE_DATE
FROM [K1k3 licenses];
I know it must be possible and I have tried to get it working for the past 3 days.
I tried to create a view and then I could rejoin that with the original table, but I still don't know how I can compare the dates to select the most recent one
CREATE VIEW query1 AS
SELECT DISTINCT [K1k3 licenses].SITE_ID, [K1k3 licenses].CO_NAME, [K1k3 licenses].PROD_NAME, [K1k3 licenses].PROD_RELEASE
FROM [K1k3 licenses];
Any help would be much appreciated,
Sofia
I have a database where I want several fields to be distinct and I managed to get that working fine, however I still get several release dates for the same version number of a product. I want to have only the most recent date to be returned though.
SELECT DISTINCT [K1k3 licenses].SITE_ID, [K1k3 licenses].CO_NAME, [K1k3 licenses].PROD_NAME, [K1k3 licenses].PROD_RELEASE, [K1k3 licenses].SUPP_EFFECTIVE_DATE
FROM [K1k3 licenses];
I know it must be possible and I have tried to get it working for the past 3 days.
I tried to create a view and then I could rejoin that with the original table, but I still don't know how I can compare the dates to select the most recent one
CREATE VIEW query1 AS
SELECT DISTINCT [K1k3 licenses].SITE_ID, [K1k3 licenses].CO_NAME, [K1k3 licenses].PROD_NAME, [K1k3 licenses].PROD_RELEASE
FROM [K1k3 licenses];
Any help would be much appreciated,
Sofia