Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 536.4K On-Premises Infrastructure
- 138.3K Analytics Software
- 38.6K Application Development Software
- 5.8K Cloud Platform
- 109.5K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.3K Integration
- 41.6K Security Software
Inserting data into a table using SQL file.

Inserting data into a table using SQL file.
I created a SQL file with insert into....select....
When I am executing the file in SQL plus it's showing no. of records inserted.
But when I use select * from table....it show no rows.
Answers
-
Did you execute the "select * from table ..." from the same SQL Plus session? If not, did you execute a COMMIT after inserting your records?
Brett
-
@Brett Calhoun Thank you. Issue resolved.
In SQL file date format issue. Now its working.
Only concern is when I executed same query from SQL Developer its working fine and inserting records. But when I am run .sql file from sqlplus its not showing any error over there.
I found this error when I am executing same query from Oracle APEX SQL Workshop .
-
SQL Developer Web (Database Actions) auto commits. SQL Plus and SQL Developer do not by default auto commit; although you can change this setting in each.
Glad you got it fixed.
Brett
-
@Brett Calhoun Yes you are right. I did commit in SQL file as well as after execution of the script. But my concern is why it not throw error when I run the same insert ...into .....select... from sql developer.
Thank you.
-
I do not know why it did not throw an error in SQL Developer. I'll need more information if you want me to investigate. Can you post a screen capture of the problem? And your SQL INSERT statements?