Re: Move WebDNA DB to MySQL
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 60733
interpreted = N
texte = This import procedure is extremely fast and flexible:[SQLExecute conn_ref=conn1&result_var=UPL]LOAD DATA LOCAL INFILE 'path to/datafile.txt' INTO TABLE tablename FIELDS TERMINATED BY '' LINES TERMINATED BY '\n' (sqltablefield1, sqltablefield2, sqltablefield3, sqltablefield4,...);[/SQLExecute]This code uses a space delimited file - the length of the field in the table determines the length of the data to grab.For tab delimited, simple substitute:FIELDS TERMINATED BY '\t'The Insert function below works, but is very slow moving large amounts of data. We upload a file with approximately 80,000 lines from one of our county election clients; using INSERT (the first way I programmed it) took 3-4 minutes to complete; using the code above is is almost instantaneous.CheersLarryOn Jan 11, 2005, at 2:37 PM, Clint Davis wrote:> I want to move a tab-delimited members database that WebDNA was using > to a> MySQL database. What would be the proper syntax to search the > tab-delimited> file with WebDNA and INSERT all founditems into the MySQL database? Is > the> methodology below acceptable?>> [SQLConnect> dbType=MySQL&host=xxx&database=xxx&uid=xxx&pwd=xxx&conn_var=conn1]> [/SQLConnect]>> [search db=my.db&neIDdata=find_all]> [founditems]> [SQLExecute conn_ref=conn1&result_var=rs1]> INSERT INTO xxx VALUES ('[value1]', '[value2]', '[value3]', '[value4]')> [/SQLExecute]> [/founditems]> [/search]>> Is there a better/easier way to INSERT multiple rows?>>> ---------------------------------------------------------------------> Clint Davis> Webmaster / Interactive Media Specialist> Gray Loon Marketing Group, Inc. http://www.grayloon.com> 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999> --------------------------------------------------------------------->>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/>>Larry Hewitt360.807.1100 OFFICEHCO, LLC 360.807.1103 FAX109 No. Tower360.880.4855 CELLP.O. Box 1017larryh@hewittco.comCentralia, WA 98531www.votewashington.orgwww.hewittco.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
This import procedure is extremely fast and flexible:[SQLExecute conn_ref=conn1&result_var=UPL]LOAD DATA LOCAL INFILE 'path to/datafile.txt' INTO TABLE tablename FIELDS TERMINATED BY '' LINES TERMINATED BY '\n' (sqltablefield1, sqltablefield2, sqltablefield3, sqltablefield4,...);[/SQLExecute]This code uses a space delimited file - the length of the field in the table determines the length of the data to grab.For tab delimited, simple substitute:FIELDS TERMINATED BY '\t'The Insert function below works, but is very slow moving large amounts of data. We upload a file with approximately 80,000 lines from one of our county election clients; using INSERT (the first way I programmed it) took 3-4 minutes to complete; using the code above is is almost instantaneous.CheersLarryOn Jan 11, 2005, at 2:37 PM, Clint Davis wrote:> I want to move a tab-delimited members database that WebDNA was using > to a> MySQL database. What would be the proper syntax to search the > tab-delimited> file with WebDNA and INSERT all founditems into the MySQL database? Is > the> methodology below acceptable?>> [SQLConnect> dbType=MySQL&host=xxx&database=xxx&uid=xxx&pwd=xxx&conn_var=conn1]> [/SQLConnect]>> [search db=my.db&neIDdata=find_all]> [founditems]> [SQLExecute conn_ref=conn1&result_var=rs1]> INSERT INTO xxx VALUES ('[value1]', '[value2]', '[value3]', '[value4]')> [/SQLExecute]> [/founditems]> [/search]>> Is there a better/easier way to INSERT multiple rows?>>> ---------------------------------------------------------------------> Clint Davis> Webmaster / Interactive Media Specialist> Gray Loon Marketing Group, Inc. http://www.grayloon.com> 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999> --------------------------------------------------------------------->>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/>>Larry Hewitt360.807.1100 OFFICEHCO, LLC 360.807.1103 FAX109 No. Tower360.880.4855 CELLP.O. Box 1017larryh@hewittco.comCentralia, WA 98531www.votewashington.orgwww.hewittco.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Larry Hewitt
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Help formatting search results w/ table (1997)
2.0 Info (1997)
Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997)
Grouping fields problem (1998)
Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997)
WebCat2: Items xx to xx shown, etc. (1997)
More questions about serial number dishing (1997)
WebCat2b12 CGI Mac -- Problems propagating the cart through frames...still (1997)
WebCatalog for Postcards ? (1997)
[WebDNA] Seriously what is wrong here? (2011)
taxTotal (1997)
Separate SSL Server (1997)
Dates as 20020902 (2002)
docs for WebCatalog2 (1997)
dynamic PDF no longer working? (2004)
RE: free zip codes database (1999)
WebDNA Solutions ... (1997)
problem with [Format Days_To_Date] (2000)
[OT] - See my site? (2004)
attn: smitmicro - cart limitation (2002)