Column headings in SQL (1 Viewer)

JPFred

Registered User.
Local time
Today, 13:11
Joined
Oct 29, 2017
Messages
47
I have written an sql query (below) and need to have a user friendly column heading displayed with each field. I a retired senior programmer analyst and have been retired for 10 years. I know there is something I have forgot to accomplish my issue. Any help will be appreciated.


Code:
SELECT accession, spineselect, deweynum, checkedoutby, gradelevel, title, checkedoutdate, duedate, gradelevel
FROM main
WHERE duedate < date() and late = "Yes"
ORDER BY gradelevel, checkedoutby, duedate;
 

June7

AWF VIP
Local time
Today, 09:11
Joined
Mar 9, 2014
Messages
5,475
Why? Users should not work directly with tables and queries so doesn't matter what the field names are. Build a form or report and use whatever text you want in labels.

Are you exporting to Excel?

Use alias:

SELECT accession AS [This Is Alias FieldName], ...
 

CJ_London

Super Moderator
Staff member
Local time
Today, 18:11
Joined
Feb 19, 2013
Messages
16,618
if you are using the access tables, you can use the field caption property. However this can be confusing (same as lookups) when looking at the result whilst still developing queries- but will autopopulate labels when they are created.

A mixed blessing. I still advocate them as a device you can use once tables/relationships have been created but before building forms/reports. Better than having spaces in field names, but otherwise agree with June
 

Users who are viewing this thread

Top Bottom