To change the pl/sql block to get value from user
In this code instead of assigning value to the sid in the block, I want to get the sid from the user.
please help.
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
declare
v_sname t1.sname%type;
v_issue_date t3.issue_date%type;
v_book_title t2.book_title%type;
v_book_id t2.book_id%type;
cursor c1 is
select t1.sname, t3.issue_date, t2.book_title, book_id
from t1 join t3
using(sid)
join t2
using(book_id)
where sid=1;
begin
open c1
loop
dbms_output.put_line( v_sname ||' ' || v_issue_date ||' ' || v_book_title || ' ' || v_book_id);
fetch c1 into v_sname, v_issue_date, v_book_title, v_book_id;
exit when c1%notfound;
end loop;
close c1;
end;
Thank you,
Ok, then try running this one:
set serverout on
set verify off
declare
in_sid number := to_number('&1');
begin
for c1 in
select username
from v$session
where sid=in_sid
loop
dbms_output.put_line( c1.username );
end loop;
end;
GREGS
PL/SQL procedure successfully completed.
When prompted - enter your session SID, or any number (you might not get anything back, but whatever).
Next, I realize you are using SID as something other than ORACLE SID. So, how about providing some table definitions, and even some sample data?
Again, ALL information would be useful
Similar Messages
-
Variable used in FOx formula should get value from user
Hi Gurus,
In my fox formula I want to multiply a keyfigure (say quantity) with a factor. For example if the factor is 10 then all records should get multiplied by 10.
But the requirement is user shpuld be able to give the factor that should be multiplied. That is the l_factor used in the fox function should be a variable which gets value from user. I know we can give variables in filter and planning functions in IP. But can we give values in Fox formula.
I would really appreciate the time and effort.
Thanking you,
Jerry JeromeHello,
May be you can try this solution.
I think you have create a dummy character info-object(Z_Number) of same data type interget number.Create variable for Z_Number and restrict in filter(ZV_NUM).
DATA Z_MAT TYPE 0Material.
DATA Z_NUM TYPE Z_NUMBER.
DATA Z_NUM_READ TYPE I.(Declate same as data type for Z_Number)
Z_NUM = VARV(ZV_NUM).
FORACH Z_MAT.
Z_NUM_READ = Z_NUM.
{Z_KF1,Z_MAT} = Z_NUM_READ * {Z_KF1,Z_MAT}.
ENDFOR. -
How to deploy a VO Bind variable to get value from user session....
Hello everbody...
A JSF Page has a table based on VO with two parameters. One of this parameters I will pass by operation ExecuteWithParams.
but the other parameter I need to pass a value from User session.
Is that possible? How would I do that? I´m using jdev10.1.3
Thankyou...When you created a binding for executeWithParams in your pageDef, the action binding should have had NamedData elements for each of the parameters. These would have been assigned values from a variableIterator up in the executables section. The parameter that gets its value from user input should be left alone. For the parameter that gets its value from the user session, change the EL expression that defines its NDValue attribute so that it references the session information that you want to use. This can be a sessionScope variable that you set earlier in the session, as Frank suggests, a property of a managed bean in session scope, or some other variable.
-
I need to change the default email address that gets sent from Firefox.
When sending emails from an important web app (Highrise) for my business, it defaults to my home email, when my default in Outlook is clearly my work email. I believe this is the fault of Firefox, since every app (Highrise and Outlook) has my default as [email protected], but when sending an email it goes to [email protected] Any ideas?
Could you be more specific about the steps you are taking to change the Adobe ID? I was able to change one of my accounts to a .ca email address without issue. Also, information on Browser version and OS may be helpful. I am assuming that you are doing this in a Browser and not the FormsCentral AIR application, is this correct?
-Jeff Canepa -
Sql query to get numbers from 0 to 99
How can we write an sql query to get values from 0 to 99 ... this shouldn't be coming from any table
Bawer wrote:
Result: (quickly replied by oracle)
SQL-Error: ORA-30009 (Not enough memory for connect by - 1GB reserved for oracle on VirtualBox)Oracle version? Takes about 8 seconds on my:
SQL> select * from v$version
2 /
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Elapsed: 00:00:00.14
SQL> select count(*) from (
2 SELECT LEVEL - 1
3 FROM DUAL
4 CONNECT BY LEVEL <= 10000000
5 )
6 /
COUNT(*)
10000000
Elapsed: 00:00:07.76
SQL> SY. -
While executing the following pl/sql block Iam getting following error
While executing the following pl/sql block
Iam getting following error
ORA-06550: line 5, column 11:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 5, column 11:
PL/SQL: Item ignored
declare
TYPE t_customer_details IS REF CURSOR;
o_customer_details t_customer_details;
v_rec o_customer_details%ROWTYPE;
begin
o_customer_details:=pkg_search.fngetcustdetails( 2727,1000841, NULL,NULL,119105329);
LOOP
FETCH o_customer_details INTO rec ;
EXIT WHEN o_customer_details%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(' print' );
END LOOP;
CLOSE o_customer_details;
end;sorry
declare
TYPE t_customer_details IS REF CURSOR;
o_customer_details t_customer_details;
begin
o_customer_details:= pkg_search.fngetcustdetails( 2727,1000841, NULL,NULL,119105329);
FOR v_rec IN o_customer_details
LOOP
DBMS_OUTPUT.PUT_LINE(' print' );
END LOOP;
END;I changed code,
Can you say , o_customer_details:= pkg_search.fngetcustdetails( 2727,1000841, NULL,NULL,119105329); is it right?
pkg_search.fngetcustdetails return ref cursor?? -
Change the statis SQL to dynamic
To save the shared pool, I set cursor_sharing=force.
Since the AP developer send several hundreds SQL just different in riteral,
the response time improved. And till now no problem happened with us.
But it is told that there are some problems with the parameter.
my question:
1). Do any body using this paramter?
Are there any problem with your system?
Please let me know your OS and ORACLE version.
We are using WINDOWS NT and oracle8.1.7.1.1
2). If anybody know the java tool to change the statis SQL
to a Dynamic SQL?
Thanks for all the helps.I don't have the answers to these two questions, however your problem sounds like it could be more effectively dealt with by more resources. You may want to request a memory upgrade it at all possible and just up the size of the shared pool to deal with all the different queries. When your users eventually get around to repeating the queries they'll still be there.
I know tuning is almost always the best answer, but you've got a problem bigger than a performance tuneing measure can fix. -
Tune the PL/SQL block with SQL_ID
Hi There,
I have found some recommendation in ADDM report as follows.
"" Action
Tune the PL/SQL block with SQL_ID "48trcns4mx5bk". Refer to the "Tuning
PL/SQL Applications" chapter of Oracle's "PL/SQL User's Guide and
Reference".
Related Object ""
can any one let me how to Tune the PL/SQL block with SQL_ID?
looking forward.
Db: 11.1.0.7
OS: OracleLinux5-86*64
Regards,
MohsinHi,
you can't tune a PL/SQL block directly. Instead, you'll need to profile it first (i.e. see how much time SQL statements inside it consume) using dbms_profiler or some other tool. If you find that the problem is that some SQL is called too frequently because of flawed PL/SQL logic, then you'll need to address that. Otherwise, you'll need to take the top time consuming statement(s) and tune it (them).
Best regards,
Nikolay -
Changing the JCA SQL query in runtime
Hi,
Is it possible to change the predefined sql query in JCA during runtime in OSB.
Regards,
AbdulAbdul,
It won't be possible as structure of request and response is tightly coupled with the SQL and any update in SQL may also require corresponding update in XSD.
Regards,
Anuj -
Hi, I have a PPC Running OSX 10.5.4 and I want to delete the User "Guest"and "Shared"Folders on my HD, they won't let me change the permissions and I keep getting errors that say the permissions should be 0 and are 501 and having files i can't delete that go on and on ad infinitum... I think it's a virus or a corruption? Can anyone tell me or help me and let me know what I'm dealing with here or wether I'm mistaken and should leave it alone?
I'd appreciate it.
Thanks,
Mattmattmakesvidiots wrote:
Hi, I have a PPC Running OSX 10.5.4 and I want to delete the User "Guest"and "Shared"Folders on my HD
Why do you want to delete those? What have you done so far to do that?
I doubt that Mac has a virus. On the other hand, your attempts to deleted those folders may have caused corruption.
Two other comments:
1) Is there a reason that Mac hasn't been updated to OS X 10.5.8?
2) You've been misled by the poor field labeling on this Web site into trying to type your entire post into the "subject" field. In the future, just put a short summary of your post into that field. -
Where do I change the pop up blocker?
Where do I change the pop up blocker?
Hi
Reset the safari browser.
If Still have the problem please let me know?
Thanks -
When I changed my Apple ID the ID did not change on my iCloud account. there appears to be no way to change the ID because I cannot get into account settings for iCloud
If you mean that Find My Phone is asking for a password to a different Apple ID to your current Apple ID and that ID is a previous version of your current ID, not an entirely different one.
This feature has been introduced to make stolen phones useless to those that have stolen them.
However it can also arise when the user has changed their Apple ID details with Apple and not made the same changes to their iCloud account/Find My Phone on their device before upgrading to iOS 7, or if you restore from a previous back up made before you changed your details and some other circumstances.
The only solution is to change your Apple ID back to its previous state with Apple at My Apple ID using your current password, you don’t need access to this address if it’s previously been used with your Apple ID, once you have saved these details enter the password as requested on your device and then turn off "find my phone" and delete the account from your device. It may take a short while to remove the account.
You should then change your Apple ID back to its current state, save it once again and then log back in using your current Apple ID. Finally, turn "find my phone" back on once again.
This article provides more information about Activation Lock. -
Every time I launch the browser the popup blocker option is unchecked. Why does the pop up blocker keep getting unchecked every time browser is launched?
Your above posted system details show outdated plugin(s) with known security and stability risks.
*Java Plug-in 1.6.0_05 for Netscape Navigator (DLL Helper)
Update the [[Java]] plugin to the latest version.
*http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE) -
I'm in the US right now and want to buy ipad2 wifi 3G. Can I change the SIM card when I get back to my country in Indonesia?
Yes, as long as you purchase the GSM version (AT&T) and your Indonesian carrier supports an iPad with a micro-sim. Unlike the iPhone in the USA, the iPad is not locked to a carrier.
-
From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?
Hi,
Use NVL or COALESCE:
NVL (col_a, col_b)
Returns col_a if col_a is not NULL; otherwise, it returns col_b.
Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002
Maybe you are looking for
-
Problem licencing Final Cut Studio cross upgrade
I purchased the coss upgrade from Final Cut 4.0 to Final Cut studio (FCS) After entering the licence code for FCS, a error message says: "The licence file will not be written to disk because the user does not have enough priveleges". I am logged in a
-
Counter column in the Receiver file
Hi All, My requirement --> Souce is IDOC and target is a file. In the Receiver file there is one column counter which will indicate the counter for each line... So the Receiver file should be like this FHEAD,0001 THEAD,00002,00001,20081103 TDETL,0003
-
Creating syslog report on a separate server for ASA 5555-x
hello all, how do we create syslog report for ASA to dump in a separate physical server? thanks
-
Unable to login after system update
I recently installed arch in my lenova laptop. Installation went fine and I updated my system then. Finally I had a kernel 3.4.4-2 and rebooted. After rebooting, I got the login screen (tty1) . I had not created an user yet. So had to login as root.
-
I am trying to pair my iphone 5 with a sumsung s3 with no success can anybody help