Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display order of Bar Chart | Charts and Charting in Excel | |||
MS Query refreshing in order | Excel Programming | |||
Pivot row order query | Excel Programming | |||
display msgbox in order or one after the other | Excel Programming | |||
chart display order | Charts and Charting in Excel |