If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Spaces in column title

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-04-12, 14:15
DavidKi DavidKi is offline
Registered User
 
Join Date: Jan 2012
Posts: 7
Spaces in column title

Good day,

I have several columns that have spaces before and after the titles. Example, " NAME_FIRST" or "NAME_LAST ". Number of spaces can be different every week, its imported from outside source. I can't change column titles. However, I need to SELECT * from these columns ignoring spaces.
Reply With Quote
  #2 (permalink)  
Old 01-05-12, 04:43
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
This seems very unusual. When you import data having leading or trailing spaces in the column names, Access removes them. And if you try to create a table with such column names Access pops an error message (see attachment).

Theorically you could issue SQL DML statements to change the column names or dynamically create queries based on the columns ordinal position (if this does not change).
Attached Thumbnails
Spaces in column title-screenshot001.jpg  
__________________
Have a nice day!
Reply With Quote
  #3 (permalink)  
Old 01-06-12, 13:30
DavidKi DavidKi is offline
Registered User
 
Join Date: Jan 2012
Posts: 7
Inserting table name fixed the problem.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On