Solved

query in Oracle forms Builder

Posted on 2016-11-15
2
52 Views
Last Modified: 2016-11-15
Hi experts

i have this query in a Oracle forms Builder
select rtrim(PTRTRAAPP)||' '||rtrim(PTRTRAAPM)||' '||rtrim(PTRTRANOM) nombre, PTRCODTRA codigo
from   plnmaetra
where  (PTRCODCIA=:global.cia or PTRCODCIA='008' or PTRCODCIA='001')
and    PTRCODSUC='001'
and    PTRCODTRA=PTRCODTRA
and    ptrflgest NOT IN ('D','A','J','4'/*,'C'*/)
AND    rtrim(PTRTRAAPP)||' '||rtrim(PTRTRAAPM)||' '||rtrim(PTRTRANOM) LIKE '%'||:B03.VAR_DESEMP||'%'
order  by rtrim(PTRTRAAPP)||' '||rtrim(PTRTRAAPM)||' '||rtrim(PTRTRANOM)

i need execute in PL/SQL Developer, With what code should I replace this?
:global.cia
ptrflgest NOT IN ('D','A','J','4'/*,'C'*/) whats the mean: *,'C'*
:B03.VAR_DESEMP
0
Comment
Question by:enrique_aeo
2 Comments
 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 250 total points
ID: 41888028
This is a comment:   /*,'C'*/,     /* is the comment start delimiter,   */  is the comment end delimiter

so  
     ptrflgest NOT IN ('D','A','J','4'/*,'C'*/)
is functionally the same as
     ptrflgest NOT IN ('D','A','J','4')


pl/sql developer supports bind variables  but not with periods in them.

So,  in a Test Window  (not a SQL Window),  change   :global.cia  to :global_cia
and   :B03.VAR_DESEMP  to :B03_VAR_DESEMP

and then on the bottom of the window you can specify the variable names (without the colons), datatypes and values.
0
 
LVL 35

Accepted Solution

by:
Mark Geerlings earned 250 total points
ID: 41888632
And ":global.cia" and ":B03..." are references to Oracle Forms variables that likely have particular values inside the Form.  You will have to provide values to replace those variables if you run this outside of Oracle Forms.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question