Go to Google Groups Home    microsoft.public.excel.querydao
External data source / MS Query Command Text

Allen_N <all...@discussions.microsoft.com>

When I Refresh the data source (which is a view in an Access ADP) the columns
are returned to my spreadsheet in the wrong order.

By default, the Command Text window contains simply:

   "Availability"."dbo"."vwShortagesByItem"

I tried changing Command Type to 'SQL' and entering:

   SELECT  ItemNo, Description, Commodity_Group, Nat_Rank, Avg_Cost,
   Net_Ordered, Net_Supplied, Net_Shortage, Occurences, Branches,
   Customers  FROM  Availability.dbo.vwShortagesByItem

but the columns are returned in the order:

   ItemNo, Commodity_Group, Nat_Rank, Avg_Cost, Net_Ordered, Net_Supplied,
   Net_Shortage, Occurences, Branches, Customers, Description

Thanks!