Display the procedure OUT value.
CREATE OR REPLACE PROCEDURE test_xyz (p_acc_id IN NUMBER) IS
p_status varchar2(20);
begin
if p_acc_id = 123
DBMS_OUTPUT.PUT_LINE('STOP');
end if;
end test_xyz;
this will display 'STOP' when i passed p_acc_id as 123.
similarly...
CREATE OR REPLACE PROCEDURE test_abc (
p_acc_id IN NUMBER, p_status out varchar2) is
begin
if p_acc_id = 123
p_status := 'STOP';
end if;
end test_abc;
if i am using OUT in my procedure how i have to display the p_status vlaue.
Thnak you....
CREATE OR REPLACE PROCEDURE test_abc (
p_acc_id IN NUMBER, p_status out varchar2) is
begin
if p_acc_id = 123
p_status := 'STOP';
end if;
end test_abc;
if i am using OUT in my procedure how i have to
display the p_status vlaue.
Thnak you....you forgot THEN after IF
declare
p_acc_id NUMBER := 123;
p_status VARCHAR2(30);
begin
test_abc (p_acc_id, p_status );
dbms_output.put_line(p_status);
end;
/** NOT TESTED ***
Regards
Dmytro
Message was edited by:
Dmytro Dekhtyaryuk
Similar Messages
-
How Can i get PLSQL Procedure out values in Shell Script?
Hi,
I need to use PLSQL Procedure out values in shell script by using that parameter i need to check and call the other procedure. Please can you guide me how can i?
#!/bin/ksh
# Function to call validation program
SQL_PKG_CALL()
echo "Inside SQL_PKG_CALL for $file"
sqlplus -s /nolog << EOF
whenever sqlerror exit failure
connect ${APPS_LOGIN}
variable exit_value NUMBER
set serveroutput on size 100000
DECLARE
l_errbuf VARCHAR2(10000) := NULL; l_retcode NUMBER := NULL;lv_test VARCHAR2(4000) := NULL;
BEGIN
fnd_global.apps_initialize ( USER_ID => ${USER_ID}, RESP_ID => ${RESP_ID}, RESP_APPL_ID => ${RESP_APPL_ID}
, SECURITY_GROUP_ID => ${SECURITY_GROUP_ID}
#Calling PLSQL procedure for create and attache document
XXAFPEEP_SO_DOC_ATTACH_INT.DOCUMENT_ATTACH (p_errbuf => l_errbuf, p_retcode => :RETMSG, p_fileName => $file
, p_debug => 'Y', p_rettest => lv_test);
# to print the procedure return values
DBMS_OUT.PUT_LINE('Return Message: '|| lv_test);
#${RETCODE}=l_retcode;
print :RETMSG;
END;
EXIT 0
EOF
# Program starts here
echo "+---------------------------------------------------------------------------+"
echo "Program Start"
APPS_LOGIN=${1} # Apps Login
USER_ID=${2} # User ID
RESP_ID=${5} # Responsiblity ID
RESP_APPL_ID=${6} # Responsiblity Application ID
SECURITY_GROUP_ID=${7} # Security Group ID
DIRECTORY_PATH=${8} # Directory --Attached file locations
DIRECTORY_NAME=${9} # Directory Name for plsql
echo "User ID : $USER_ID"
echo "Responsibility ID : $RESP_ID"
echo "Responsibilith Application ID : $RESP_APPL_ID"
echo "Security Goup ID : $SECURITY_GROUP_ID"
echo "Directory Path : $DIRECTORY_PATH"
echo "Direcotry Name : $DIRECTORY_NAME"
echo
#files direcotry
cd $DIRECTORY_PATH
echo Present Working Directory: `pwd`
echo
#for all file names
ALL_FILES=`ls *.pdf`
for file in $ALL_FILES
do
if [ -f $file ]
then
#log "Processing $file" # future
echo Processing: $file
# Calling the PL/SQL Program
SQL_PKG_CALL;
#echo "Retcode : $RETCODE"
echo "RetMessage : $RETMSG"
else
log "Skipped $file: invalid file"
echo "Skipping current file $file: not a valid file."
fi
done
Thanks
SudheerSaubhik's provided the solution, but just for fun:
Test procedure:
create or replace procedure get_ename
( p_empno in emp.empno%type
, p_ename_out out emp.ename%type )
is
begin
select ename into p_ename_out
from emp
where empno = p_empno;
end get_ename;Test data:
SQL> select empno, ename from emp order by 1;
EMPNO ENAME
7369 SMITH
7499 ALLEN
7521 WARD
7566 JONES
7654 MARTIN
7698 BLAKE
7782 CLARK
7788 SCOTT
7839 KING
7844 TURNER
7876 ADAMS
7900 JAMES
7902 FORD
7934 MILLER
14 rows selectedTest call from SQL*Plus to show it working:
SQL> declare
2 v_ename emp.ename%type;
3 begin
4 get_ename(7844,v_ename);
5 dbms_output.put_line(v_ename);
6 end;
7 /
TURNER
PL/SQL procedure successfully completed.Demo shellscript (borrowing the function idea from Saubhik):
#!/bin/ksh
empno=${1:-NULL}
exec_sql() {
sqlplus -s william/w@//vm.starbase.local:1521/eleven <<END_SQL
spool get_out_value.sh.log
set serverout on size 2000 feedback off
declare
v_name emp.ename%type;
begin
get_ename(${empno},v_name);
dbms_output.put_line('# ' || v_name);
end;
spool off
exit
END_SQL
ename=$(exec_sql ${empno} | awk '/^# / {print $2}')
print Employee ${empno} = ${ename}Demo:
/Users/williamr: get_out_value.sh 7844
Employee 7844 = TURNER
/Users/williamr: get_out_value.sh
Employee NULL =Note this substitutes the word NULL if no empno is passed, and it ignores error output or anything else by only looking for lines beginning '# ' and then taking the following word. Error messages will appear in the logfile. (In this example it probably doesn't need the NULL substitution because a missing parameter would cause a syntax error which the script will handle anyway, but it could be useful in more complex examples.)
For a production script you should probably use an OS authenticated account so you don't have to deal with password strings. -
Need to display the first 5 values of a Multi value parameter in SSRS report
Hi All,
I have SSRS report with multi value parameter. I need to display the parameter selection values in a text box. I've more than 50 records in the multi value parameter list. I've included the code to display "All" if I choose "select
all" option otherwise it will show the selected values. But, I need to change the logic. I have to show only the 1st 5 records if I choose more than 5 records.
How can I implement this?
I have used the below code
=iif(
Parameters!Country.Count = Count(Fields!Country.Value,
"Country")
,"All"
,iif(Parameters!Country.Count>5
,"Display the 1st 5 values"
,Join(Parameters!Country.Value,",")
Regards,
JulieHi Julie,
Per my understanding that you want to always show the first values from the param country to a textbox when you have select more then five values from the dropdown list, if you checked "select all", textbox will display "All", if
you select <=5 amount of values. it will display the selected values, right?
I have tested on my local environment and that you can create an hide parameter(Param2) to display just the first five values from the Country and when you select more then five values from country you will get the Join(Parameters!Param2.Value,",")
to display.
Details information below for your reference:
Create an new DataSet2 which the Param2 will get the values from:
SELECT TOP (5) Country
FROM tablename
Create an new param2 and hide this parameter, Set the "Available values" and "Default values" by select the "Get the values from a query"(DataSet2)
You can also Specify first five value for the "Available values" and "Default values", thus you will not need to follow the step1 to create the dataset2
Modify the expression you have provided as below:
=iif(Parameters!Country.Count = Count(Fields!Country.Value, "DataSet1"),"All" ,iif(Parameters!Country.Count>5 ,Join(Parameters!Param2.Value,","),Join(Parameters!Country.Value,",")))
Preview like below
If you still have any problem, please feel free to ask.
Thanks,
Vicky Liu
If you have any feedback on our support, please click
here.
Vicky Liu
TechNet Community Support -
Display the arabic total value in reuse_alv_grid_display
Hi,
how to display the arabic total value using reuse_alv_grid_display in sap abap . Plz help me in this matter.
Regards,
SA.Hi,
how to display the arabic total value using reuse_alv_grid_display in sap abap . Plz help me in this matter.
Regards,
SA. -
Display the 3rd hieghest value without using rowid
HI All,
Can any one help me how to display the 3rd hieghest valuer without using a ROWID..
Thanks
BasavaFrank, using ROWNUM = 1 instead of DISTINCT could be a bit faster:
SQL> SET LINESIZE 132
SQL> EXPLAIN PLAN FOR
2 WITH got_r_num AS (
3 SELECT DISTINCT sal,
4 DENSE_RANK() OVER(ORDER BY sal DESC NULLS LAST) AS r_num
5 FROM scott.emp
6 )
7 SELECT sal
8 FROM got_r_num
9 WHERE r_num = 3
10 /
Explained.
SQL> @?\RDBMS\ADMIN\UTLXPLS
PLAN_TABLE_OUTPUT
Plan hash value: 436395657
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 9 | 234 | 5 (40)| 00:00:01 |
|* 1 | VIEW | | 9 | 234 | 5 (40)| 00:00:01 |
| 2 | HASH UNIQUE | | 9 | 36 | 5 (40)| 00:00:01 |
|* 3 | WINDOW SORT PUSHED RANK| | 9 | 36 | 5 (40)| 00:00:01 |
| 4 | TABLE ACCESS FULL | EMP | 14 | 56 | 3 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
1 - filter("R_NUM"=3)
3 - filter(DENSE_RANK() OVER ( ORDER BY INTERNAL_FUNCTION("SAL") DESC
NULLS LAST)<=3)
18 rows selected.
SQL> EXPLAIN PLAN FOR
2 WITH got_r_num AS (
3 SELECT sal,
4 DENSE_RANK() OVER(ORDER BY sal DESC NULLS LAST) AS r_num
5 FROM scott.emp
6 )
7 SELECT sal
8 FROM got_r_num
9 WHERE r_num = 3
10 AND ROWNUM = 1
11 /
Explained.
SQL> @?\RDBMS\ADMIN\UTLXPLS
PLAN_TABLE_OUTPUT
Plan hash value: 21859616
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 26 | 4 (25)| 00:00:01 |
|* 1 | COUNT STOPKEY | | | | | |
|* 2 | VIEW | | 14 | 364 | 4 (25)| 00:00:01 |
|* 3 | WINDOW SORT PUSHED RANK| | 14 | 56 | 4 (25)| 00:00:01 |
| 4 | TABLE ACCESS FULL | EMP | 14 | 56 | 3 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
1 - filter(ROWNUM=1)
2 - filter("R_NUM"=3)
3 - filter(DENSE_RANK() OVER ( ORDER BY INTERNAL_FUNCTION("SAL") DESC
NULLS LAST)<=3)
19 rows selected.
SQL> SY. -
How to display the dataset field values in my ssrs bar chart report ?
HI i have a Bar Chart report in that i want to display the dataset one field values in my x-axis of my ssrs report? so how should i display those values into my bar chart report?
consider i want to display the Every Qtrly details in my x-axis so how should i ?
can you pls help me out for thisI have added the Category Group into my Report area with required field ,now i will get my required output.
-
Displaying the last row value + 1
Hi, I am sure the answer is out there, I just can't find despite hunting around. So a point in the right direction would be great if possible:
I am trying to display the 'future' number from an auto update primary key in an access d/base. I am getting the current number with the code below which obviously means that I just need to add 1 to it; if only it would let me have the result as an integer, but I can't seem to achieve that (can only get a string) therefore tried to make the string an integer, update, change it back & then display in textField, but I can't achieve that either...please help?
public void findCurrentRow()
try
query = "SELECT (customerID) from Professional";
stmt = myConnection.createStatement();
rs = stmt.executeQuery(query);
int i = 1;
while(rs.next())
rowNumber = rs.getString(i);
id.setText(rowNumber);
id.setEditable(false);
rs.close();
catch (SQLException ex)
fatalError(ex);
}I meant to ask why this did not work for you below ?
int rowNumber = rs.getInt(1);//returns an int type
the resultset method getInt() is not returning a integer?
I guessed that you were getting a non numerical return so you decided to return the value to a string getString() and see what was happening like the record value being returned was a float or other non-int type.
int rowNumber = Integer.parseInt(rs.getString(1));
A little off topic you could write your query to be
SELECT (WHATEVER) +1 FROM TABLE; //adds 1 to value
or if the DB has a nextVal func for sequences use that.
Ray -
How to display the Overall result value at the top of work book
Hi,
How can i display the value of Overall result(Sum of the Total) column at the top of the work book in Text field.
Thanks
SreadharGo to Query Global properties in Query designer and you can find a setting to show result rows on top. This setting will show overall result as first row in the report. But I don't think you can show it in Text field in WB.
-
How to display the current day value in Numbers app?
In Numbers 3.2.2, where the current date and time happens to be 17 Dec. 2014 11:46am:
What formula will display the current date's numeral value?
What formula will display the current month's short name as text?
What formula will display the current year in four digits?
What formula will display the current time in the style "11:46am"?
Appreciated.I've taken the liberty of tweaking that handy script to format the date as requested by the OP:
on run {}
set right_now to (current date)
set short_month to text 1 thru 3 of (month of right_now as string)
set the_year to year of right_now as string
set the_day to day of right_now as string
set short_time to text 1 thru 5 of time string of right_now
set the_secs to time of right_now
if (the_secs / 2 as integer) < 21600 then
set am_pm to "am"
else
set am_pm to "pm"
end if
set s to space
set text_date to the_day & s & short_month & ". " & the_year & s & short_time & am_pm
set the clipboard to text_date
my paste_date()
end run
on paste_date()
tell application "Numbers"
activate
tell application "System Events"
keystroke "v" using {command down}
end tell
end tell
end paste_date
This considers 11:59:59 to be "am" and 12:00:00 to be "pm". (Edited after further consideration.) It has to be run either as an Automator service, or saved in ~/Library/Scripts/Applications/Numbers/ and run from Numbers' script menu. If run from Script Editor, it pastes the date into the end of the script itself.
Hope it helps,
H -
My iphone 6 doesn't display the battery duration values
My iphone 6 doesn't display the battery duration and standby in battery settings, and replaces the values with - even if I completely charged my battery last time. Can someone help me?
Try these two:
Restore from backup
Restore as new
http://support.apple.com/en-us/HT201252 -
How to display the max channel value on the report automatially?
Hi all,
I have 2 text boxes start and target ready on my report. I need one of my channel minimum value and the other channels max value to dispaly automatically in start and target box respectively.
How do i go about it?
Rsh
Solved!
Go to Solution.Hello Jason,
There is an easy way to do this, and there is a more involved way to do this. I am hoping the "easy" way will solve your question, so I don't have to think about the solution that involves a little more effort:
Starting with DIAdem 2010 there is a way to add properties to the legend (see image below) of any axis system. What I did for this example was to simply add the legend for the 2D graph (that's a simple check box in the "Curve and Axis definition" dialog, and then dragged the maximum value of any channel onto the legend. It will automatically add a new column to the legend table and display the maximum (or any other channel property) in the legend. This of course works separately for each axis system on a page.
Starting with DIAdem 2011 there is a new "Curve Snippet" function that allows to create tables such as the one shown in the image below. Please have a look at the DIAdem 2011 example called "2D Tables as Legend and Legend for Axis System Labeling" to see how this was done, it's a little more effort, but it also adds extra flexibility:
Do either of these look like a workable solution for you?
Best regards,
Otmar
Otmar D. Foehner
Business Development Manager
DIAdem and Test Data Management
National Instruments
Austin, TX - USA
"For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary." -
Displaying the list of values in the Report
Hi All,
Is there any possibility to include the scrollable list on the face of report(Not in the left side i.e as input control)
For example If I have a country with different counties.
Based on the country selection in the block it should display the list of counties as scrollable list.
Would it be possible.
Please help
thanks
Edited by: VP S on Sep 1, 2010 2:45 PMNot sure if you are looking for the same..
Have you tried applying the filter at the filter pane..i.e.
Click on the the show\hide filter pane (filter icon is present nearby the drill icon)
Now drag the required object on this pane.
It will create the dropdown filters on top of the report.
Regards,
Rohit -
Get the returned OUT value from Pl/Sql Procedure in AppMod
Hi,
I am using jdeveloper 10.
In the database i have a procedure like this :
procedure test (v1 in out number,
v2 in number);
And am calling this procedure from application module in this way :
Object[] procArgs = new Object[]{v_1,
v_2
try {
callStoredProcedure("test (?,?)",procArgs);
I want to read the value of the v1 parameter after procedure is executed. Can anyone tell me how can i do it from application module ?
Thanks in advance,After the call of the proc the value should be in procArgs[0]
Timo -
Open Dialog Box file preview displays the images out of view or off center
This is a relatively new problem and I cannot figure it out! When I go to open a file through Illustrator (using column preview) normally off to the right side there is a preview of the file. However now I can only see a tiny portion of the image like it's off center or something (see the far right side of the picture below. What is even more strange is when I open a file in Finder, the preview is normal. Any ideas on what it could be??
Thanks!
LaurenJMcd wrote:
I am having the same problem! I just upgraded to OSX Yosemite 10.10.3 - I wonder if it is a bug with that.
this is the only common factor, so we can only assume this is the case. there is no other information on this as far as I know. -
How can i display the signal out of a FFT block to a graph?
What conversion is required in order to convert a the output of a FFT block to a waveform display? The signal input to the FFT block is a binary pattern signal!
Hello St Augustine,
Unfortunately, I cannot open these files that you have attached so I cannot tell you for certain where your problem lies. However, if you are using one of the FFT VIs from the Analzye>Waveform Measurements sub-palette, then you should be able to wire directly from the VI to a Waveform Graph. Make sure you are trying to wire to a Wavform Graph not a Waveform Chart. If you are using the FFT VIs on the Analyze>Signa Processing>Frequency Domain sub-palette, you should also be able to directly wire into a Waveform Graph, but please refer to the KnowledgeBase document linked below for more information about plotting complex numbers.
http://digital.ni.com/public.nsf/websearch/C010A823CEA80D5386256938005A066E?OpenDocument
Rega
rds,
Jyoti F
National Instruments
Maybe you are looking for
-
If I use the TouchUp Text tool in Adobe Acrobat Pro 9/X to modify a text, the program can't find the added/changed text. But when I just delete letters/words in the text, the rest/changed words can be found. Is that a known problem? Is there any fix
-
Nested table collection in select query "in clause" taking long time
create or replace type t_circuitids is table of varchar2(100); --Below anonymous block keeps on running and never ends DECLARE v_circuitid t_circuitids; v_count number; l_circuitids VARCHAR2 (4000) := 'value1,value2,value3,value4,
-
Dears, It is my 4th day since I am trying to fix my blackberry world app to login via z10. I am new user on BlackBerry and I still cannot understand why I cannot login. The similar problem occurs with my BBM, when I am trying to login directly from m
-
How can I delete the image outside of this offset path?
I'm really new to Illustrator, and I'm trying to print an image that will have a CutContour swatch around it, with a bleed outside of the CutContour line. You'll see that I set up the bleed by creating an offset path outside of the CutContour path. H
-
Hi, Newbie signing in. I installed a Audigy 2 ZS a day ago. Beside XP wanting to activiate itself another time, I had no problem running this card. One thing I don't get it is that the box says the Audigy sound card can do wonder, and cure cancer. Bu