Query Formatting (1 Viewer)

cosmarchy

Registered User.
Local time
Yesterday, 17:41
Joined
Jan 19, 2010
Messages
116
Hi,

I've a couple of questions regarding the formatting of query results...

The first is how do you justify the columns? I'd like to center justify some of the columns for ease of reading however the justification buttons are greyed out.

The second is to do with the ordering of numbers. The query returns a numerical value in descending order but the order is a little weird in that they come out like this:
6441
6184
5775
5060
20995
20994

Clearly 20994 is greater than 6441 so I suspect is seeing the first digit of 6 as being greater than 2. Is there a fix for this?

Thanks
 

June7

AWF VIP
Local time
Yesterday, 16:41
Joined
Mar 9, 2014
Messages
5,466
Build a report.

Your data is text so alpha sorting applies - one character at a time. 2 comes before 6 ascending and 6 before 2 descending. Either convert the field to number type or use intrinsic functions to modify the value in query. Val() function will convert to numeric.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:41
Joined
Feb 19, 2002
Messages
43,233
Tables are used to store data. Queries are used to get and manipulate data. Forms and reports are used to display data. If you want to display data, use a report.
Is your numeric value stored in a numeric data type? If not, it will sort like a string as June described. If it is stored as a numeric data type, perhaps you have done some formatting in the query or used a function that has turned the data into a string so it looses its numeric property.
 

Users who are viewing this thread

Top Bottom