473,322 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

SQL that won't flush? How to format SQL to accept problematic table name?

MLH
SELECT DISTINCT Tow-Pak_CustInfo.EMailAddr FROM Tow-Pak_CustInfo WHERE
Tow-Pak_CustInfo.EMailAddr Is Not Null;

The above has a problem with table named Tow-Pak_CustInfo in the WHERE
clause. The SELECT part seems to get by OK. Outside of the obvious
solution of renaming the table, can I somehow format this to work?
Jun 24 '07 #1
4 1190
JHB
Try putting the tablename in []
SELECT DISTINCT [Tow-Pak_CustInfo].EMailAddr FROM Tow-Pak_CustInfo WHERE
[Tow-Pak_CustInfo].EMailAddr Is Not Null;

Jørn
"MLH" <CR**@NorthState.netskrev i en meddelelse
news:6l********************************@4ax.com...
SELECT DISTINCT Tow-Pak_CustInfo.EMailAddr FROM Tow-Pak_CustInfo WHERE
Tow-Pak_CustInfo.EMailAddr Is Not Null;

The above has a problem with table named Tow-Pak_CustInfo in the WHERE
clause. The SELECT part seems to get by OK. Outside of the obvious
solution of renaming the table, can I somehow format this to work?

Jun 24 '07 #2
JHB

SELECT DISTINCT [Tow-Pak_CustInfo].EMailAddr FROM [Tow-Pak_CustInfo] WHERE
[Tow-Pak_CustInfo].EMailAddr Is Not Null;

"JHB" <wo*@ofir.dkskrev i en meddelelse
news:46***********************@dread15.news.tele.d k...
Try putting the tablename in []
SELECT DISTINCT [Tow-Pak_CustInfo].EMailAddr FROM Tow-Pak_CustInfo WHERE
[Tow-Pak_CustInfo].EMailAddr Is Not Null;

Jørn
"MLH" <CR**@NorthState.netskrev i en meddelelse
news:6l********************************@4ax.com...
SELECT DISTINCT Tow-Pak_CustInfo.EMailAddr FROM Tow-Pak_CustInfo WHERE
Tow-Pak_CustInfo.EMailAddr Is Not Null;

The above has a problem with table named Tow-Pak_CustInfo in the WHERE
clause. The SELECT part seems to get by OK. Outside of the obvious
solution of renaming the table, can I somehow format this to work?


Jun 24 '07 #3
rkc
MLH wrote:
SELECT DISTINCT Tow-Pak_CustInfo.EMailAddr FROM Tow-Pak_CustInfo WHERE
Tow-Pak_CustInfo.EMailAddr Is Not Null;

The above has a problem with table named Tow-Pak_CustInfo in the WHERE
clause. The SELECT part seems to get by OK. Outside of the obvious
solution of renaming the table, can I somehow format this to work?
Square brackets around field or table names pretty much takes care
of any problems Jet has with "illegal" names.
Jun 24 '07 #4
MLH
Many thanks, guys.

Jun 24 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark Hayworth | last post by:
Randy: I too am having the problem that this other guy/girl had. I put in the proper API declarations and arguments for GetPrivateProfileString yet it doesn't return the correct stuff. It always...
7
by: Dodger | last post by:
Apologies if the is the wrong NG. But I have trapped a GET issued by a webpage on a button press and I would like to issue the GET programatically as-and-when I wish. I wondered what the text...
7
by: | last post by:
I can't get IE 6 to read the values in my <SELECT..> data entry fields. Netscape 7 and Opera see them, and IE will pass the values to the database, but the javascript validation script gets a null...
5
by: Julia Baresch | last post by:
Hi everyone, I haven't found any reference to this problem on this group or in Access 97 help. I hope someone here knows this - probably a simple thing, but not obvious. I designed a query to...
3
by: DFS | last post by:
I've been working around this for years (I believe), so I figured someone here might know: Why won't a crosstab query accept a value from a form reference? TRANSFORM...
9
by: nsj | last post by:
I am working with a web applicaction that accesses a SQL Server database. I need the value of the 'id' column of the last inserted row in the table 'PERSON'. The SQL statement for that purpose is:...
11
by: zsolt | last post by:
Hi, I'm trying to convert a string to date by specifying the format. The value is like this: "03rd of April 2006". Now this is converted fine by using the following format: "dd\r\d \o\f MMMM...
3
by: Evan | last post by:
So I have two versions of a program (these are complete programs, not excerpts): Version 1: template <class T > void foo() { return bar( T() ); }
0
by: ineuw | last post by:
I am trying to display form fields with flush borders and eliminate the sunken effect. This works fine for text fields, but only partially for select boxes, or file inputs. IE6 and Firefox both...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.