Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default How to display columns in the right order from a SQL DB query

I am using a universal SQL editor and when I get the results from my DB query
using that tool, the columns are in the correct order in which I have placed
them.

However when I use the same SQL query in Excel and the data is displayed the
columns are in the wrong order.

Any suggestions

--
Neall
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 180
Default How to display columns in the right order from a SQL DB query

This is very little infor to answer. I need to know the SQL you are using,
however try using the actual column names instead of * in your SELECT
statement.

--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Neall" wrote:

I am using a universal SQL editor and when I get the results from my DB query
using that tool, the columns are in the correct order in which I have placed
them.

However when I use the same SQL query in Excel and the data is displayed the
columns are in the wrong order.

Any suggestions

--
Neall

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default How to display columns in the right order from a SQL DB query

Here is and example of what I am doing

SELECT
XXX.DAYSOPEN "XXX AGE",
XXX.PM "XXX #",
XXX.BNO,
XXX.CNO,
XXX.SEVERITY"SEV",
XXX.CUST "CUSTOMER",
XXX.PROD "PROD",
FROM
AAAAA.XXX AS XXX

LEFT JOIN SER.DIS AS DIS (took out some of the join info)

LEFT JOIN SER.XXX AS LXXX (took out some of the join info)

WHERE XXX.STAT = 'O' AND
XXX.PRODID IN ('VVVV', 'BBBB', 'CCCC')


ORDER BY XXX.DAYSOPEN DESC

Again all the information is retrieved correctly but the order in which I
have the select statement does not come back the same order
--
Neall


"Pranav Vaidya" wrote:

This is very little infor to answer. I need to know the SQL you are using,
however try using the actual column names instead of * in your SELECT
statement.

--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Neall" wrote:

I am using a universal SQL editor and when I get the results from my DB query
using that tool, the columns are in the correct order in which I have placed
them.

However when I use the same SQL query in Excel and the data is displayed the
columns are in the wrong order.

Any suggestions

--
Neall

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default How to display columns in the right order from a SQL DB query

How are you displaying the returned info in excel ??

Tim

"Neall" wrote in message
...
Here is and example of what I am doing

SELECT
XXX.DAYSOPEN "XXX AGE",
XXX.PM "XXX #",
XXX.BNO,
XXX.CNO,
XXX.SEVERITY"SEV",
XXX.CUST "CUSTOMER",
XXX.PROD "PROD",
FROM
AAAAA.XXX AS XXX

LEFT JOIN SER.DIS AS DIS (took out some of the join info)

LEFT JOIN SER.XXX AS LXXX (took out some of the join info)

WHERE XXX.STAT = 'O' AND
XXX.PRODID IN ('VVVV', 'BBBB', 'CCCC')


ORDER BY XXX.DAYSOPEN DESC

Again all the information is retrieved correctly but the order in which I
have the select statement does not come back the same order
--
Neall


"Pranav Vaidya" wrote:

This is very little infor to answer. I need to know the SQL you are
using,
however try using the actual column names instead of * in your SELECT
statement.

--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Neall" wrote:

I am using a universal SQL editor and when I get the results from my DB
query
using that tool, the columns are in the correct order in which I have
placed
them.

However when I use the same SQL query in Excel and the data is
displayed the
columns are in the wrong order.

Any suggestions

--
Neall



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default How to display columns in the right order from a SQL DB query

Thanks for responding, I figured out the issue, now onto my next post.

Thanks again
--
Neall


"Tim Williams" wrote:

How are you displaying the returned info in excel ??

Tim

"Neall" wrote in message
...
Here is and example of what I am doing

SELECT
XXX.DAYSOPEN "XXX AGE",
XXX.PM "XXX #",
XXX.BNO,
XXX.CNO,
XXX.SEVERITY"SEV",
XXX.CUST "CUSTOMER",
XXX.PROD "PROD",
FROM
AAAAA.XXX AS XXX

LEFT JOIN SER.DIS AS DIS (took out some of the join info)

LEFT JOIN SER.XXX AS LXXX (took out some of the join info)

WHERE XXX.STAT = 'O' AND
XXX.PRODID IN ('VVVV', 'BBBB', 'CCCC')


ORDER BY XXX.DAYSOPEN DESC

Again all the information is retrieved correctly but the order in which I
have the select statement does not come back the same order
--
Neall


"Pranav Vaidya" wrote:

This is very little infor to answer. I need to know the SQL you are
using,
however try using the actual column names instead of * in your SELECT
statement.

--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Neall" wrote:

I am using a universal SQL editor and when I get the results from my DB
query
using that tool, the columns are in the correct order in which I have
placed
them.

However when I use the same SQL query in Excel and the data is
displayed the
columns are in the wrong order.

Any suggestions

--
Neall




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display order of Bar Chart Bar Chart Vertical Display Order Charts and Charting in Excel 2 March 24th 09 02:47 AM
MS Query refreshing in order billybob Excel Programming 3 September 6th 06 04:05 PM
Pivot row order query AmyTaylor[_44_] Excel Programming 3 March 3rd 06 01:05 PM
display msgbox in order or one after the other harpscardiff[_5_] Excel Programming 1 October 20th 05 04:40 PM
chart display order Guy H via OfficeKB.com Charts and Charting in Excel 6 July 15th 05 12:32 AM


All times are GMT +1. The time now is 02:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"