D
dave.mclachlan
Hi there gurus,
I have a link table using a named ranged from an excel sheet. This
sheet has data in a specific order (not sorted).
Ive created a query that mines other data in my database based on the
data in the link table, however, the query sorts the output even though
I have no sort fields.
Row for row I want data that lines up with my linked table as I'd like
to use 'Import external data' in excel to retrieve the data next to the
original.
am not sure ive explained this very well, i esentially just want the
data in the same order as the data in my linked table...
I know access has problems with sort orders in linked tables, so I
tried replicating the data in a simple query (which worked, the order
is unchanged) and use that as the source for my data instead of the
linked table.... the result was just the same!
Am flummuxed...
any help would be appreciated... below is the SQL if it helps
anybody...
FY07BasedataGIDs is my linked table.
R12m Flows Data is my data id like to align.
SELECT FY07BasedataGIDs.Account, [R12m Flows Data].[Sold to Party],
[R12m Flows Data].[Sold to Party Name], FY07BasedataSoldto.[House and
Street Num], FY07BasedataSoldto.[City / Town],
FY07BasedataSoldto.[St/Pv/Co], FY07BasedataSoldto.[Post/Zip],
FY07BasedataSoldto.[Postcode Regions], FY07BasedataSoldto.[Primary
Exec], FY07BasedataSoldto.[Manager Position],
FY07BasedataSoldto.[Business Group], FY07BasedataSoldto.[CMS Parent],
FY07BasedataSoldto.[CMS Parent Name], FY07BasedataSoldto.[Reporting
Grandparent Name], ClosedLocations.Pending_Clos_Date,
ClosedLocations.Final_Closure, Sum([R12m Flows Data].[Fiscal
R12mClosing Balance]) AS [SumOfFiscal R12mClosing Balance]
FROM ((FY07BasedataGIDs LEFT JOIN ClosedLocations ON
FY07BasedataGIDs.Account = ClosedLocations.Customer_GId) LEFT JOIN
[R12m Flows Data] ON FY07BasedataGIDs.Account = [R12m Flows
Data].Account) LEFT JOIN FY07BasedataSoldto ON [R12m Flows Data].[Sold
to Party] = FY07BasedataSoldto.Account
GROUP BY FY07BasedataGIDs.Account, [R12m Flows Data].[Sold to Party],
[R12m Flows Data].[Sold to Party Name], FY07BasedataSoldto.[House and
Street Num], FY07BasedataSoldto.[City / Town],
FY07BasedataSoldto.[St/Pv/Co], FY07BasedataSoldto.[Post/Zip],
FY07BasedataSoldto.[Postcode Regions], FY07BasedataSoldto.[Primary
Exec], FY07BasedataSoldto.[Manager Position],
FY07BasedataSoldto.[Business Group], FY07BasedataSoldto.[CMS Parent],
FY07BasedataSoldto.[CMS Parent Name], FY07BasedataSoldto.[Reporting
Grandparent Name], ClosedLocations.Pending_Clos_Date,
ClosedLocations.Final_Closure, [R12m Flows Data].[Generic Material]
HAVING ((([R12m Flows Data].[Generic Material])="1"));
I have a link table using a named ranged from an excel sheet. This
sheet has data in a specific order (not sorted).
Ive created a query that mines other data in my database based on the
data in the link table, however, the query sorts the output even though
I have no sort fields.
Row for row I want data that lines up with my linked table as I'd like
to use 'Import external data' in excel to retrieve the data next to the
original.
am not sure ive explained this very well, i esentially just want the
data in the same order as the data in my linked table...
I know access has problems with sort orders in linked tables, so I
tried replicating the data in a simple query (which worked, the order
is unchanged) and use that as the source for my data instead of the
linked table.... the result was just the same!
Am flummuxed...
any help would be appreciated... below is the SQL if it helps
anybody...
FY07BasedataGIDs is my linked table.
R12m Flows Data is my data id like to align.
SELECT FY07BasedataGIDs.Account, [R12m Flows Data].[Sold to Party],
[R12m Flows Data].[Sold to Party Name], FY07BasedataSoldto.[House and
Street Num], FY07BasedataSoldto.[City / Town],
FY07BasedataSoldto.[St/Pv/Co], FY07BasedataSoldto.[Post/Zip],
FY07BasedataSoldto.[Postcode Regions], FY07BasedataSoldto.[Primary
Exec], FY07BasedataSoldto.[Manager Position],
FY07BasedataSoldto.[Business Group], FY07BasedataSoldto.[CMS Parent],
FY07BasedataSoldto.[CMS Parent Name], FY07BasedataSoldto.[Reporting
Grandparent Name], ClosedLocations.Pending_Clos_Date,
ClosedLocations.Final_Closure, Sum([R12m Flows Data].[Fiscal
R12mClosing Balance]) AS [SumOfFiscal R12mClosing Balance]
FROM ((FY07BasedataGIDs LEFT JOIN ClosedLocations ON
FY07BasedataGIDs.Account = ClosedLocations.Customer_GId) LEFT JOIN
[R12m Flows Data] ON FY07BasedataGIDs.Account = [R12m Flows
Data].Account) LEFT JOIN FY07BasedataSoldto ON [R12m Flows Data].[Sold
to Party] = FY07BasedataSoldto.Account
GROUP BY FY07BasedataGIDs.Account, [R12m Flows Data].[Sold to Party],
[R12m Flows Data].[Sold to Party Name], FY07BasedataSoldto.[House and
Street Num], FY07BasedataSoldto.[City / Town],
FY07BasedataSoldto.[St/Pv/Co], FY07BasedataSoldto.[Post/Zip],
FY07BasedataSoldto.[Postcode Regions], FY07BasedataSoldto.[Primary
Exec], FY07BasedataSoldto.[Manager Position],
FY07BasedataSoldto.[Business Group], FY07BasedataSoldto.[CMS Parent],
FY07BasedataSoldto.[CMS Parent Name], FY07BasedataSoldto.[Reporting
Grandparent Name], ClosedLocations.Pending_Clos_Date,
ClosedLocations.Final_Closure, [R12m Flows Data].[Generic Material]
HAVING ((([R12m Flows Data].[Generic Material])="1"));