Bunch's Blog

One day I'll have a catchy subtitle, one day
posts - 77, comments - 89, trackbacks - 0

My Links

News

Tag Cloud

Archives

Green

Database Columns With Spaces

Why do you always forget the little things? I try to account for what users may do when using an application and add in checks and validation where I can. But something I don’t have to do a whole lot is to upload a user created Access database to our SQL Server. In my case it was a smaller Access database with just one table that I could use as some initial data for a new app. I already had a DSN setup and the Upsizing Wizard in Access actually worked pretty good to get the table structure and data up to our larger SQL database. I did have to install Access 2007 since the user used the newfangled accdb format.

 However once the data was up there I saw that she had used column names with spaces. I couldn’t remember the last time I did that. The little dilemma was writing a query to move the uploaded data from its new SQL table to the nice organized and clean tables I wrote. The solution was simple, just use [] around the column names.

 SELECT [Column One], [Column Two] FROM tblAccessData

Technorati Tags:
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Tuesday, May 27, 2008 2:50 PM |

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: