Skip to Main Content

SQL & PL/SQL

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!

Detect line break in while getting the parameter values in APEX

Niki DilipJul 25 2022 — edited Jul 27 2022

I have a textbox which gets inputs from the user in page1.I am using APEX to create my page 1. On submit the values gets displayed in the page2. The problem is, if the user inputs the data with line breaks in the textbox in page1, the values are getting displayed in the single line in page2. How do i handle it. I am using plsql procedures to display the values in 2nd page via htp.print.
For example: My p1_long_description entered in page 1 as
This is a test script.
It tests for the line break.
Get the values as is.
In page 2 while fetching the values using htp.prn('My long des is :'||:p2_long_description); I am getting it as "This is a test script. It Test for the line break. Get the values as is."
How do i handle this? what should be my approach?
Thanks & Regards,

This post has been answered by BluShadow on Jul 27 2022
Jump to Answer

Comments

InoL

That is not how APEX works. When you upload a csv file, you can either use the Data Load Wizard or your own process to parse and load the data in the file using APEX_DATA_PARSER.
Oracle Application Express 18: Creating a Data Load Wizard for Your Application (0 Bytes)
APEX_DATA_PARSER : Convert simple CSV, JSON, XML and XLSX data to rows and columns. (0 Bytes)
SQLLoader would typically run on the database server to load a file on the database server. I don't think that is what you are looking for.

User_C0JD6

SQLLoader would typically run on the database server to load a file on the database server. I don't think that is what you are looking for.

this is what i was after tbh. Apex accepting the CSV file as an upload to a director and sql loader getting kicked off. But I’m guessing it will have to be a combination of files uploaded to a directory and a continuous daemon checking for new files and the daemon kicking off the sql loader

AndyH

If you don't want to process the file (using APEX_DATA_PARSER, your own CSV processing, etc.) you could write the uploaded blob to the database file system and then access it as an external table.

User_C0JD6

Thank you Andy and Inoll

InoL

Apex accepting the CSV file as an upload to a director and sql loader getting kicked off.
That seems a bit strange: upload the file to the database (that is what APEX does), write the file to a database directory and then load the file back into the database. I think it is so much easier to skip the part of writing and reading the file from a database directory.
If you really want to do that, I agree with AndyH: access it as an external table, don't use SQLLoader.

1 - 5

Post Details

Added on Jul 25 2022
4 comments
401 views