Solved

query in Oracle forms Builder

Posted on 2016-11-15
2
25 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
Comment Utility
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 34

Accepted Solution

by:
Mark Geerlings earned 250 total points
Comment Utility
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.

Join & Write a Comment

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…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now