Is it possible to insert data from MySQL table to MSAccess Table using SQL Query? - mysql

I want to insert data from my MySQL table to ms-access table using query.
So is it possible.
I am using vb 6 and MySQL and ms-access databases both.

Yes, it can be done. You need to
install MySQL Connector/ODBC,
create an ODBC "System DSN" for the MySQL database, and then
create an ODBC Linked Table in Access that points to the MySQL table
Once that is done you can insert data from the MySQL table into an Access table with a statement like
INSERT INTO accesstable (field1, field2)
SELECT column1, column2 FROM linkedtable;

Related

Inserting from SQL Server into MySQL results in first 2 rows blank

I am trying to insert data from a SQL Server table into a MySQL table; all columns insert correctly except for the first 2. I check the DB structure all matches. Recreated the tables, still have the same issue. Here is my statement:
insert openquery (MySQL, 'select DB, CreateDate, TaxDate, DocEntry, WddStatus, DocStatus, CardName, DocCur, DocTotal, U_NAME, Comments from ODRF_New')
Select
DB
,CreateDate
,TaxDate
,DocEntry
,WddStatus
,DocStatus
,Cardname
,DocCur
,DocTotal
,U_NAME
,Comments
From mashova_intranet.dbo.ODRF_New

My SQL--how to insert Data One database into another Database

I have two MySQL databases DB1 and DB2, DB1 is on Online server, and DB2 is on local machine(localhost), Now i want to insert some data into DB2's table named db2_table from DB1's table named db1_table using MySQL QUERY. So it is possible or not?
if you are on the same server you can do something like
INSERT INTO DB2.db2_table (col1, col2, ..., colN) SELECT col1, col2 FROM DB1.db1_table WHERE ...
but being on different servers you can not insert data in this way... the simplest way I can think of, is to dump data from the source db (with phpmyadmin, for instance) and import it into the target db.

Insert into postgres table using apache drill

Is it possible to insert data into an existing table in postgres database using apache drill.something similar to
insert into Post_db.test_schema.customer_account_holder_test select customer_id,source_system_id,salutation,first_name,middle_name,last_name,legal_name,gender,identity_proof_name,identity_proof_value from hive.schema_name.customer_account_holder limit 10
In apache drill, Insert is not supported.
You can creates a new table and populates the new table with rows returned from a SELECT query. Use the CREATE TABLE AS (CTAS) statement in place of INSERT INTO. CREATE TABLE name AS query;

how i can insert a data from mssql to mysql database when insert data in msssql

I have two databases
MS SQL Server (with the table t1)
MySQL Server (with the table t2)
I want to insert the data into table t2 on MySQL Server when some data inserted into table t1 on MS SQL Server.
I have already tried to create the linked server and use the trigger but it is not working.
How can I do that?

is it possible to sync two tables in two linked server one from MySQL and MSSQL?

I have created two Linked server one from Mysql and the other from remote MSSQL. is it possible to sync tables in these two Linked server from different database?
To Insert data from MySQL to SQL Server, do something like
INSERT INTO SQLServerLinkedServer.database.schema.TableName(Col1,Col2)
SELECT Col1,Col2 FROM MySQLinkedServer...TableName
To Insert data from SQL Server to MySQL, do something like
INSERT INTO MySQLinkedServer...TableName(Col1,Col2)
SELECT Col1,Col2 FROM SQLServerLinkedServer.database.schema.TableName
You can compare these tables using key column. For Example insert missing records in MySQLinkedServer using something like this
INSERT INTO MySQLinkedServer...TableName(Col1,Col2)
SELECT T1.Col1,T2.Col2
FROM SQLServerLinkedServer.database.schema.TableName T1
LEFT JOIN MySQLinkedServer...TableName T2
ON T1.col1 = T2.col1
WHERE T2.col1 IS NULL