Sign in to follow this  
Followers 0
sshrum

SQLite.au3 and SQL 'MATCH' condition

2 posts in this topic

According to what I've read about SQlite, the'match' eval has been supported by SQLite since 2006-Oct-9, Version 3.3.8.

When I send a SQL statement with 'match' in it, I get a SQLite.au3 error back "unable to use function MATCH in the requested context".

Here is my SQL statement: Select * from metadata where Author MATCH "collins";

Nothing special...straight forward and on 1 table.

Any ideas why the SQLite.au3 is returning this error?


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites



According to what I've read about SQlite, the'match' eval has been supported by SQLite since 2006-Oct-9, Version 3.3.8.

When I send a SQL statement with 'match' in it, I get a SQLite.au3 error back "unable to use function MATCH in the requested context".

Here is my SQL statement: Select * from metadata where Author MATCH "collins";

Nothing special...straight forward and on 1 table.

Any ideas why the SQLite.au3 is returning this error?

Are you sure that's available without "Full-text tables" and the fts1 "Full-text Search" module loaded?

Using fts1

Full-text tables store one or more columns of fully indexed text. You can create a full-text table using the CREATE VIRTUAL TABLE statement. For example, the following creates a table with columns name and ingredients:

sqlite>create virtual table recipe using fts1(name, ingredients);

You can insert rows into a full-text table in the same way as into an ordinary table with columns of type TEXT:

sqlite>insert into recipe (name, ingredients) values ('broccoli stew', 'broccoli peppers cheese tomatoes');

sqlite>insert into recipe (name, ingredients) values ('pumpkin stew', 'pumpkin onions garlic celery');

sqlite>insert into recipe (name, ingredients) values ('broccoli pie', 'broccoli cheese onions flour');

sqlite>insert into recipe (name, ingredients) values ('pumpkin pie', 'pumpkin sugar flour butter');

The MATCH operator performs a full-text match on a column in a full-text table:

sqlite> select rowid, name, ingredients from recipe where name match 'pie';

3|broccoli pie|broccoli cheese onions flour

4|pumpkin pie|pumpkin sugar flour butter

sqlite>

I don't know myself, I just Googled that up to see what the proper context for the MATCH operator was.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0