hi all
i dynamicaly generate a select statement and there seems to be a problem with it.
below is an example of one that is generated - SELECT TITLE, FNMI, SALUTATION, COMPANY, E_MAIL FROM DBASE WHERE BOARD IS NOT NULL, OR CBM IS NOT NULL, OR LEGIS IS NOT NULL
-
when i paste it into the sql part of phpmyadmin i get the following error -
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' OR CBM IS NOT NULL , OR LEGIS IS NOT NULL LIMIT 0, 30' at line 1
-
all of the capital letters are because someone made this database in microsoft access, and she apparently likes caps. I have never used 'OR' or IS NOT NULL in my select statements before and maybe there is somthing wrong with that syntax
i would love some help
eric
2 3825
Hi,
The Syntax for the query is wrong:
Use the Below query,
SELECT TITLE, FNMI, SALUTATION, COMPANY, E_MAIL FROM DBASE WHERE BOARD IS NOT NULL OR CBM IS NOT NULL OR LEGIS IS NOT NULL;
There can't be Comma seperator in the query, i mean in the where clause of the query.
Thanks,
Scarlet
hi all
i dynamicaly generate a select statement and there seems to be a problem with it.
below is an example of one that is generated - SELECT TITLE, FNMI, SALUTATION, COMPANY, E_MAIL FROM DBASE WHERE BOARD IS NOT NULL, OR CBM IS NOT NULL, OR LEGIS IS NOT NULL
-
when i paste it into the sql part of phpmyadmin i get the following error -
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' OR CBM IS NOT NULL , OR LEGIS IS NOT NULL LIMIT 0, 30' at line 1
-
all of the capital letters are because someone made this database in microsoft access, and she apparently likes caps. I have never used 'OR' or IS NOT NULL in my select statements before and maybe there is somthing wrong with that syntax
i would love some help
eric
perfect thanks a million
eric
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Phil Powell |
last post by:
The table already has a fulltext index and from there I can use the
MySQL fulltext search query to get results as well as the relevancy
score.
The problem I have is that MySQL has a default...
|
by: aa |
last post by:
I use the following fragment of code to output datf from MySQL:
======================================================
$chan = mysql_connect ($db_host, $username, $password);
mysql_select_db...
|
by: Lenz Grimmer |
last post by:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
MySQL 4.0.14, a new version of the popular Open Source/Free Software
Database, has been released. It is now available in source and binary...
|
by: Mike Chirico |
last post by:
Interesting Things to Know about MySQL
Mike Chirico (mchirico@users.sourceforge.net)
Copyright (GPU Free Documentation License) 2004
Last Updated: Mon Jun 7 10:37:28 EDT 2004
The latest...
|
by: jlee |
last post by:
I'm pretty much a newbie on mysql, and I need some help.
I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4
(i386) on a server hosting an active website.
The site's developer...
|
by: Ridge Burner |
last post by:
Can someone tell me which of these 2 SQL queries will be more efficient? I'm
having a debate with another guy about which would be less resource
intensive for MySQL.
The first uses MySQL to pick...
|
by: vncntj |
last post by:
I'm trying to get the venue in the 'List' column when in contains a
value. But if the venue Is Null then place the event in the 'List'
SELECT
CASE
WHEN event Is Null THEN venue
Else
event...
|
by: Atli |
last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users.
Anyone should be able to get...
|
by: ssnaik84 |
last post by:
Hi Guys,
Last year I got a chance to work with R&D team, which was working on DB scripts conversion..
Though there is migration tool available, it converts only tables and constraints..
Rest of...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |