|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
reformatting output from a query
Hey everyone,
as of now i have a sql chunk Code:
SELECT VIEW.DWG_NAME FROM VIEW, qry_TURNOVER WHERE (((VIEW.ID)=[qry_TURNOVER].[CURRENT_ID])); which works but when i get the results it orders them according to number ( or what seems to be in the order of ID), and i need it in the order that it appears in the column CURRENT_ID If that is not clear This is what is happening For example, we have: qry_TURNOVER CURRENT_ID 4 5 1 3 VIEW ID DWG_NAME 1 23g 2 24H 3 25J 4 26K 5 27L As it stands,The results auto format to: 23G 25H 26K 27L I need the results to be: 26k 27L 23G 25J Hope that was clear, any ideas? Im not sure if this is even possible. Any hints or tips to a solution would be much appreciated. The reason why current ID is unordered is because its has other data in its table that is ordered via that way. So current ID cannot be orderd to match out out, it must be the other way around. Thanks Doc |
|
#2
|
|||
|
|||
|
given just what you posted, I don't think it can be done. Since the currentID in qry_turnover is ordered based on other data in the rs, then that data is key in ordering the DWG_Name field. post the tables and your entire qry, then we can get you rolling I believe, unless there's someone else that can chime in w/your solution.
|
|
#3
|
|||
|
|||
|
You are right,I dont think its possible either. Im going to re structure things and see if that helps out. If i run into problems ill re-post. Thanks for your help.
Doc Quote:
|
|
#4
|
|||
|
|||
|
I didn't mean to imply that globally it was not possible, I do believe it is, I just need to see the entire query and the tables involved. A solution is definitely possible, just not w/the limited stuff you provided. If you want to post the rest of the stuff we may be able to get you rolling.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > reformatting output from a query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|