Skip to Main Content

SQLcl: MCP Server & SQL Prompt

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!

Is there documentation for SQLCL Format's options?

User_6BTKCOct 22 2021

Hello,
I have an xml file of my settings I use with SQLCL to do some formatting of my code as part of my check-in process. I created that XML file as indicated by this user:

SQLcl – Setting Up the Formatter (0 Bytes)
From SQLDeveloper but I was wondering if there is documentation of all the parameters and settings available? For example is there a setting to not align procedure parameters depth to the end of the procedure declaration and instead do so more C like and simple tab in once.
Thank you in advanced.

Comments

Gaz in Oz

One convoluted way would be to use REGEXP_LIKE()
For example, using WITH() to mimic dummy table and dummy data:

SQL> ed
Wrote file afiedt.buf

 1 with f0101 (aban8, abalph, abat1) as (
 2    select   33, 'Text', 'V' from dual union all
 3    select  998, 'Some', 'V' from dual union all
 4    select 1023, 'More', 'V' from dual union all
 5    select 1024, 'text', 'V' from dual
 6 )
 7 select aban8, abalph
 8 from  f0101
 9 where abat1 = 'V'
 10 and   regexp_like(aban8, '^(' || replace(replace(:p_aban, ',', '|'), ' ') || ')$')
 11* or    :p_aban IS NULL
SQL> exec :p_aban := '33,998';

PL/SQL procedure successfully completed.

SQL> /

    ABAN8 ABAL
---------- ----
       33 Text
      998 Some

2 rows selected.

SQL> exec :p_aban := NULL;

PL/SQL procedure successfully completed.

SQL> /

    ABAN8 ABAL
---------- ----
       33 Text
      998 Some
     1023 More
     1024 text

4 rows selected.

SQL> exec :p_aban := '1023, 1024';

PL/SQL procedure successfully completed.

SQL> /

    ABAN8 ABAL
---------- ----
     1023 More
     1024 text

2 rows selected.

SQL>
YoungTL

Thanks a lot.
If nothing else, I'll try use the procedure.
You know in the Jaspersoft Studio I can use java.util.Collection ,it work really good,
but i can't find this type in JasperReport Server's input control.
I think maybe can add this type ,but i don't know how to add it.

User_H3J7U

Jaspersoft Studio User Guide/Parameters/IN & NOTIN

YoungTL

As you see I had try use $X {in},but what input control type i should use,
there not any Collection  item to select.
the condition should be manual input,there more then thousands result,
I can't use multi_select Query ,let user to select ,maybe they only want to see 3 or 5 result, from thousands result to select 3 or 5 result isn't good.

o4.jpgo5.jpg

1 - 4

Post Details

Added on Oct 22 2021
2 comments
655 views