Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Cannot create app from SQL Script

Nejc VidmarFeb 8 2025

Hello! I am bigginer to APEX and I wonder if someone know how to crate aplication from my own SQL script. Not generated from QuickSQL. Bacuse when I run CreateApp in SQL Scripts it says that my script does not contain any CREATE TABLE statments. Where is the issue? Myb in Schema?

Code.sql

This post has been answered by Steve Muench-Oracle on Feb 9 2025
Jump to Answer

Comments

PetarSimic

Hi @shoter3000 , I think you should run the script first and then click on Create App button.

Nejc Vidmar

yes, I did that, but it still doesn't work

PetarSimic

Ok, did you check if objects are created? Are there errors on execution?

Nejc Vidmar

There is no errors at execution. The sql code is correctly written.

Steve Muench-Oracle
Answer

Hi, on apex.oracle.com, I created a SQL Script with the contents consisting of just your first create table statement:

CREATE TABLE es_inventura (
    leto NUMBER CONSTRAINT inventura_leto_nn NOT NULL, 
    CONSTRAINT ex_inventura_pk primary key (leto)
);

Then I ran the script to create the table.

Then when I click (Create App) it is showing me the following as expected.

Can you double-check that the tables actually did get successfully created? Try to see if it works for you with just your first table as in my test above. By adding additional tables to the test script from the original one, perhaps you can help narrow down which create table statement might be leading to the error message you are seeing.

Marked as Answer by Jayson Hanes - APEX PM North America-Oracle · Feb 10 2025
Nejc Vidmar

I tried creating only one table and it still showing this message. I have tried on Apex Oracle Cloud and it is working. But schema is different on oracle cloud. And when I create my own schema it still doesn't work on my local Apex. On Oracle cloud vresion is 24.1.7 and my local version is 24.2.0.
Do you know how to delete schemas, because they are still showing even after the workspace is deleted.

Steve Muench-Oracle

If you connect to your local database as SYS, you can drop a user/schema with all its contents using the command:

SQL> drop user your_username cascade;

NOTE: This deletes all tables and data.

sean4938

Same issue. I am using a script to create tables. Run the script and verify they are created. I get same message. I am running APEX on premise, not cloud.

Steve Muench-Oracle

Can you email me a reproducible test case? steve.muench@oracle.com

Thanks.

Nejc Vidmar

I solved the issue like that: I created App on apex cloud and then just exported the workspace and app to my local apex and it is working.

Steve Muench-Oracle

That's great news. But for the purposes of trying to triage and report the potential bug you encountered, if you have a SQL script for which the “Create App” from script is failing, I'd be interested in getting a copy of a reproducible testcase script to see if I can reproduce the issue in house. If getting that is not appropriate, I understand, but just wanted to clarify that I'm still interested in tracking down whether you were encountering a reproducible bug. Thanks.

sean4938

I was able to resolve this issue by only creating one table. If you create more than one table, it will not work. I was creating employee and department tables with a FK relationship hoping it would generate forms and sub-forms.

1 - 12

Post Details

Added on Feb 8 2025
12 comments
172 views