dbTalk Databases Forums  

SQL Help

comp.databases comp.databases


Discuss SQL Help in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
yoitout@gmail.com
 
Posts: n/a

Default SQL Help - 07-24-2007 , 07:15 PM






hey,

I am using sesql.com to query Goggle with SQL and I am having trouble
with my query. The following works:

SELECT gog.*
FROM google gog
WHERE searchterm = 'jokes'
and searchterm = 'cats'
and searchterm != 'dogs'
and website != 'wikipedia.com'

but when I try to retrict my query with

SELECT gog.*
FROM google gog
WHERE searchterm = 'jokes'
and searchterm = 'cats'
and searchterm != 'dogs'
and website != 'wikipedia.com'
and rownum < 5

it still gives me everything???

help!!


Reply With Quote
  #2  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: SQL Help - 07-24-2007 , 08:40 PM






yoitout (AT) gmail (DOT) com wrote:

Quote:
I am using sesql.com to query Goggle with SQL and I am having trouble
with my query. The following works:

SELECT gog.*
FROM google gog
WHERE searchterm = 'jokes'
and searchterm = 'cats'
and searchterm != 'dogs'
and website != 'wikipedia.com'

but when I try to retrict my query with

SELECT gog.*
FROM google gog
WHERE searchterm = 'jokes'
and searchterm = 'cats'
and searchterm != 'dogs'
and website != 'wikipedia.com'
and rownum < 5

it still gives me everything???

help!!
Why does it get you anything? searchterm can not be both 'jokes'
and 'cats', so the where should always compute to false.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.