Solved

query in Oracle forms Builder

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
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.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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

948 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

21 Experts available now in Live!

Get 1:1 Help Now