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!

htp.p without line feed character

M.EmmanuelJan 30 2019 — edited Jan 30 2019

I have the following PL/SQL block which is intented to be used as AJAX Callback in APEX 18.

DECLARE

  pHasProvinces INTEGER;

BEGIN

  p302_country_code := apex_application.g_x01;

  SELECT COUNT(*)

  INTO pHasProvinces

  FROM SUBDIVISION

  WHERE

      SUBDIVISION_LEVEL = 3 AND

      COUNTRY_CODE_ALPHA2 = p302_country_code;

 

  IF pHasProvinces > 0 THEN

      htp.p('YES');

  ELSE

      htp.p('NO');

  END IF;

htp.p returns 'YES' or 'NO' with a line feed character at the end.

1. Is it possible to return 'YES' or 'NO' without line feed?.

2. Is this the recommended way to implement a PL/SQL AJAX callback which returns text in Oracle 18c?

Oracle 18c XE

This post has been answered by Paulzip on Jan 30 2019
Jump to Answer
Comments
Post Details
Added on Jan 30 2019
1 comment
1,436 views