Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread Insert into local table from remote table
Thu, Oct 4 2018 10:12 AMPermanent Link

John Taylor

I want to update a local table (sessiontype stLocal) from a remote table on a server (sessiontype stRemote) like this

SQL is:
Insert into LOCALTABLE
(FIELD1, FIELD2, FIELD3)
SELECT
REMOTEFIELD1,REMOTEFIELD2,REMOTEFIELD2
FROM REMOTETABLE

I'm not sure this can be done with one query since one table is local and the other remote.

If I have access to the remote table via a shared folder is it safe to go outside the database server to run this query as one query with one stLocal session?

like this:
Insert into "c:\localpath\TABLE1 "
(FIELD1, FIELD2, FIELD3)
SELECT
REMOTEFIELD1,REMOTEFIELD2,REMOTEFIELD2
FROM "\\server\sharedfolder\REMOTETABLE"

Thanks, advice appreciated!
John Taylor
Fri, Oct 5 2018 3:19 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


Long time since I used DBISAM but I'd guess you're heading into a world of hurt. I'd suggest using EXPORT & IMPORT

Roy Lambert
Fri, Oct 5 2018 5:36 AMPermanent Link

John Taylor

Roy Lambert wrote:

John


Long time since I used DBISAM but I'd guess you're heading into a world of hurt. I'd suggest using EXPORT & IMPORT

Roy Lambert

Haha!  Roy, I suspect you are correct!
Fri, Oct 5 2018 5:37 AMPermanent Link

John Taylor

Roy Lambert wrote:

John


Long time since I used DBISAM but I'd guess you're heading into a world of hurt. I'd suggest using EXPORT & IMPORT

Roy Lambert

The sticking point is there are three blob fields, 2 are small, the other one could be HUGE Frown

John
Fri, Oct 5 2018 6:40 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


Is this an occasional batch, or being run live frequently by a user?

Roy Lambert
Fri, Oct 5 2018 6:46 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


The reason for the question was

https://www.elevatesoft.com/manual?action=viewtopic&id=dbisam4&product=rsdelphi&version=XE&topic=Copying_Tables

Copy the source table then you can access it in anyway you want without much worry. The other alternative might be to stream the remote table to the local machine. I think that's doable in DBISAM but I'm not sure.


Roy Lambert
Fri, Oct 5 2018 9:09 AMPermanent Link

John Taylor

Roy Lambert wrote:

John


Is this an occasional batch, or being run live frequently by a user?

Roy Lambert

It is being run in a thread but can also be run by the user.

John
Fri, Oct 5 2018 9:09 AMPermanent Link

John Taylor

Roy Lambert wrote:

John


The reason for the question was

https://www.elevatesoft.com/manual?action=viewtopic&id=dbisam4&product=rsdelphi&version=XE&topic=Copying_Tables

Copy the source table then you can access it in anyway you want without much worry. The other alternative might be to stream the remote table to the local machine. I think that's doable in DBISAM but I'm not sure.


Roy Lambert

The documentation say:
You cannot copy tables on a database server to local tables or vice-versa. Please see the DBISAM Architecture topic for more information.

Frown
Fri, Oct 5 2018 1:35 PMPermanent Link

John Taylor

John Taylor wrote:

Roy Lambert wrote:

John


The reason for the question was

https://www.elevatesoft.com/manual?action=viewtopic&id=dbisam4&product=rsdelphi&version=XE&topic=Copying_Tables

Copy the source table then you can access it in anyway you want without much worry. The other alternative might be to stream the remote table to the local machine. I think that's doable in DBISAM but I'm not sure.



Roy Lambert

The documentation say:
You cannot copy tables on a database server to local tables or vice-versa. Please see the DBISAM Architecture topic for more information.

Frown

I found this which seems to do exactly what I want:
I found this:
https://www.elevatesoft.com/supportfaq?action=view&category=dbisam&question=batch_move
Sat, Oct 6 2018 2:55 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John

>The documentation say:
> You cannot copy tables on a database server to local tables or vice-versa. Please see the DBISAM Architecture topic for more information.

Yes, but you can copy as a remote table, release and access as a "local" table using fileserver. With no danger of things happening to live data whilst you mess about.

Roy
Page 1 of 2Next Page »
Jump to Page:  1 2
Image