Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > BOOK: Excel 2003 VBA Programmer's Reference
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Excel 2003 VBA Programmer's Reference
This is the forum to discuss the Wrox book Excel 2003 VBA Programmer's Reference by Paul T. Kimmel, Stephen Bullen, John Green, Rob Bovey, Robert Rosenberg, Brian Patterson; ISBN: 9780764556609
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Excel 2003 VBA Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 19th, 2010, 01:02 PM
rgi rgi is offline
Registered User
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Syntax for SQL with Date as Column Label?

When I write a SQL statement to query an Excel Table that includes Cells with dates as the Labels (e.g. 1/1/2010, 2/1/2010, etc.) the SQL does not work.

Example: SELECT [Period], [Project], [Category], [1/1/2010]
FROM [M1XNQ_Summary]$ ;

I have tried # symbols, single quotes and double quotes.

Final answer?

BTW - I own the above book and use it daily! Love it!

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old September 14th, 2010, 04:01 AM
Friend of Wrox
Points: 689, Level: 9
Points: 689, Level: 9 Points: 689, Level: 9 Points: 689, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Posts: 171
Thanks: 0
Thanked 14 Times in 14 Posts
Default Don't do it, lol

I'm no expert at vba, but i've learned two things: 1, No special symbols in column headers, and 2, make it all one word. Basically, name your column headers with the same rules that apply to naming variables in vba, I.E. start them with a letter, alphanumeric characters only, no spaces.

Also, be careful with putting an apostrophe (') in any data you'll be using sql on, totally botches up the works.
Reply With Quote
Reply


Thread Tools
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 Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change pivot tables column label rhawk204 Excel VBA 0 December 23rd, 2009 10:26 AM
Converting Label.caption as Date value devilz Beginning VB 6 2 March 5th, 2009 04:55 AM
comparing date column with sql server mallikalapati ASP.NET 2.0 Professional 3 March 12th, 2008 07:06 PM
Date Format Syntax inspiron VB.NET 2002/2003 Basics 1 November 14th, 2006 03:55 PM
SQL Server date column and ASP treadmill SQL Server 2000 1 July 7th, 2003 09:51 AM



All times are GMT -4. The time now is 06:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.