I'm using Delphi EX2 and SQLite3 and I have two separate database files that I need to merge via an SQL statement like:
INSERT INTO DatabaseOne.TableOne (FieldNameOne, FieldNameTwo, FieldNameThree)
SELECT FieldNameOne, FieldNameTwo, FieldNameThree
FROM DatabaseTwo.TableOne
I have a feeling that a tzGroupConnection is the way to go but I can't figure out how to use them at all...!
Any help would be greatly appreciated, particularly if you could give me some sample code!
Thanks in advance.
How can I do a SELECT Statement using Two Databases?
Moderators: gto, EgonHugeist, olehs
-
- Fresh Boarder
- Posts: 24
- Joined: 21.09.2012, 10:13
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
BytePlayer,
i've no expierienses with that component. So if you find out how post it here..
i've no expierienses with that component. So if you find out how post it here..
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Hello BytePlayer and EgonHugeist,
Maybe this thread helps about TZConnectionGroup and TZGroupedConnection: http://zeos.firmos.at/viewtopic.php?t=2760
Byteplayer, if I understand that thread correctly, these components will not help you. The special case in your first post seems to be the normal use case for a data pump? Maybe some RDBMSs might allow Queries betwen different databases. But imo this is not the usual case. So what RDBMS do you use? (MS SQL, Sybase ASE / ASA, Firebird, SQLite, ...)
Best regards,
Jan
Maybe this thread helps about TZConnectionGroup and TZGroupedConnection: http://zeos.firmos.at/viewtopic.php?t=2760
Byteplayer, if I understand that thread correctly, these components will not help you. The special case in your first post seems to be the normal use case for a data pump? Maybe some RDBMSs might allow Queries betwen different databases. But imo this is not the usual case. So what RDBMS do you use? (MS SQL, Sybase ASE / ASA, Firebird, SQLite, ...)
Best regards,
Jan
-
- Fresh Boarder
- Posts: 24
- Joined: 21.09.2012, 10:13
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Hello BytePlayer,
a component for creating sql scripts for inserting - that is something on my todo list. What I can give you is a data pump component. This component is in a state, where I can say, it works for me and some of my customers. If you want to, I can publish it here and write some kind of small introduction on how to use it.
Best regards,
Jan
a component for creating sql scripts for inserting - that is something on my todo list. What I can give you is a data pump component. This component is in a state, where I can say, it works for me and some of my customers. If you want to, I can publish it here and write some kind of small introduction on how to use it.
Best regards,
Jan
-
- Fresh Boarder
- Posts: 24
- Joined: 21.09.2012, 10:13
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Hello BytePlayer,
please have a look at the attached components. This is the data pump described earlier and an SQL-Dump generator. Both have limitations. Until now I only use them with Zeos 6.6.6 and Delphi. So if you use newer Delphi versions, especially unicode eneabled ones, or Zeos 7 your mileage might vary.
For using the components, just drop the pas files into a new package, compile and install it. Both files contain a register procedure that will register these both components to your component palette in a Tab called IKS.
The textfiles contain a brief description of the components. The folders contain demo projects. I think that especially for the data pump this is necessary because I had to make some ugly design decisions there ;o)
If you have questions, just ask me.
Best regards,
Jan
please have a look at the attached components. This is the data pump described earlier and an SQL-Dump generator. Both have limitations. Until now I only use them with Zeos 6.6.6 and Delphi. So if you use newer Delphi versions, especially unicode eneabled ones, or Zeos 7 your mileage might vary.
For using the components, just drop the pas files into a new package, compile and install it. Both files contain a register procedure that will register these both components to your component palette in a Tab called IKS.
The textfiles contain a brief description of the components. The folders contain demo projects. I think that especially for the data pump this is necessary because I had to make some ugly design decisions there ;o)
If you have questions, just ask me.
Best regards,
Jan
You do not have the required permissions to view the files attached to this post.