Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9115565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:27:47+00:00 2026-06-17T04:27:47+00:00

I have a database that needs to be updated periodically. My employer wants to

  • 0

I have a database that needs to be updated periodically. My employer wants to keep a base instance of it in MS Access, and update one in a local SQLite table.

I’ve been able to grab all of the data out of the MS Access table (into XML), but when I try to insert it into the SQLite table, I get the error that there are too many terms in the compound select statement.

I know that SQLite limit compound select inserts to 500, but this database is over 150,000 rows. I’m at a loss for how to get the data moved over.

Anyone have any thoughts?

Here is the code that I was trying to use:

var sqlItem:String="INSERT INTO items (itemID,barcode,desc,brandNum,size,units,multQty,multPrice,price,brand,cat01,catSub,cost,srp,lastPriceChangeDate,lastScanDate,addDate,chgDate) ";
for each(var i:XML in itemList.item){
    sqlItem=sqlItem+"SELECT "+
    parseInt(i.itemID,10)+","+
    parseInt(i.barcode,10)+","+
    "\""+i.description+"\","+
    parseInt(i.brandNum,10)+","+
    "\""+i.size+"\","+
    "\""+i.units+"\","+
    parseInt(i.multQty,10)+","+
    "\""+i.multPrice+"\","+
    "\""+i.price+"\","+
    "\""+i.brand+"\","+
    "\""+i.cat01+"\","+
    "\""+i.catSub+"\","+
    "\""+i.cost+"\","+
    "\""+i.srp+"\","+
    "\""+i.lastPriceChangeDate+"\","+
    "\""+i.lastScanDate+"\","+
    "\""+i.addDate+"\","+
    "\""+i.chgDate+"\""+
    " UNION ";
}
sqlItem=sqlItem.substring(0,sqlItem.length-7);
itemStmt.text=sqlItem;
try{
    itemStmt.execute();
}catch(error:SQLError){
    trace("Update USER Database - ERROR: "+error.detailID +" - "+error.details );
}

Here is an example of the XML that I am reading into the database:

<items>
    <item>
        <itemID>1234</itemID>
        <barcode>01111111111111</barcode>
        <description>Product Description</description>
        <brandNum>1</brandNum>
        <size>1</size>
        <units>oz.</units>
        <multQty>1</multQty>
        <multPrice>0.85</multPrice>
        <price>0.85</price>
        <brand>Product Brand</brand>
        <cat01>Product Category</cat01>
        <catSub>(none)</catSub>
        <cost>0.10</cost>
        <srp>0.95</srp>
        <lastPriceChangeDate>1/9/2009 3:32:29 PM</lastPriceChangeDate>
        <lastScanDate>1/9/2009 3:32:29 PM<lastScanDate>
        <addDate/>1/9/2009 3:32:29 PM<addDate/>
        <chgDate>1/9/2009 3:32:29 PM</chgDate>
    </item>
    <item>
        <itemID>1234</itemID>
        <barcode>01111111111111</barcode>
        <description>Product Description</description>
        <brandNum>1</brandNum>
        <size>1</size>
        <units>oz.</units>
        <multQty>1</multQty>
        <multPrice>0.85</multPrice>
        <price>0.85</price>
        <brand>Product Brand</brand>
        <cat01>Product Category</cat01>
        <catSub>(none)</catSub>
        <cost>0.10</cost>
        <srp>0.95</srp>
        <lastPriceChangeDate>1/9/2009 3:32:29 PM</lastPriceChangeDate>
        <lastScanDate>1/9/2009 3:32:29 PM<lastScanDate>
        <addDate/>1/9/2009 3:32:29 PM<addDate/>
        <chgDate>1/9/2009 3:32:29 PM</chgDate>
    </item>
</items>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:27:48+00:00Added an answer on June 17, 2026 at 4:27 am

    Try this solution it works!!! I have tested this solution even in Web Sql DB based on sqlite

    select sqlite_version()

    3.6.19

    INSERT INTO items (val)  
    select * from
    (select 1  val  union all
     select 2   val union all
     select 3   val union all
     select 4   val union all
     ...
     select 500 val
    )
    union all
    select * from
    (select 501  val    union all
     select 502 val union all
     select 503 val union all
     select 504 val union all
     ...
     select 1000    val
    )
    union all
    select * from
    (select 1001  val   union all
     select 1002    val union all
     select 1003    val union all
     select 1004    val union all
     ...
     select 1500    val
    )
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have inherited a very old database that needs some data to be updated.
I have a database entry that I need to update. This method obviously doesn't
I have a sqlite database which is opened in :memory: that needs to be
I have a Rails app that needs to expose values from a database as
I have a database full of autopart numbers that needs old part numbers prices
Our current scenario is like this: we have an existing database that needs to
I have a Rails application with database that is updated from external C++ program.
I have an asp.net mvc3 website, I need to update the database periodically, for
I have a report that gets updated every week that needs pushed out to
I have a dev database that I periodically rebuild from a data dump of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.