Page 1 of 1

supported sql

Posted: Tue May 22, 2001 2:54 pm
by pnam
Hi,

I was wondering where would I find a reference link to all the supported SQL commands available? I need to do things like substring on the body field and only return certain intervals of rows - top 20, next 20, third 20, etc.

I could just alter the dowalk script and maintain another field that holds the substring, but that would be redundant.

Or I could just retrieve everything (select * form html ...) and do the substring and intervals at the servlet level, but that is pretty inefficient.

Thanks for your help.

supported sql

Posted: Tue May 22, 2001 3:58 pm
by mark
All of the looping controls for SQL are documented at
http://www.thunderstone.com/site/vortexman/node35.html
functions available within a SQL statement are documented at
http://www.thunderstone.com/site/texisman/node61.html

If the functions in SQL are not sufficient for the processing you need you can just do the processing in the vortex script.

supported sql

Posted: Wed May 23, 2001 2:22 pm
by pnam
Thanks for the links.

I'm trying to do a select on the Url with a LIKE operator. such as:

select * from html where Url like '%www2.mysite.com%'

but I get the error Query would require a linear search.

I have an index like :
create unique index xhtmlurl on html(Url)

What am i doing wrong here ?

supported sql

Posted: Wed May 23, 2001 2:50 pm
by mark
Like requires a metamorph index. You want matches. And you don't want the leading %
Url matches 'www2.mysite.com%'

supported sql

Posted: Thu May 24, 2001 11:49 am
by pnam
thanks for your help!