Copy table data

Thanks, and you're welcome.

On Mon, Jul 10, 2017 at 12:08 PM, honglei bounce-honglei@toadworld.com wrote:

RE: Copy table data

Reply by honglei
This is a great community. Very fast response. It helps a lot

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle Forum notifications altogether.

Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.

--
Gene L. Bradley Jr.

Systems Analyst

Office of Information Technology

Jackson State University

1400 J R Lynch Street

P.O. Box 17750

Jackson, MS 39217

ph 601.979.1042

fax 601.371.9146

email gbradley@jsums.edu

*In God we trust; all others bring data. * ~W.E. Deming

CONFIDENTIALITY STATEMENT

This electronic transmission is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone (601) 979-1042. Thank you.

Tried to restore the table data with following commend as suggested. Found out that it inserted the backup not replaced with back.

ex.

table data

SAMPLE

           1

           3

SAMPLE_BACK

           1

           2

           3

After run following:

truncate table SAMPLE;

insert into SAMPLE select * from SAMPLE_BACK <ß-------is there an “replace” command?

SAMPLE

           1

           3

           1

           2

           3

Thanks,

Hong

From: gene.l.bradley [mailto:bounce-genelbradley@toadworld.com]

Sent: Monday, July 10, 2017 12:36 PM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] Copy table data

RE: Copy table data

Reply by gene.l.bradley

Thanks, and you’re welcome.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle Forum
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

The truncate command empties the SAMPLE table before you insert data back into it, so you shouldn’t need any kind of replace command (if you did need it, in oracle it’s called MERGE).

Be sure to have a semicolon after each statement.

Put the cursor on the line with the TRUNCATE command and then hit F9. You should see “table truncated” at the bottom of the Editor window as feedback.

Next, put the cursor on the line with the INSERT command and then F9 again. You should see # of rows insert at the bottom of the Editor window as feefback.

Finally, run a COMMIT; command (or click the COMMIT toolbar button) to make sure the data stays there after you disconnect.

After followed your detailed instructions. It worked perfect. Thanks a lot

Hong

From: John Dorlon [mailto:bounce-jdorlon@toadworld.com]

Sent: Monday, July 10, 2017 3:48 PM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] Copy table data

RE: Copy table data

Reply by John Dorlon

The truncate command empties the SAMPLE table before you insert data back into it, so you shouldn’t need any kind of replace command (if you did need it, in oracle it’s called MERGE).

Be sure to have a semicolon after each statement.

Put the cursor on the line with the TRUNCATE command and then hit F9. You should see “table truncated” at the bottom of the Editor window as feedback.

Next, put the cursor on the line with the INSERT command and then F9 again. You should see # of rows insert at the bottom of the Editor window as feefback.

Finally, run a COMMIT; command (or click the COMMIT toolbar button) to make sure the data stays there after you disconnect.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle Forum
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.