Not sure if I am over/under thinking this.
I have a table:
OWNED_GUID OWNER_GUID FRACT_OWNED EFFECTIVE_DATE X_UPDATED
{D4662394-8B75-4FD4-BE31-4F1A7DF616AB} {6DDEA9E6-2493-49C8-BD02-A88F9684459D} 100.00% 01-May-09 15-Feb-10
{25EA6970-8EAA-4B8D-99D6-DDA1E74F9422} {9C229A6B-91AF-499C-85D8-8F4A739F741C} 100.00% 01-Aug-09 15-Feb-10
{D4662394-8B75-4FD4-BE31-4F1A7DF616AB} {1AEA51FA-9F41-4E3E-B817-E4C27C7FFE29} 100.00% 01-Oct-09 15-Feb-10
{D4662394-8B75-4FD4-BE31-4F1A7DF616AB} {9C229A6B-91AF-499C-85D8-8F4A739F741C} 100.00% 01-Jan-09 15-Feb-10
{D4662394-8B75-4FD4-BE31-4F1A7DF616AB} {1AEA51FA-9F41-4E3E-B817-E4C27C7FFE29} 100.00% 01-Aug-09 15-Feb-10
{25EA6970-8EAA-4B8D-99D6-DDA1E74F9422} {FB12DC9E-2BD2-4ED5-98F6-61EB005138AB} 100.00% 01-Apr-09 15-Feb-10
{25EA6970-8EAA-4B8D-99D6-DDA1E74F9422} {BDF65DDD-B65F-46DC-ACE5-84C397448B2C} 100.00% 01-Jan-09 15-Feb-10
I need to get one record based on an effective date.
I am trying the following query, but it will not display the OWNER_GUID. It will display the non-GUID fields.
SELECT WNED_GUID, (SELECT TOP 1 o2.OWNER_GUID FROM OWNER o2 where WNED_GUID = o2.OWNED_GUID and ( o2.EFFECTIVE_DATE < #12/30/2009# or o2.EFFECTIVE_DATE is null) order by o2.EFFECTIVE_DATE DESC) AS OWNER_GUID
FROM OWNER AS o
GROUP BY WNED_GUID;
Is there something about not displaying GUIDs from a sub-query?
I am using Access 2003.
Thanks in advance.
I have a table:
OWNED_GUID OWNER_GUID FRACT_OWNED EFFECTIVE_DATE X_UPDATED
{D4662394-8B75-4FD4-BE31-4F1A7DF616AB} {6DDEA9E6-2493-49C8-BD02-A88F9684459D} 100.00% 01-May-09 15-Feb-10
{25EA6970-8EAA-4B8D-99D6-DDA1E74F9422} {9C229A6B-91AF-499C-85D8-8F4A739F741C} 100.00% 01-Aug-09 15-Feb-10
{D4662394-8B75-4FD4-BE31-4F1A7DF616AB} {1AEA51FA-9F41-4E3E-B817-E4C27C7FFE29} 100.00% 01-Oct-09 15-Feb-10
{D4662394-8B75-4FD4-BE31-4F1A7DF616AB} {9C229A6B-91AF-499C-85D8-8F4A739F741C} 100.00% 01-Jan-09 15-Feb-10
{D4662394-8B75-4FD4-BE31-4F1A7DF616AB} {1AEA51FA-9F41-4E3E-B817-E4C27C7FFE29} 100.00% 01-Aug-09 15-Feb-10
{25EA6970-8EAA-4B8D-99D6-DDA1E74F9422} {FB12DC9E-2BD2-4ED5-98F6-61EB005138AB} 100.00% 01-Apr-09 15-Feb-10
{25EA6970-8EAA-4B8D-99D6-DDA1E74F9422} {BDF65DDD-B65F-46DC-ACE5-84C397448B2C} 100.00% 01-Jan-09 15-Feb-10
I need to get one record based on an effective date.
I am trying the following query, but it will not display the OWNER_GUID. It will display the non-GUID fields.
SELECT WNED_GUID, (SELECT TOP 1 o2.OWNER_GUID FROM OWNER o2 where WNED_GUID = o2.OWNED_GUID and ( o2.EFFECTIVE_DATE < #12/30/2009# or o2.EFFECTIVE_DATE is null) order by o2.EFFECTIVE_DATE DESC) AS OWNER_GUID
FROM OWNER AS o
GROUP BY WNED_GUID;
Is there something about not displaying GUIDs from a sub-query?
I am using Access 2003.
Thanks in advance.