Home » SQL & PL/SQL » SQL & PL/SQL » Procedure
Procedure [message #358704] Wed, 12 November 2008 04:24 Go to next message
oliveiraum
Messages: 16
Registered: November 2008
Junior Member
Good morning!

can somebody help me with this procedure?

EXECUTE IMMEDIATE 'TRUNCATE TABLE APP_TMP_FVENDAS';
INSERT INTO APP_TMP_FVENDAS(NIF,ID, TC1, TC2)
SELECT distinct NIF, FVENDAS_SEQ.NEXTVAL, TC1, TC2 FROM APP_TMP_FVENDAS_WORK
COMMIT;

I want to insert values from APP_TMP_FVENDAS_WORK to APP_TMP_FVENDAS, does this going to work?
I have no error but i want to know if really will have the desired effect...

Thank you
Re: Procedure [message #358706 is a reply to message #358704] Wed, 12 November 2008 04:30 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

It will work As long as

Data types of source and target table's are compatible
No constraint is violated
Semi colons ( ; ) are in place.

Smile
Rajuvan.

[Updated on: Wed, 12 November 2008 04:31]

Report message to a moderator

Re: Procedure [message #358707 is a reply to message #358704] Wed, 12 November 2008 04:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and use code tags.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

If you are unable to answer this question I think you should hire someone to do the job instead of relying on a forum.

Quote:
I have no error but

Prove it and copy and paste your SQL*Plus session.

Regards
Michel
icon14.gif  Re: Procedure [message #358723 is a reply to message #358707] Wed, 12 November 2008 05:26 Go to previous message
oliveiraum
Messages: 16
Registered: November 2008
Junior Member
Thanks for the help...

Be seen you Razz
Previous Topic: 2 rows contain same values but different columns
Next Topic: Case and Decode
Goto Forum:
  


Current Time: Sat Dec 03 14:13:41 CST 2016

Total time taken to generate the page: 0.10772 seconds