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

  • SEARCH
  • Home
  • 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 7003179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:01:56+00:00 2026-05-27T21:01:56+00:00

I have databases which manage files. The reason that there are multiple is that

  • 0

I have databases which manage files. The reason that there are multiple is that they live on separate drives (think USB drives). I want to write queries which apply to files on all drives. The problem is that I cannot take down the view to recreate it with another database (its being used). Therefore, I was wondering if there is a way to write a view to union all tables with the same name in each of the databases from .databases? That way, when a new database is attached, i dont have to take down the view.

Maybe as the closest answer, would it be possible to write a trigger on ATTACH and have the trigger recreate the view (in order to at least minimize downtime)?

  • 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-05-27T21:01:56+00:00Added an answer on May 27, 2026 at 9:01 pm

    SQLite doesn’t support any kind of ‘attach’ trigger that I’m aware of, only delete, insert, and update.

    What you want to do is probably best done by your program, not inside SQLite itself. You should be able to manually drop and re-create the view (necessary since views can’t be modified) in your own code anytime you do an attach. Of course this would require a lock (making the table unusable as you said), but that would probably be necessary even if SQLite was doing the work for you.

    Either way, the view creation is extremely fast, so it shouldn’t affect your program’s performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two physically-separate MySQL databases on which I have to run a single
I have a table and two databases which have the same table, but one
I have a table in one of my databases which is a queue of
I have some old rrdtool databases, for which the exact creation recipe has long
I don't have much experience with databases, so I don't know which is better
I have a process that's going to initially generate 3-4 million PDF files, and
Basically I have a program which, when it starts loads a list of files
I have an application which will manage releases of DDL changes and TSql Executable
I have a database which holds the residents of each house in a certain
I have a database which is in Access (you can get it link text

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.