Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

query in Oracle forms Builder

Posted on 2016-11-15
2
Medium Priority
?
87 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 1000 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 1000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

715 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