SQL changing column order when put into Excel

Annie S

New Member
Joined
Oct 30, 2005
Messages
25
The code below shows the correct order of information that is going into excel.
However when tranferred to actual workspace the last two columns are moved in 3 columns to the left.

This information is coming from an Access Table which is showing in the same order as the columns below.

Any suggestions. Thanks:)




SELECT `System Balance table for Excel`.Year, `System Balance table for Excel`.`Fiscal Month`, `System Balance table for Excel`.Month, `System Balance table for Excel`.storenum, `System Balance table for Excel`.sbdate, `System Balance table for Excel`.netsales, `System Balance table for Excel`.overshort, `System Balance table for Excel`.avgticketcust, `System Balance table for Excel`.disccount, `System Balance table for Excel`.custcount, `System Balance table for Excel`.transvoidttl, `System Balance table for Excel`.refundcount, `System Balance table for Excel`.refundttl, `System Balance table for Excel`.Donors, `System Balance table for Excel`.`Z-Racks`, `System Balance table for Excel`.Carts, `System Balance table for Excel`.`Cash Donations`, `System Balance table for Excel`.totaldiscounts
FROM `C:\ArgisCentral\Database\Argis Retail Database`.`System Balance table for Excel` `System Balance table for Excel`
 
Did Mark's suggestion fix it? Sounds like it should have...

That is a new one to me, Mark, and I might have use for it. Thank you, Mark.

(FWIW, I am not familiar with bringing data in from Access. However, I have encountered similar situations within Excel using query tables. I have found that manually moving the columns in Excel to the correct order has overcome such a problem for future times when the query is refreshed. Fazza)
 
Upvote 0
I know I am coming late to the party on this post and topic, but this couldn't have been more helpful. I had the same problem and after attempting to adjust the SQL statement, etc. this simple solution has solved the problem. Thank you.
 
Upvote 0
Coming towards the end of 2021 (over 15 years) and this post is still helpful. Thanks sorted my issue.
 
Upvote 0

Forum statistics

Threads
1,226,878
Messages
6,193,464
Members
453,802
Latest member
SarahNoob

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top