473,405 Members | 2,167 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,405 software developers and data experts.

MySQL UNION on 2 Fulltext search queries

I am trying to run a fuultext search on two identical tables and use
UNION to join the results but no matter what I try, I get a syntax
error on the UNION clause.

Here's the query:

(SELECT ID, Area_Title, Page_Description, MATCH ( Page_Description )
AGAINST ( 'searchforest tree safety' ) AS Score FROM Site_Area_Lookup
WHERE MATCH ( Page_Description ) AGAINST ( 'forest tree safety' ))
UNION ALL
(SELECT ID, Area_Title, Page_Description, MATCH ( Page_Description )
AGAINST ( 'forest tree safety' ) AS Score FROM Site_Sub_Area_Lookup
WHERE MATCH ( Page_Description ) AGAINST ( 'forest tree safety' ))

I've also tried this without the parentheses around each full select
statement.

Has anyone been able to do this?

__

++Captain Tripps++

"My name is Lucifer, please bake my ham"
Jul 16 '05 #1
2 6067
++Captain Tripps++:
I am trying to run a fuultext search on two identical tables and use
UNION to join the results ...
If they are identical, why do you have two tables in the first place?
... but no matter what I try, I get a syntax
error on the UNION clause.


What version are you using? Mysql 3.* doesn't support union, it wasn't
implemented until 4.0.0. See: http://www.mysql.com/doc/en/UNION.html

André Næss
Jul 16 '05 #2
On Mon, 21 Jul 2003 23:55:46 +0000, André Næss
<an*********************@ifi.uio.no> wrote:
++Captain Tripps++:
I am trying to run a fuultext search on two identical tables and use
UNION to join the results ...


If they are identical, why do you have two tables in the first place?

Well one is a parent table, and is used as a lookup for "sub" records.
These tables are referenced all over the place elsewhere in the site
nav templates or else I'd just consolidate them. Regardless, in other
areas I will be merging results from dissimilar tables which is why
UNION would have been great. Bummer.
... but no matter what I try, I get a syntax
error on the UNION clause.


What version are you using? Mysql 3.* doesn't support union, it wasn't
implemented until 4.0.0. See: http://www.mysql.com/doc/en/UNION.html

André Næss


And herein lies the problem. It's version 3.23.54.

This would have been *soooo* much easier if there were giant red
blinking letters saying (Unsupported Feature). Oh well it's the small
stuff that gets ya. Now I'll have to create a temp table and do it the
hard way.

Thanks for being kind in your response to such a boneheaded question
:-)

__

++Captain Tripps++

"My name is Lucifer, please bake my ham"
Jul 16 '05 #3

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

Similar topics

0
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...
0
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...
0
by: Phil Powell | last post by:
Retracing my problem leads me to believe I never successfully created fulltext indexes for MySQL 3.23.58 MyISAM tables. I went to the MySQL manual and was able - or so I thought - to create them,...
0
by: Phil Powell | last post by:
Retracing my problem leads me to believe I never successfully created fulltext indexes for MySQL 3.23.58 MyISAM tables. I went to the MySQL manual and was able - or so I thought - to create them,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.