Solved

SQL Statements for excel sheets via ADO

Posted on 2003-11-04
1
819 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
ID: 9684871
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 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