Re: query

From: Álvaro G. Vicario <alvaro.NOSPAMTHANX_at_demogracia.com>
Date: Tue, 24 Feb 2009 13:33:20 +0100
Message-ID: <go0peg$jao$2_at_news.motzarella.org>



Carl Forsman escribió:
> Why the following query does not work?
> select a.Word, b.Word a.Document from data where ABS(a.Position -
> b.Position) < 3 and a.Document = b.Document
>
> I have a Table stores keywords + position of the word + document
> number 1 or 2 ... the word in.
>
> Word Position Document
> Great 1 1
> Wall 2 1
> China 3 1
> Dog 3 2
> Cat 7 2
>
> I would like to output all word that are close related ... position of
> 2 word do not more than 3 word apart :
>
> The output should be:
> (Word1)(Word2)(Document#)
> Great Wall 1
> Wall China 1
> Great China 1
>

You have posted the very same question comp.databases.mysql ... Are you actually using Oracle?

-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
Received on Tue Feb 24 2009 - 06:33:20 CST

Original text of this message