Begin forwarded message:

> From: "Mr. Ian T. McDonald" <[EMAIL PROTECTED]>
> Date: November 19, 2008 6:15:19 PM EST
> To: [EMAIL PROTECTED]
> Subject: Trying to find an answer
>
>     How do I run multiple lines of INSERT queries? Normally I would  
> just import from a .csv file but I have four very large tables I  
> need to load and I have already defined the tables in SQLite. So in  
> order to import my data I have written a script to dump it from a  
> very old DB into a text file. I was hoping to copy and paste bulk  
> queries and run them all at once but it appears that I can't do  
> that. Below is a very small sample of what I am attempting to do.
>
> INSERT INTO  
> tblMeters(recordId,meterId,meterName,meterSerNum,registerSerNum,mxuSerNum,meterType,manufacture,meterModel,readType,groupId,multiplier,rollover,vendorId,xfrmerCode,bldgCode,CATEGORY,energyType,unitOfMeasure,location,access,comments,dateInstalled,dateCalibrate,pipeSizeIn,pipeSizeOut,elecMeterSpecs)
> VALUES(70,'G11601','Thimann  
> Laboratories','28131','','','Physical','Rockwell  
> Emcorector1','','MANUAL READ','',1,999999,'OMP','','G11601','G- 
> CORE','NATURAL_GAS','CCF','Thimann Labs','Key = 14 rm 116-10G / 10B.  
> Enter elec rm access rm 116-159M then rm 116-159N','','','','','','');
> INSERT INTO  
> tblMeters(recordId,meterId,meterName,meterSerNum,registerSerNum,mxuSerNum,meterType,manufacture,meterModel,readType,groupId,multiplier,rollover,vendorId,xfrmerCode,bldgCode,CATEGORY,energyType,unitOfMeasure,location,access,comments,dateInstalled,dateCalibrate,pipeSizeIn,pipeSizeOut,elecMeterSpecs)
> VALUES(69,'G11501','Hahn Student  
> Services','W-135340','','','Physical','Rockwell','','MANUAL READ','', 
> 0.1,999999,'OMP','','7115','G-COMMONS','NATURAL_GAS','CCF','Hahn  
> Student Services','Across the road from the loading  
> dock','','','','','','');
> INSERT INTO  
> tblMeters(recordId,meterId,meterName,meterSerNum,registerSerNum,mxuSerNum,meterType,manufacture,meterModel,readType,groupId,multiplier,rollover,vendorId,xfrmerCode,bldgCode,CATEGORY,energyType,unitOfMeasure,location,access,comments,dateInstalled,dateCalibrate,pipeSizeIn,pipeSizeOut,elecMeterSpecs)
> VALUES(68,'G11401','Blacksmith Shop','73- 
> S5449952','','','Physical','Amer.Singer','','MANUAL READ','', 
> 1,99999,'OMP','','7114','G-LOWER','NATURAL_GAS','CCF','Blacksmith  
> Shop','S end of building next to the outside wall','','','','','','');
>
>     This particular table has 1465 records. The big table that I  
> need to populate has 133,658 records. And I don't want to import  
> from a .csv since I will lose the table definitions and I can't sit  
> here and run each query to load the data as well. Is there a way to  
> do batch loads?
>
>
> Ian T. McDonald - Energy Analyst (UCSC)
> (831)459-2579
> Na tarraing mi gun adhbhar, 's na pill mi gun chliu.
> Neither draw me without cause, nor return me without honour. (A  
> sword inscription.) - Scottish Proverb
> "In the end it is the small acts of kindness we are remembered for."  
> - My Grandmother Irene
> This message sent by Evolution, a Linux E-Mail client from an  
> OpenSuSE 11.0 powered system!
>

D. Richard Hipp
[EMAIL PROTECTED]



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to