Question
Wesley West · Aug 26

Changing the order of SQL Fields

Hello! I am currently creating a class for a small error trap. I have it working and all is good but I really want to change the order of the fields in the SQL return from Alphabetical to something else.  

 

The current Order is ID, ActionType, ErrorCount, ErrorDetails, Model, ResultCode, ResultMessage, Stock and Yard

I would really like for the field order to be ID, Yard, Stock, Model, etc.

Example of current order,  

Is this possible?

Thanks in advance!!

Product version: Caché 2017.1
0
0 66
Discussion (2)1
Log in or sign up to continue

I figured it out,  [ SqlColumnNumber = 7 ] will rearrange the order of fields..

Sounds like you're writing SELECT * queries. While fine for debugging or development, remember to always explicitly specify the list of columns in actual production queries.