SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2000
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Data from Excel using SQL and ODBC

    I'm trying to get data from Excel using SQL and ODBC and the method described by James Soderborg from Segue.

    I get a syntax error on the SQL statement. I assume the article is out of date.

    I have no idea of the correct syntax for accessing Excel using SQL. Anyone know how to do this or where to find this information ?

    Thanks,
    Nir Gilboa.
    assetplanner.com

  2. #2
    Junior Member
    Join Date
    May 2000
    Location
    Burlington, MA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Data from Excel using SQL and ODBC

    Try getting rid of one of the 'Sheet1$'s. The format for a select statement is
    SELECT column_name FROM table_name

    ------------------
    Kevin Gehrke
    kgehrke@wiredempire.com www.wiredempire.com

    [This message has been edited by Kevin Gehrke (edited 07-19-2000).]

  3. #3
    Guest

    Re: Data from Excel using SQL and ODBC

    I think I know what the problem is. It looks as if you are using single quotes in your SQL statement. If so, those should be changed to accent mark (located on the same key as the tilda).


  4. #4
    Member
    Join Date
    Jun 2000
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Data from Excel using SQL and ODBC

    Absolutely right ! It works flawlessly now.
    Thanks John.

  5. #5
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Data from Excel using SQL and ODBC

    Interesting - what is the accent symbol used for in this syntax?
    And is there a good reference somewhere of the syntax to be used in sql statements to an excel datasource, that anybody knows of?

  6. #6
    Member
    Join Date
    Jun 2000
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Data from Excel using SQL and ODBC

    There's some info in the MSDN library, but most of it is not that useful. Basically all you really need to know is a little SQL.
    Check this out: http://msdn.microsoft.com/library/ps...k/odbc7tkj.htm
    Click on show toc / Excel driver for all the details.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:37 PM.

Copyright BetaSoft Inc.