Solved

query in Oracle forms Builder

Posted on 2016-11-15
2
59 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 74

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

792 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