Meerkat has been working on ionSQL a DBMS for SQLite
Wrote a program that helps in the maintenance of SQLite databases. Some of the features: Create new databases. Load existing databases Drop a database from the system Execute SQL commands Empty Tables Create Tables Drop Tables from a Database Browse Tables Delete Fields from a Table Change Fields Change Field properties Add fields Create index Drop index Export Schema and data. Including full data Exports are a great way to backup databases. Load data and Schema. Enter SQL commands. A great way to test your commands before you add them to code.. And more....
I'm posting this a little early, because I'm out of town for a couple of weeks and thought people may need it. So expect and report bugs.
Just to prove the Sql command entry worked I used the following SQL command to search for required assets such as conference room or projector etc. And it did finds all the open slots for that particular asset . The slots have to have enough time to meet your requirements. It only reports the number of open slots you request.. It uses 2 tables.. asset - what you wanna schedule, schTime - scheduled time already allocated. I give it the following requirements: minSlots.. the minimum slot needed in minutes begSlotDate$.. the beginning date to search for open slots numSlots.. Report only this many open slots. schBy$ .. Increments in minutes to search by like 15 minutes intervals
SELECT s.schNum, s.assetNum, s.schEnd as preEnd, s1.schBeg as nxtBeg, ((strftime('%s',s1.schBeg) - strftime('%s',s.schEnd)) / 60) as laps, (strftime('%w',s.schEnd)) as dowBeg, asset.descr as aDescr, asset.assetType FROM schTime as s JOIN asset ON asset.assetNum = s.assetNum JOIN schTime as s1 ON s1.assetNum = s.assetNum AND s1.schBeg > s.schEnd AND ((strftime('%s',s1.schBeg) - strftime('%s',s.schEnd)) / 60) >= "+minSlots+" AND s1.schBeg = (SELECT min(s2.SchBeg) FROM schTime as s2 WHERE s2.assetNum = s.assetNum AND s2.schBeg > s.schEnd) "+schBy$+" AND s.schBeg >= "+begSlotDate$+" LIMIT "+numSlots