Solved

SQL Statements for excel sheets via ADO

Posted on 2003-11-04
1
811 Views
Last Modified: 2007-12-19
Hi all,
I have a problem in accessing the excel sheets via ADO using SQL command. If I access the excel sheets using a single word field (e.g. PartNo), I can retrieve the data without problem but if I try to retrieve data using a two word field (e.g. First Name), I will have an exception. Does anyone have any idea how to solve this problem.

select * from pract$ where PartNo is 'A1234'   // this can work

select * from pract$ where First Name is 'John'   // this cannot work

A billion thanks
Rice Cake.

0
Comment
Question by:antioch_75
1 Comment
 
LVL 27

Accepted Solution

by:
kretzschmar earned 125 total points
Comment Utility
usual you do doublequote the field

select * from pract$ where "First Name" is 'John'  

but it could only be that you must use brackets

select * from pract$ where [First Name] is 'John'  

must test mySelf First

meikl ;-)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now