Data From MySQL to SQLite

2013-05-23 Thread Devin Asay
Hi all, I have an ongoing need to populate some SQLite tables with data stored in a MySQL database. The parallel table structures in both db systems are created; I just need to move the data. I can figure out how to write the queries, but before I spend a lot of time I thought I'd check to see

Re: Data From MySQL to SQLite

2013-05-23 Thread Dr. Hawkins
Library??? assuming that the names/types are compatible, put revDataFromQuery(tab,vtab,inDbno,"SELECT * FROM inTable) into theData put "BEGIN TRANSACTION;" & cr into dcmd set the itemDel to vtab repeat for each item theLin in theData put "INSERT INTO outTable VALUES( " & theLin & ");" & cr aft

Re: Data From MySQL to SQLite

2013-05-23 Thread Mark Schonewille
Hi Richard, Is it possible to execute multiple SQL lines with revExecuteSQL now? -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CM

Re: Data From MySQL to SQLite

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 2:17 PM, Mark Schonewille wrote: > Is it possible to execute multiple SQL lines with revExecuteSQL now? I assume so--at the moment I'm actually doing it with revDataFromQuery(), but I'm trying to convert over (although I really suspect that they map to the same underlying

Re: Data From MySQL to SQLite

2013-05-23 Thread Ruslan Zasukhin
On 5/23/13 10:31 PM, "Devin Asay" wrote: > Hi all, > > I have an ongoing need to populate some SQLite tables with data stored in a > MySQL database. The parallel table structures in both db systems are created; > I just need to move the data. I can figure out how to write the queries, but > befo

Re: Data From MySQL to SQLite

2013-05-23 Thread Devin Asay
On May 23, 2013, at 3:06 PM, Dr. Hawkins wrote: > Library??? assuming that the names/types are compatible, > > put revDataFromQuery(tab,vtab,inDbno,"SELECT * FROM inTable) into theData > > put "BEGIN TRANSACTION;" & cr into dcmd > > set the itemDel to vtab > repeat for each item theLin in th

Re: Data From MySQL to SQLite

2013-05-23 Thread Devin Asay
On May 23, 2013, at 3:06 PM, Dr. Hawkins wrote: > Library??? assuming that the names/types are compatible, > > put revDataFromQuery(tab,vtab,inDbno,"SELECT * FROM inTable) into theData > > put "BEGIN TRANSACTION;" & cr into dcmd > > set the itemDel to vtab > repeat for each item theLin in th

Re: Data From MySQL to SQLite

2013-05-23 Thread Mark Schonewille
Hi Devin, Yes, you can use any ASCII character as delimiter. These delimiters are used by LiveCode and not by SQL and therefore this isn't a problem. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter

Re: Data From MySQL to SQLite

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 2:36 PM, Devin Asay wrote: > I didn't mention that my data contains one field with long xml-formatted > data, so to avoid conflicts with delimiters I have to use > > … revDataFromQuery(numToChar(31),numToChar(30) … > > Can my values list use non-comma delimiters? > I use

Re: Data From MySQL to SQLite

2013-05-23 Thread Peter Haworth
I think it depends on the SQL implementation. I don't think SQLite allows it, at least not in the SQLite library included in LC which is many releases old. I wonder waht RunRev plan to do when SQLite 4 is released. Pete lcSQL Software On Thu, May 23, 2013 at 2:17 PM, Mar

Re: Data From MySQL to SQLite

2013-05-23 Thread Peter Haworth
On Thu, May 23, 2013 at 2:31 PM, Devin Asay wrote: > Thanks, I'll give that a try. Any idea if this might work for records > containing binary data? I have one table with around 74 MB of data that I > need to transfer over. Hi Devin, Not knowing much about your data but allowing for as many got

Re: Data From MySQL to SQLite

2013-05-23 Thread Peter Haworth
On Thu, May 23, 2013 at 2:31 PM, Devin Asay wrote: > Thanks, I'll give that a try. Any idea if this might work for records > containing binary data? I have one table with around 74 MB of data that I > need to transfer over. Another thought. I think you have my SQLiteAdmin program. If you can

Re: Data From MySQL to SQLite

2013-05-23 Thread Peter Haworth
On Thu, May 23, 2013 at 4:33 PM, Peter Haworth wrote: > put zero into tColNumber > repeat tNumRecs times >repeat tColCount times > add 1 to tColNumber > get revDatabaseColumnNumbered(tID, tColNumber,tArray[tColNumber]) >end repeat >revExecuteSQL SQLiteDBID,"INSERT INTO VA

Re: Data From MySQL to SQLite

2013-05-23 Thread Magicgate Software - Skip Kimpel
Is this a one time event or or does the data have to live in both locations and a constant synchronization happening? SKIP On Thu, May 23, 2013 at 8:13 PM, Peter Haworth wrote: > On Thu, May 23, 2013 at 4:33 PM, Peter Haworth wrote: > > > put zero into tColNumber > > repeat tNumRecs times > >

Re: Data From MySQL to SQLite

2013-05-24 Thread Devin Asay
On May 23, 2013, at 5:33 PM, Peter Haworth wrote: > On Thu, May 23, 2013 at 2:31 PM, Devin Asay wrote: > >> Thanks, I'll give that a try. Any idea if this might work for records >> containing binary data? I have one table with around 74 MB of data that I >> need to transfer over. > > > Hi Dev

Re: Data From MySQL to SQLite

2013-05-24 Thread Devin Asay
On May 23, 2013, at 6:51 PM, Magicgate Software - Skip Kimpel wrote: > Is this a one time event or or does the data have to live in both locations > and a constant synchronization happening? > > SKIP Initially I just need to move all of the data. Going forward I will only have to sync the SQLi