firefly2k8
Registered User.
- Local time
- Today, 09:39
- Joined
- Nov 18, 2010
- Messages
- 48
I have a table with a string field, call it String1 and a date field, call it Date1.
I want my SQL query to return all unique instances of String1&Date1.
I think i might have this with:
However also in the table is String2, and String3. I want unique instances of String2&Date1 and String3&Date1 that are not already in the result of my String1*Date1 query to be added to the result.
I am still not thinking in SQL/Access terms, so imagine you are in excel. Here I would create 3 columns for identifiers: string1&date1, string2&date1, string3&date1. Then I would copy the identifiers and stack them in one column. Then I would filter for unique indentifiers.
I was hoping the power of Access SQL would mean i wouldnt have to create columns in my table for identifiers.
Anyone feeling brainy this morning?
I want my SQL query to return all unique instances of String1&Date1.
I think i might have this with:
Code:
SELECT DISTINCT [String1] & [Date1] AS Expr1
FROM [Project Table 1];
However also in the table is String2, and String3. I want unique instances of String2&Date1 and String3&Date1 that are not already in the result of my String1*Date1 query to be added to the result.
I am still not thinking in SQL/Access terms, so imagine you are in excel. Here I would create 3 columns for identifiers: string1&date1, string2&date1, string3&date1. Then I would copy the identifiers and stack them in one column. Then I would filter for unique indentifiers.
I was hoping the power of Access SQL would mean i wouldnt have to create columns in my table for identifiers.
Anyone feeling brainy this morning?