Longer answer: Depends on what you mean by "at the same time." If you mean "truly simultaneously" the answer is still no. If you mean "within milliseconds of each other and with the whole thing wrapped in a single transaction so that is one insert fails the other will as well" then the answer is yes.
But you can't do it with a single SQL statement. You could do it by creating a stored procedure that would insert into one and then into the other. And do it all in a single TRANSACTION.
Curiosity: Why would you do this with two separate DATABASES? I can see doing it with separate TABLES in the same database, but it would be highly unusual to do this across two DBs.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
The only reason I can think of for doing this would be to have one as a production database and another as the development database. But you don't have to query two databases, for that. Keep them separate and just code the pages to use one if in production, the other if in development.
__________________ ^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
database 1) Vehicle inventory... loaded by importing.
database 2) Vehicle Global database. loaded by importing.
I load the on vehicle inventory db (1) and then I want it to goto the global database db(2) to store in our db if the vehicle comes back to us for sale again.. I can pull it out via the vin # in the global db(2)
What would be the best procedure to have them import to both databases at the same time.. and if there is a better way I would love to know.
I will be using the current.. as the main database.. and have the secondary db as the db that holds all the information for all of the vehicles that come into our locations.
the main database will be erased and readded on a weekly time frame based on the new arrivals.
It would be easier to drop and recreate specific tables on a weekly time frame and keep everything in the one database. That way the weekly job lists the tables to be cleared (which is easier than deleting and recreating a database) and everything else just accesses everything in the one database.
1 table that can be emptied on a weekly or bi-weekly basis
and a 2nd table that stores all the data.
if yes>>
how would I go about inserting records to the 2 tables at the same time.
as I currently import with php a 55 record table on a weekly basis to the current table.. and would like to have it go to the now global table as well.
Now this only happens during the import process..
this wasy I have a global table that can have every record excluding duplilcates and another that I can use to empty for current data.