Quantcast
Channel: GSAK Forum
Viewing all articles
Browse latest Browse all 75755

Copy Database Row Number to UserData Column by Lt.Ranger.Bob - 2013-07-28

$
0
0
QUOTE (lignumaqua @ July 28, 2013 12:59 am)
FWIW - you can do this all in SQLite very quickly if you first create an index. This should do the same as the original code:

GSK
$_sql = "create index gsak_mem.rows on gridtemp(rid) ; update caches set userdata = (select substr('00000' || gridtemp.rowid, length(gridtemp.rowid) + 1) from gridtemp where rid = caches.rowid) where caches.rowid in (select * from gridtemp)"
$data = Sqlite("sql",$_sql)


Takes just over a second for 50,000 caches.

user posted image

This works great and is very fast. Can a period be added to the end of the end of the number?

Viewing all articles
Browse latest Browse all 75755

Trending Articles