Set Query caption through SELECT statement

i have the following SELECT statement....

"SELECT PurchaseOrders_Detail.Product_ID, PurchaseOrders_Detail.Name, PurchaseOrders_Detail.Book_Price FROM ......etc.

This statement is being set in a list and will fetch the data from a query.
I want to have the fields, like Product_ID, Name, Book_Price.. appear with my own headings in the list.

Right now they appear as is... Product_ID etc. and there is no caption set in the query or the table so the the raw field name is displayed in the heading.

How can I set my own caption (heading name) by passing a SELECT statement to a list.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

bradleys40Connect With a Mentor Commented:
use the "as"

SELECT PurchaseOrders_Detail.Product_ID as "name", PurchaseOrders_Detail.Name, PurchaseOrders_Detail.Book_Price FROM ......etc.
TimCotteeConnect With a Mentor Commented:
"SELECT PurchaseOrders_Detail.Product_ID As [My New Heading 1], PurchaseOrders_Detail.Name As [My New Heading 2], PurchaseOrders_Detail.Book_Price As [My New Heading 3] FROM ......etc.

For example.
bradleys40Connect With a Mentor Commented:
SELECT PurchaseOrders_Detail.Product_ID as "product", PurchaseOrders_Detail.Name as "name", PurchaseOrders_Detail.Book_Price FROM
InterCrownTechAuthor Commented:
That's great. Thanks..... BTW - is the a limit to the number of AS commands you can have.... because i have around 15 fields.... and it seams to only work with 6...
All Courses

From novice to tech pro — start learning today.