Normal Topic How to: copy records from one db to a different db (Read 2091 times)
spanitz
Member
*
Offline


--Arbeit macht das Leben
suess--

Posts: 29
Location: Chicago
Joined: May 28th, 2004
How to: copy records from one db to a different db
Jun 7th, 2004 at 9:48pm
Print Post Print Post  
How can I copy (remove/archive) records from one database to another?  The structures are the same; we just want to get out-of-date records archived into a different file to keep the current/live file a managable size.  I've read the chapter on what I think is the instructions (import/export/copy) but the instructions do not really explain betwee-two-files copies.
  

Eric A. Spanitz&&Spanitz Consulting, Inc.&&www.spanitz.com
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How to: copy records from one db to a differen
Reply #1 - Jun 7th, 2004 at 10:01pm
Print Post Print Post  
Spanitz,

Can't you just export from the 1st database to a .txt or .csv file, then import into the 2nd database?


Steve
  
Back to top
IP Logged
 
spanitz
Member
*
Offline


--Arbeit macht das Leben
suess--

Posts: 29
Location: Chicago
Joined: May 28th, 2004
Re: How to: copy records from one db to a differen
Reply #2 - Jun 7th, 2004 at 10:04pm
Print Post Print Post  
I'm leary of going from Sesame-format to CSV then back.  Would we lose anything?  Q&A used to have a copy function between databases.  Another auto-magic thing we took advantage of...   Cheesy
  

Eric A. Spanitz&&Spanitz Consulting, Inc.&&www.spanitz.com
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How to: copy records from one db to a differen
Reply #3 - Jun 7th, 2004 at 10:15pm
Print Post Print Post  
I've done the import/export and didnt notice any problems. I think as long as you dont touch the .csv file after you export, you should be fine but I would test it on a few records just to make sure.

I've seen Sesame "escape" some important characters on a .csv file created by another database program. Seems like if you maintain the same settings on both export and import, you should be fine.

You may want to use some "safe" settings, like using a delimiter that isn't commonly used in your data such as the pipe " | " (above the backslash key on your keyboard)  as a delimter and putting quotes around all of your data, just to be safe.


Steve
  
Back to top
IP Logged
 
spanitz
Member
*
Offline


--Arbeit macht das Leben
suess--

Posts: 29
Location: Chicago
Joined: May 28th, 2004
Re: How to: copy records from one db to a differen
Reply #4 - Jun 9th, 2004 at 2:32am
Print Post Print Post  
Okay, following the directions on pages 288 through 298, I cannot export.  I get another enlightening error message "ASCII Export failed to create file ..." with the filename in place of the ... obviously.

Okay I just tried something else while I was writing this.  I had to change the delimiter to something else (like the | you suggested) otherwise it didn't work.  Perhaps the error message could be changed to point out something like this?

Okay this is a cruel trick.  It says the file was written, but it is nowhere to be found.  UG!!!! This is so frustrating!  I can't believe our office would be the only ones trying to move records from one database to another.
  

Eric A. Spanitz&&Spanitz Consulting, Inc.&&www.spanitz.com
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: How to: copy records from one db to a differen
Reply #5 - Jun 9th, 2004 at 6:57am
Print Post Print Post  
Hi spanitz....

You asked: Quote:
How can I copy (remove/archive) records from one database to another? 


The term "database" is frequently misused here.  Could you please explain what types of databases you are are trying to  transfer? 

Do you mean a database within a Sesame application, do you mean a single database in Q&A, do you mean a database of tables in Access,FoxPro, or something else?

Are you trying to move a database in a Sesame application to a different branch within the same application?  Are you trying to move a database in a Sesame application to another Sesame application?  If Yex, is there already a database in the destination application with the same name?

You are trying to move some data from database type X to a new database type X or type Y?  Just need to move the data, or are you trying to move protramming, forms, reports, etc.?  It does sound like you only want to move the records.  Remember that Sesame can only import a comma delimited file at this time, so that will have some bearing on how you attempt to do this.


  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How to: copy records from one db to a differen
Reply #6 - Jun 9th, 2004 at 1:09pm
Print Post Print Post  
Also,

I 'think' the export file will be saved on a path relative to the server. This is important if you are connecting via a lan.

If you save your export file to C:\export.csv you may need to look on the Servers C: drive, not on your local machine.

If Sesame ignores your '|' delimiter, you can use notepad to find/replace the pipe with a comma.

Steve
  
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How to: copy records from one db to a differen
Reply #7 - Jun 15th, 2004 at 8:33pm
Print Post Print Post  
Spanitz,

The export tool is broken in ver 1.0.4. If your still having problems with import/export, hold off until they fix it.

Steve
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: How to: copy records from one db to a differen
Reply #8 - Jun 15th, 2004 at 8:59pm
Print Post Print Post  
Quote:
Spanitz,

The export tool is broken in ver 1.0.4. If your still having problems with import/export, hold off until they fix it.

Steve


Only if you are exporting unbound elements which can't be exported anyway.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged