Quantcast
Viewing all articles
Browse latest Browse all 75063

SQL/Macro Code Wanted to set macro flag if... by hynr - 2013-09-15

QUOTE (ian-and-penny @ September 15, 2013 03:13 am)
With my Unfound database open, I would like to set some macro flags in the database if caches exist in both my Unfound and Found databases.

This sets all macroflags in current database as follows: to True if the cache is in the Found database, False if not:
GSK
$FoundDB="Found"  #this needs to be the exact name of the Found Database
$_SQL=      "Attach Database '$_AppData\Data\$FoundDB\SQLite.db3' as FDB; "
$_SQL=$_SQL+"Update caches set macroflag=(caches.code in (select code from FDB.caches));"
$_SQL=$_SQL+"Detach Database FDB"
$result = sqlite("sql",$_SQL)
resync

Viewing all articles
Browse latest Browse all 75063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>