Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

# in Column Name - within Query

Posted on 2014-04-12
9
Medium Priority
?
447 Views
Last Modified: 2014-04-12
Hello All,

There are several joined tables and I created a query that joins them and pulls data with new column headers. One column (old name : NumOfP) gets renamed as [# of P] in that query.

When I try to extract that query into excel via right clicking, I see that the result excel file has the column name as [. of P] not [# of P] - why is that....and cant this be fixed so that the extract pulls the column names as desired
0
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 

Author Comment

by:Rayne
ID: 39996849
thank you
0
 

Author Comment

by:Rayne
ID: 39996850
also if i vba it so that the query results from access, gets dumped directly in a separate excel file - will the above issue still persists?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39996876
I don't know the exact answer to your question but you are doing two things that I would never do.  #1. putting symbols/punctuation in column names.  #2. putting spaces in column names.  In other databases like MySQL or Microsoft SQL Server, those would cause you problems.
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39996879
'identifier' rules for Microsoft SQL Server http://technet.microsoft.com/en-us/library/ms175874.aspx  and for MySQL http://dev.mysql.com/doc/refman/5.6/en/identifiers.html  You might be able to use names that are not strictly alphanumeric and/or include spaces if you quote them.  Otherwise you are usually restricted to alphanumeric like [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore) .
0
 

Author Comment

by:Rayne
ID: 39996890
Hello Dave,

I think you misunderstood. I am following all the proper naming conventions (no spaces, no # etc)  for column names within the actual table. So that's not an issue.


When my query pulls in the data, one of the fields from a table needs to have [# of P] as the extract column....do you get it?
0
 

Author Comment

by:Rayne
ID: 39996891
its for readibility for the end users
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 39996893
But it's still a column name in your output results so it is an issue.  I don't think you can do that while you are still in Access (or any other database).  If you can extract the data with VBA, you can have VBA name the display whatever you want.
0
 

Author Comment

by:Rayne
ID: 39996904
Hmm, good call - totally forgot :(
Thank you Sire for your kindness
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39996948
You're welcome, glad to help.
0

Featured Post

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question