[sqlite] SQL Syntax To Copy A Table

2015-03-29 Thread Maurizio Trevisani
I suggest to use the CloneTable function
Have a look at
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=CloneTable

It copies the table and all of its triggers, indexes, etc.

Maurizio

2015-03-26 16:35 GMT+01:00, John McKown :
> On Thu, Mar 26, 2015 at 10:29 AM, Nigel Verity 
> wrote:
>> Hi
>>
>> I know this must seem a fairly dumb question, but I can't find an easy way
>> to create a copy of table using just SQL.
>>
>> My requirement is to take periodic snapshots of a names and addresses
>> table, to be stored in the same database as the master.
>>
>> The master table has one index - an auto-incrementing integer ID (non
>> NULL, primary key). There is no need for the corresponding field in the
>> snapshot to be indexed, but the integer ID does need to be copied across.
>>
>> I'm happy to copy the table structure in one operation and the data in
>> another, but if it can be done in a single operation so much the better.
>
> You could use _two_ statements like:
>
> DROP TABLE IF EXISTS copy_of_bubba;
> CREATE TABLE copy_of_bubba AS SELECT * FROM bubba;
>
>>
>> Thanks
>>
>> Nige
>>
>>
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> --
> If you sent twitter messages while exploring, are you on a textpedition?
>
> He's about as useful as a wax frying pan.
>
> 10 to the 12th power microphones = 1 Megaphone
>
> Maranatha! <><
> John McKown
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] String compare scoring functions

2014-08-28 Thread Maurizio Trevisani
Hello,
I need a function that gives a real result from 0 to 100 representing
the similarity of two input strings.

I need to compare a dataset of addresses with a dataset of addresses
with house numbers, having coordinates, to get a geolocalization of
the addresses.

Since the addresses aren't identical to the addresses of the street
map dataset, I wish to get a score to measure the "similarity" of the
two strings.

I've found 
http://stackoverflow.com/questions/653157/a-better-similarity-ranking-algorithm-for-variable-length-strings
and I hope there is some implementation of a similar function to be
used in Sqlite queries.

Any suggestion, any help?

Thanks,
Maurizio
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users