SQL - select Help - box When? Return value of the second Table?
-Next to people on this forum I am probably somewhere between a beginner and an intermediate SQL user.
Ive been using a case when stated in plsql to find "all who has status in any program was canceled during a specific time, but have become or are still active in another program"
So, Im actually trying to return a value from another table in a case where, but this isn't anthing taste other than a text declared as 'Yes' or 'no '.
This is the select statement - y at - it another way to do it where I can get the results I need?
-case when pp.party_id in (select pp1.party_id - cancelled active clients in another program)
of asa.program_participation pp1,.
ASA.curr_prog_participation_status cpps1
where pp1.program_participation_id = cpps1.program_participation_id
and pp1.party_id = pp.party_id
and cpps1.code_value = 'Act')
So 'Yes' is still 'No' end as Active_in_Other_Prg
So - instead of 'Yes', I want essentially the program they are active or pp1.program_id, another null
It is possible that the client can be active in more than one program as well.
Any help is greatly appreciated, I explored with if and decodes but I can't get anything to work.
Ben
Looks like an outer join. See doc ora: joins at
Select p
q.party_id
q.program_id
of table_with_party_id p
, (select pp1.party_id - cancelled active clients in another program)
pp1.program_id
of asa.program_participation pp1,.
ASA.curr_prog_participation_status cpps1
where pp1.program_participation_id = cpps1.program_participation_id
and pp1.party_id = pp.party_id
and cpps1.code_value = 'ACT') q
where p.party_id = q.party_id (+)
Note: In the example above shoudn't it be a space between the (and +), but the forum software automatically converts to
The outer join will connect display all records in the table p and q records only if fits the party_id, IE q.party_id and q.program_id will be null if there is no match.
Edit: adding program_id
Tags: Database
Similar Questions
-
Syntax of the function BOX when multiple values equals the same result?
I tried using the key word 'IN' with the CASE function, but it does not work, each case must be indicated separately? trying to save a few lines...
has tried:
case me607.rmc_code
When to (',' MS', 'MP') then 'H311.
end as carrier_code
What I do:
case me607.rmc_code
When'm ' then 'H311.
When "MS," then "the H311.
When 'MP' and then 'the H311.
end as carrier_code,
etc...
Thanks for any help...case when me607.rmc_code in ('M','MS','MP') then 'H311' end as carrier_code
Max
-
Key on the keyboard does not work in firefox box when you type in the web site, but it works everywhere else?
Try Firefox SafeMode to see how it works there.
A way of solving problems, which disables most of the modules.
(If you use it, switch to the default theme).- You can open the mode without failure of Firefox 4.0 + by pressing the SHIFT key when you use the desktop Firefox or shortcut in the start menu.
- Or use the Help menu option, click restart with the disabled... modules while Firefox is running.
Do not choose anything at the moment, just use 'continue in safe mode.
To exit safe mode of Firefox, simply close Firefox and wait a few seconds before using the shortcut of Firefox (without the Shift key) to open it again.
If it's good in Firefox Safe mode, your problem is probably caused by an extension, and you need to understand that one.
http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+themesCan be caused by an add-on to the AVG.
When find you what is causing that, please let us know. It might help others who have this problem.
-
How to get the return value of the activity of the method in the stubborn workflow
Hi all
I use Jdeveloper 11 g R2 (11.1.2.3) & Weblogic 10.3.5.0
I have a stubborn workflow, default activity is a call method than calling a method in the app module
This method returns an id
I need this code in my project to do something else
Is there a way I can access the return value of the method call activity?
Concerning
MohsenSet the value of return as #{{pageFlowScope.myBean.returnValue} pageFlowScope.myBean.returnValue} in the method, call the property inspector and get the value in your managed bean.
String returnParam = (String) JSFUtil.getFromPageFlow ("returnValue");
-
How to assign values to the nested table and passes as a parameter for the procedure?
How to assign values to the nested table and passes as a parameter for the procedure?
Here are the object and its type
create or replace type test_object1 as an object
(
val1 varchar2 (50).
val2 varchar2 (50).
VARCHAR2 (50) val3
);
create or replace type test_type1 is table of the test_object1;
create or replace type test_object2 as an object
(
val1 varchar2 (50).
val2 varchar2 (50).
VARCHAR2 (50) val3
);
create or replace type test_type2 is table of the test_object2;
GRANT ALL ON test_object1 to PUBLIC;
GRANT ALL ON test_type1 to PUBLIC;
GRANT ALL ON test_object2 to PUBLIC;
GRANT ALL ON test_type2 to PUBLIC;
Here is the table object type:
create the table test_object_tpe
(
sl_num NUMBER,
Description VARCHAR2 (100),
main_val1 test_type1,
main_val2 test_type2
)
NESTED TABLE main_val1 STORE AS tot1
NESTED TABLE main_val2 STORE AS earlier2;
-----------------------------------------------------------------------------------------------------------
Here is the procedure that inserts values into the nested table:
PROCEDURE INSERT_TEST_DATA (sl_num in NUMBER,
Description in VARCHAR2,
p_main_val1 IN test_type1,
p_main_val2 IN test_type2
)
IS
BEGIN
FOR rec in p_main_val1.first... p_main_val1. Last
LOOP
INSERT INTO xxdl.test_object_tpe
(
sl_num,
Description,
main_val1,
main_val2
)
VALUES
(
sl_num
description
test_type1 (test_object1)
p_main_val1 .val1 (CRE),
p_main_val1 .val2 (CRE),
p_main_val1 .val3 (rec)
)
)
test_type2 (test_object2 (p_main_val2 .val1 (CRE),
p_main_val2 .val2 (CRE),
p_main_val2 .val3 (rec)
)
)
);
END LOOP;
commit;
END INSERT_TEST_DATA;
-------------------------------------------------------------------------------------------
Here are the block anonymoys what values attributed to the object type and pass values in the procedure:
Set serveroutput on;
declare
p_sl_num NUMBER: = 1001;
p_description VARCHAR2 (50): = 'Test Val1;
inval1 test_type1: = test_type1();
inval2 test_type2: = test_type2();
Start
inval1 (1) .val1: = "testx1";
inval1 (1) .val2: = "testx2";
inval1 (1) .val3: = "testx3";
inval2 (1) .val1: = "testy1";
inval2 (1) .val2: = "testy2";
inval2 (1) .val3: = "testy3";
CSI_PKG. INSERT_TEST_DATA (sl_num = > p_sl_num,)
Description = > p_description,
p_main_val1 = > inval1,
p_main_val2 = > inval2
);
end;
/
Someone can correct me.
Thank you
LavanThanks for posting the DOF and the sample code but whenever you post provide your Oracle version 4-digit (result of SELECT * FROM V$ VERSION).
>
How to assign values to the nested table and passes as a parameter for the procedure?
>
Well you do almost everything bad that could be hurt.Here is the code that works to insert data into your table (the procedure is not even necessary).
declare p_sl_num NUMBER := 1001; p_description VARCHAR2(50) := 'Testing Val1'; inval1 test_type1 := test_type1(); inval2 test_type2 := test_type2(); begin inval1.extend(); inval1(1) := test_object1('testx1', 'testx2', 'testx3'); inval2.extend(); inval2(1) := test_object2('testy1', 'testy2', 'testy3'); INSERT INTO test_object_tpe ( sl_num, description, main_val1, main_val2 ) VALUES (p_sl_num, p_description, inval1, inval2); commit; end; /
See example 5-15 making reference to an element of nested Table Chapter 5 using PL/SQL collections and records in the PL/SQL doc
http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/Collections.htm#CJABEBEA1. you don't even have the procedure because it is a simple INSERTION in the table you can do directly (see my above code)
inval1(1).val1 := 'testx1';
Since you have not yet created all the elements, there is no element 1 "inval1". You need EXTEND the collection to add an element
inval1.extend();
And then, there is an empty element, but "inval1" is a container for objects of type 'test_object1' not for scalars as "val1", "val2", and "val3".
If you can not doinval1(1).val1 := 'testx1';
You must create an instance of 'test_object1 '.
inval1(1) := test_object1('testx1', 'testx2', 'testx3');
And so on for the other collection
You don't need the procedure (as my code example shows), but once you fill in the variables correctly it will work.
-
Referencing of the values of the dynamic tables
Hi you all!
I am building a form for one of my clients. It is divided into three languages depending on who fills out the form.
You can start of Poland then switch to English and watch that all filled. Someone else can do the same thing
but starts of English and following pages in Polish. There is also a German part in it.
Previously, it was a static form for each value had been spread between parts of a document
by linking it as global.
Now I have a dynamic PDF with dynamic arrays. I have to generate rows in the same table
in each languages part and a person who can go to any language (part of the document).
I enclose a small example of two subforms. Each represents the different language version. Buttons
each of them can add rows in both tables at the same time.
I tried to write formulas for cells to Exchange data between. In this example, this works. When I import these
subforms in my real paper, that it stops working.
How can I bind values between cells of these tables to use both ways, from any of them?
Any part must copy a value of corresponding cells, both ways.
http://strony.Aster.pl/Wystawa/www/tables_example.PDF
Kind regards
Sylwester Zacheja
Hello
There is here an example that might be of help to you: https://acrobat.com/#d=hkeDKn6SRo1FAvFUoY6Smw
If you look at the script in the second print button, you will see how she fills in the values of the visible table to a hidden table.
Also this example can help: https://acrobat.com/#d=z9JRAb-7bKkdBwRHM4EHGw
Niall
-
How to fill the value in the nested table by using the object type
Hi gurusI created an object type and able to fill the values in it, now I want to create a nested table type of this object and fill it but looks like I'm doing something wrong, see my code below.
Code example
CREATE or REPLACE TYPE countries_o
AS
OBJECT
(
COUNTRY_ID TANK (2 BYTES),
COUNTRY_NAME VARCHAR2 (40 BYTE),
REGION_ID NUMBER);
/create or replace type countries_t is table of the countries_o;
/CREATE OR REPLACE
ABC of the PROCEDURE
IS
v_print countries_t; -: = arr_countries_t('01','Aus',1);
BEGIN
v_print: = countries_t('01','A',11);
DBMS_OUTPUT. Put_line (v_print. COUNTRY_ID | v_print. COUNTRY_NAME | v_print. REGION_ID);
END;
/
Error
- Error (6.3): PL/SQL: statement ignored
- Error (6,12): PLS-00306: wrong number or types of arguments in the call to 'COUNTRIES_T '.
- Error (7.3): PL/SQL: statement ignored
- Error (7.32): PLS-00302: component 'COUNTRY_ID' must be declared
Thanks in advance
Concerning
Muzz
Hi user,
Here is another method that you can try-
CREATE OR REPLACE
ABC of the PROCEDURE
IS
v_print countries_t: = countries_t (countries_o('01','A',11));
BEGIN
DBMS_OUTPUT. Put_line (v_print (1).) COUNTRY_ID | v_print (1). COUNTRY_NAME | v_print (1). REGION_ID); -you're accessinf the first element of the nested table, which in turn points to the object.
END;
In the sections of the declaration you have assigned values to the nested table.
Kind regards
Maxou - Error (6.3): PL/SQL: statement ignored
-
When I download on the second mac it downloads as a trial
@
Hello
When I download on the second mac it downloads as a trial
Please explain that I read in this discussion that I can use my apps on two macs (in office work and macbook at home)concerning
Hello
Please see the below help documents:
Applications creative Cloud back in test mode after an update until 2015 for CC
Kind regards
Sheena
-
Get the value of the second column used for the formatting of the break
Hello
I have a report that uses breaks on the first and second columns. Breaks are displayed as headers repeat on break and I am able to display the value of the first column to break using #COLUMN_VALUE # section rehearsal breaks use this format, use #COLUMN_VALUE # subs. I would like to know if there are somewhat similar to refer to the value in the second column of the break.
Looked at some other threads on this topic and it seems that this was not possible in versions 3.x pre of the Apex. Would like to know if there is a way to achieve Apex version 3.1.0.00.32.
Kind regards
RupeshIn the new version, interactive reports can break on / up to 6 columns. In previous versions, I just join together the two columns that had to be broken off on so you can have a column in the report settings available.
I hope this helps.
Mike
-
Return the value to the second point based on LOV select on the Fort point
When a user selects a value (Group_Desc) of an element of LOV (created from a table), I want a corresponding value in the table to display in a second point (Director_Name) on the page. I don't know JavaScript, but found an example clear to the sum of the 3 elements of page in the 4th point-http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/javascript.htm#CHDDCIFE is similar but rather then making the sum of the values of the elements for the new item, I want to use a select look up of the table based on the return value for Group_Desc (point 1) to be included in article 2.
If the use of javascript is the only way to do it (and I would appreciate another way), I need help with the code for the example cited to reflect a return value to pass to the point 2 of this selection.
Select Director_Name from groups where Group_Desc =: P7_Group_Desc;
Here's the example I found.
function getVal (item) {}
If (document.getElementById (point) .value! = "")
Return parseFloat (document.getElementById (item) .value);
on the other
return 0;
}
document.getElementById('P1_TOTAL').value =.
getVal ('P1_ONE') + getVal ('P1_TWO') + getVal ('P1_THREE');
}
Thanks for any help,
KarenKaren
I'll take a look in the morning.
Your description is not yet very clear (although I admit that I have not yet watched the app).
Please can you set desired entries and exits in you app.
See you soon
Ben
-
Can not enter wildcard (*) in the file selection dialog box when opening a file
It's something I've not seen before. I posted this question in the forum Autodesk AutoCad LT five days ago, but I got no answer at all. Because I'm not sure whether it is a Windows or a problem with Autocad, I thought I'll try to post here, too.
On one of our AutoCad workstations, when you open a drawing, we cannot enter a wildcard character (*) in the file selection dialog box to help unravel the drawings.
In other words, say there are 10 versions of a drawing with the number 5008. I should be able to enter the 5008 * and just see these ten designs. On this computer, when I try to type an asterisk (*), I get this error message: invalid character. The following characters are not allowed in file names: \ /: *? "<>
Now, I know that they are not allowed... but I don't mean to create a file name. I'm just trying to classify them. On our other RTE Autocad workstations, the wildcard character works fine. What's up with this one? Y at - it a setting or a variable that controls this?
Thanks - Kevin
Hello
· The problem occurs with any other application?
It may be some setting in Auto CAD, which raises the question, and its best you seek help from experts in DAO automatic.
Diana
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think.If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.
-
Help box when the mouse on a Word
How to bind a help box are displayed when the user "hover over" a word or symbol. Preferably, the help box would be dim-in to display text and line when the user moves the pointer over the word? Thank you.
Hello
Please try to composition of ToolTip widget, it will help you to serve your purpose.
You can find this object widget > add Widget > Composition > Tooltip
Kind regards
Vivek
-
display and return value to the selection list.
Jin
I want to display the value in the list of selection from this quary.
Select student_id in the class_record where class_id =: p1_class_id and SECTION =: p1_section
less
Select student_id in the STUDENT_TYPE_DETAILS where class_id =: p1_class_id and SECTION =: p1_section;
but I want what and name with student_id l_name store in the s_per_det.student table and .f_name is also in this table.
How to define the display value and return in this quary value using 3rd table s_per_det.
How can I do that.
Thank you
MauryOoh, NEGATIVE... Can you not use a NOT EXISTS in this case, could have a significant impact on the execution plan?
Something like this maybe?
SELECT f_name||' '||l_name, stundent_id FROM class_record a, s_per_det b WHERE a.student_id = b.student_id AND a.class_id = :P1_CLASS_ID AND a.section = :P1_SECTION AND NOT EXISTS(SELECT 'X' FROM student_type_details c WHERE a.student_id = c.student_id AND c.class_id = :P1_CLASS_ID AND c.section = :P1_SECTION)
See you soon
Ben
http://www.munkyben.WordPress.com
Don't forget to mark the answers useful or correct ;) -
The return value to the line for dialogue ObjectChoiceField
Hello world
Is it possible the value of line so that when the items in ObjectChoiceField Dialog(the one that's pops up when you click on the field) appears on multiple lines according to the width of the text?
For now, it shows only one line per element truncate the ending text substituting... If any, it is displayed in several line wrapped Word when selected however.
For any help or suggestion would be greatly appreciated that I would need to display the full text when the user scrolls items in the context menu
Thank you & best regards
Maia
This is not supported by the ObjectChoiceField. You can create a custom field to accomplish this where you manually draw the sting using a Graphics object.
-
How to return values from the record following instead of in the same record in LOV
Hi all
I use Forms 10 G.
I have a block of details. In what in the 3rd column, I have a LOV.
My requirement is let say I asked for it from the 1st and 2nd column, and it shows 1 record.
After that if I pressed F9, then it should display the LOV list and, when I select a value any then it will create a new record with the same value of 1st and 2nd column.
Example: -.
Agenda provider country 123 ABC India We here in the column 'Country' LOV. Then when I pressed F9 then Lov should be displayed.
as below.
List of countries India U.S.. Japan It works very well so far.
Now if I select from the USA in the list then it should create a new record with the values of 1st and 2nd column.
Agenda provider country 123 ABC India 123 ABC Japan How can I do this?
Besically I need, rather than return the value in the same record, he must return to the next with the exsiting values record.
The algorithm is:
-use the KEY-LISTVAL about to 'COUNTRIES '.
-LOV execution using builtin show_lov
-store the return value Lov any parameter or a local variable in your trigger code ( vL_dummy_Deger varchar2 (100); )
-Create registration
-assign value to any new item you want to
code like this:
declare
vLDummy boolean;
vL_dummy_Deger varchar2 (100);
Start
-lov runs lov ruturns value is assigned to all the dummy elements to store Lov, return value. (no need to display)
"-" DUMMY "point lets store lov, return value.
vLDummy: = show_lov ('LOV_ULKE');
--
vL_dummy_Deger: =: model;
create_record;
: new_item: = vL_dummy_Deger;
end;
Maybe you are looking for
-
Layout of Satellite C660 - 14 X - wireless disappeared
Hello! Have a big problem on my PC!When I formatted my pc today, all the drivers in the computer had disappeared. I don't know how many drivers I installed to make the wireless to work! I can't find any drivers that will work. Need help with this ple
-
Update iOS 9.2.1 keeps disconnecting wifi
Since that I upgraded my iPhone iOS 9.2.1 as my wifi guard disconnection during the use of the Internet. I tried to restart my phone but without success, not even when disconnecting wifi and turning back on. To THE point that I had to go back to the
-
Computer does not start with connected external HARD disk
Although my BIOS doesn't look like another hard drive, when I start my computer with the external hard drive, the main computer shuts down until I have disable externally. I want to have external to back up automatically but can not have both to play
-
Installing XP - 64-bit in the HP Pavilion Elite d5200t ATX CTO desktop PC
Hello! I recently got a HP Pavilion d5200t desktop pc. He came with pre-installed Vista 64 bit. Now, I want to install XP 64 bit or XP-32 bit and Vista 64-bit. I tried to install both XP 64 and XP-32, and he gave me a blue screen with error messages.
-
My labtop keeps showing a red x on the screen battery the charger is plugged in but not charging how do I know if it's the battery or the charger