Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change column names for reporting

Status
Not open for further replies.

samyers

Technical User
Mar 15, 2007
15
US
I'm doing a data pull from an Oracle db to a .csv that I then import into Access. One field is a date; it's formatted in the table as mmddyyyy but I want to pull it as mmyyyy. I have this in my query as

SELECT to_char(d.posted_dt,'MMYYYY')

which works, but the column name then appears as the whole expression " to_char(d.posted_dt,'MMYYYY') "

I'd like the column name to appear as "Post Date" or similar. How can I do this?

Thanks

 

Try:
Code:
SELECT  to_char(d.posted_dt,'MMYYYY') "Date Posted"
[3eyes]



----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Boy, that was easy. For some reason I couldn't find it in any of the refs I checked. Thanks!
 
Easy when you know how! Samyers - the purple stars are there for a reason you know ;-)

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top