Low Execute to Parse % and high soft parse %
Hello Folks
I am working on oracle 10g release2 on HP-UX
After going through awr reports observed it have low Execute to Parse % but high soft parse % (Instance Efficiency Percentages)
so cannot say issue with less use of bind variables,then what is cause of Execute to Parse %
searched sites like ask.tom,burselon counsulting etc as usual they had given generic/diplomatic(escaping) replies on this
like due to problem in application code,ineffecient sharing ,due to problem in database parameters etc
without any clear indication for cause and solution like if some database parameters not set properly then should say which database parameters can be checked,cause due to more parsing and less execution
please share if you had faced such issue and any suggestions to solve this
examples why this could happen ,like possibilities in application code
Thanks
Load Profile
Per Second Per Transaction
Redo size: 11,685.79 3,660.98
Logical reads: 71,445.74 22,382.86
Block changes: 70.89 22.21
Physical reads: 58.63 18.37
Physical writes: 2.80 0.88
User calls: 652.93 204.55
Parses: 48.39 15.16
Hard parses: 0.33 0.10
Sorts: 6.90 2.16
Logons: 0.23 0.07
Executes: 52.71 16.51
Transactions: 3.19
% Blocks changed per Read: 0.10 Recursive Call %: 30.48
Rollback per transaction %: 2.57 Rows per Sort: 29.66
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 100.00 Redo NoWait %: 100.00
Buffer Hit %: 99.92 In-memory Sort %: 100.00
Library Hit %: 98.47 Soft Parse %: 99.32
Execute to Parse %: 8.19 Latch Hit %: 99.63
Parse CPU to Parse Elapsd %: 89.90 % Non-Parse CPU: 99.62There rdbms performs approximately 48 soft parse per second ,Soft Parse % and Library Hit very close to 99 it means there main part of sql are shared.Also here user calls similar high per second but executions less,however you should be try minimizing soft parsing.I do not know exactly for which interval you get this report but Execute to Parse % indicate that when executing query oracle can not find early cursor handles(open or closed) but it can find sql text and plan information from shared pool according hash values,in this case oracle perform soft parse again.In your case you also investigate shared pool size/fragmentation.To avoid little Execute to Parse % you can increase SESSION_CACHED_CURSORS or implement CURSOR_SPACE_FOR_TIME.So refer documentation and find how to use these parameters.
Similar Messages
-
What is Execute to Parse % and how to tune it when it lower?
What is Execute to Parse % and how to tune it when it is lower?
Gjohn wrote:
What is Execute to Parse % and how to tune it when it is lower?If you don't know what it is, how are you going to decide that you need to tune it.
Here's a little information on how pointless it can be to get too worried about that particular "Instance Efficiency" percentage in Statspack and the AWR: http://jonathanlewis.wordpress.com/2006/12/27/analysing-statspack-2/
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
"There's no sense in being precise when you don't even know what you're talking about"
John von Neumann -
Hard Parse or Soft Parse ?
Hi Experts,
If we execute a SELECT statement in SQL*PLUS by passing the value using ampersand operator, whether hard parsing will occur or soft parsing ?
SQL> select last_name from employees where department_id = &dept_no;
Enter value for dept_no: 100
old 1: select last_name from employees where department_id = &dept_no
new 1: select last_name from employees where department_id = 100
SQL> select last_name from employees where department_id = &dept_no;
Enter value for dept_no: 110
old 1: select last_name from employees where department_id = &dept_no
new 1: select last_name from employees where department_id = 110
When I am executing V$SQL, for each different value I am seeing different SQL_ID. Please explain on this.
Many thaks in advance for your help.
Cheers,
Surihi ,
the best way to check for for hard parse and soft parse is by querying the data dictionar view v$sqlarea . There is a column called parse_counts(not sure of the name). the moment you execute a query , a row is reflected in this view.
for eg , when you query
select * from emp where empno=101,
select * from emp where empno=102,
select * from emp where empno=103,
query the v$sqlarea with a filter predicate on the sql_text . i.e select * from v$sqlarea where sql_text like '%select * from emp %'.
And then try querying the emp table using bind variable,
select * from emp where empno=:x; -- pass 101 ,102,103
No new rows are formed in the v$sqlarea,rather the parsed_count keeps on increasing , contrary to the above queries(without using bind variables in which each query is new to the parser).
@Gurus : in 11g , i have observed that all queries are converted to make you of bind variables .I knew that this was the implicit behaviour of plsql ,but now have they enhanced the sql engine too ?
Thanks
Rahul -
I am retrieving high and low limits from step results in VB code that looks something like this:
' (This occurs while processing a UIMsg_Trace event)
Set step = context.Sequence.GetStep(previousStepIndex, context.StepGroup)
'(etc.)
' Get step limits for results
Set oStepProperty = step.AsPropertyObject
If oStepProperty.Exists("limits", 0&) Then
dblLimitHigh = step.limits.high
dblLimitLow = step.limits.low
'(etc.)
So far, so good. I can see these results in
VB debug mode.
Immediately after this is where I try to put the limits into the results list:
'Add Limits to results
call mCurrentExecution.AddExtraResult("Step.Limits.High", "UpperLimit")
call mCurrentExecution.AddExtraResult("Step.Limits.Low", "LowerLimit")
(No apparent errors here while executing)
But in another section of code when I try to extract the limits, I get some of the results, but I do not get any limits results.
That section of code occurs while processing a UIMsg_EndExecution event and looks something like this:
(misc declarations)
'Get the size of the ResultList array
Call oResultList.GetDimensions("", 0, sDummy, sDummy, iElements, eType)
'Step through the ResultList array
For iItem = 0 To iElements - 1
Dim oResult As PropertyObject
Set oResult = oResultList.GetPropertyObject("[" & CStr(iItem) & "]", 0)
sMsg = "StepName = " & oResult.GetValString("TS.StepName", 0) & _
", Status = " & oResult.GetValString("Status", 0)
If oResult.Exists("limits", 0&) Then
Debug.Print "HighLimit: " & CStr(oResult.GetValNumber("Step.Limits.High", 0))
Debug.Print "LowLimit: " & CStr(oResult.GetValNumber("Step.Limits.Low", 0))
End If
'(handle the results)
Next iItem
I can get the step name, I can get the status, but I can't get the limits. The "if" statement above which checks for "limits" never becomes true, because, apparently the limit results never made it to the results array.
So, my question again is how can I pass the low and high limit results to the results list, and how can I retrieve the same from the results list?
Thanks,
GriffGriff,
Hmmmm...
I use this feature all the time and it works for me. The only real
difference between the code you posted and what I do is that I don't
retrieve a property object for each TestStand object, instead I pass the
entire sequence context (of the process model) then retrieve a property
object for the entire sequence context and use the full TestStand object
path to reference sub-properties. For example, to access a step's
ResultList property called "foo" I would use the path:
"Locals.ResultList[0].TS.SequenceCall.ResultList[].Foo"
My guess is the problem has something to do with the object from which
you're retrieving the property object and/or the path used to obtain
sub-properties from the object. You should be able to break-point in the
TestStand sequence editor immediately after the test step in question
executes, then see the extra results in the step's ResultList using the
context viewer.
For example, see the attached sequence file. The first step adds the extra
result "Step.Limits" as "Limits", the second step is a Numeric Limit (which
will have the step property of "Limits") test and the third step pops up a
dialog if the Limits property is found in the Numeric Limit test's
ResultList. In the Sequence Editor, try executing with the first step
enalbled then again with the first step skipped and breakpoint on the third
step. Use the context viewer to observe where the Limits property is added.
That might help you narrow in on how to specify the property path to
retrieve the value.
If in your code, you see the extra results in the context viewer, then the
problem lies in how you're trying to retrieve the property. If the extra
results aren't there, then something is wrong in how you're specifying them,
most likely a problem with the AddExtraResult call itself.
One other thing to check... its hard to tell from the code you posted... but
make sure you're calling AddExtraResult on the correct execution object and
that you're calling AddExtraResult ~before~ executing the step you want the
result to show up for. Another programmer here made the mistake of assuming
he could call AddExtraResult ~after~ the step executed and TestStand would
"back fill" previously executed steps. Thats not the case. Also, another
mistake he made was expecting the extra results to appear for steps that did
not contain the original step properties. For example, a string comparison
step doesn't have a "Step.Limits.High" property, so if this property is
called out explicitly in AddExtraResult, then the extra result won't appear
in the string comparison's ResultList entry. Thats why you should simply
specify "Step.Limits" to AddExtraResul so the Limits container (whose
contents vary depending on the step type) will get copied to the ResultList
regardless of the step type.
I call AddExtraResult at the beginning of my process model, not in a UI
message handler, so there may be some gotcha from calling it that way. If
all else fails, try adding the AddExtraResult near the beginning of your
process model and see if the extra results appear in each step's ResultList.
Good luck,
Bob Rafuse
Etec Inc.
[Attachment DebugExtraResults.seq, see below]
Attachments:
DebugExtraResults.seq 20 KB -
I have result after execution of OperationBinding. How can i parse and store in list.
I have result after execution of operation binding. how can i parse and store in list
Hi,
I Thought u have custom method in AM which returns List Data type. What is the requirement exactly, bcz commit operation have void return type.
Ex: create custom method in AMimple class
public List sampleData(){
// code here to set the values in List object.
now expose the above method in client interface. Then add the Method action binding in pageDef file and execute the below code in managed bean
OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("sampleData");
List result =(List) operationBinding.execute();
Thanks
Nitesh -
Memory Leakage while parsing and schema validation
It seems there is some kind of memory leakage. I was using xdk 9.2.0.2.0. Later i found that from this forum which contain a Topic on this and they (oracle ) claim they have memory leakage. And they have fixes this bugs in 9.2.0.6.0 xdk. When i used truss command, for each call to parser and schame validation, it was opening file descriptor for lpxus and lsxus file. And this connections were not close. And keep on openning it with each call to parser. I was able to diagonise this using truss command on on solaris. After making many calls, i was error message could not open file Result.xsd (0202). I am using one instance of Parser and Schema. And i am doing clean up for parser after each parse.
Later i downloaded, 9.2.0.6.0,
Above problem for the parser was solvedm but still the problem continued for schema validation. And even i tried with latest beta release 10.
And this has caused great troubles to us. Please can u look whether there is come sort of leakage. Please advice if u have any solution.
Code---
This below code is called multiple times
char* APIParser::execute(const char* xmlInput) {
char* parseResult = parseDocument(xmlInput);
//if(strcmp(parseResult,(const char*)"")==0) {
if(parseResult == NULL) {
parseResult = getResult();
parser.xmlclean();
return parseResult;
} else {
return parseResult;
Parser and schema are intialised in Construtor and terminated in Destructor.Hi, here is the complete test case
#include<iostream>
#ifndef ORAXML_CPP_ORACLE
# include <oraxml.hpp>
#endif
using namespace std;
#define FAIL { cout << "Failed!\n"; return ; }
void mytest(int count)
uword ecode;
XMLParser parser;
Document *doc;
Element root, elem;
if (ecode = parser.xmlinit())
cout << "Failed to initialze XML parser, error " << ecode << "\n";
return ;
cout << "\nCreating new document...\n";
if (!(doc = parser.createDocument((oratext *) 0, (oratext *) 0,(DocumentType *) 0)))
FAIL
if (!(elem = doc->createElement((oratext *) "ROOT")))
FAIL
string test="Elem";
for(int i=0;i<count;i++)
//test="Elem"+string(ltoa(i));
if (!(elem = doc->createElement((oratext *) "element")))
FAIL
if (!doc->appendChild(elem))
FAIL
//doc ->print();
//parser.xmlclean();
parser.xmlterm();
int main(int argc,char* argv[])
int count=atol(argv[1]);
mytest(count);
char c;
cout<<"check memory usage n press any key"<<endl;
cin>>c;
return 0;
-------------------------------------------cut here-----
Now, i cant use the xdk 10g because i work on a hpux machine. I have tried the above program with a count of 1000000. the memory usage at the end was around 2 gigabytes.
Could someone please please help me? :(
Thank you. -
Expression parsing and execution
Hi All,
I need ideas/code/suggestions from you all. I am working on a Formula Builder UI. In this a user can create their own expressions choosing some variable values also.
This will contain IF, AND , OR and NOT also from expression creation. For example it may look like this
IF my_variable > 25 THEN my_variable *20 ELSE my_varibale/2 END
So these kind of lines should be parsed first for completeness and then should be executed for thier values.
Hope to get a supportive help from all of you.
Regards,
SandeepHi,
I am trying to evaluate an expression like this =IF(A1<0.125,0.0005,(IF(A1<0.25,0.00066667,(IF(A1<0.5,0.00075,(IF(A1<0.75,0.000916667,0.0010833))))))) in java. In excel it is easy but i cannot use that. I cannot use any free downloads. Is there any code sample which I can use to start off? I need to parse and evaluate the above expression. -
Parse and output XML document while preserving attribute order
QUESTION: How can I take in an element with attributes from an XML and output the same element and attributes while preserving the order of those attributes?
The following code will parse and XML document and generate (practically) unchanged output. However, all attributes are ordered a-z
Example: The following element
<work_item_type work_item_db_site="0000000000000000" work_item_db_id="0" work_item_type_code="3" user_tag_ident="Step" name="Work Step" gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_site="0000000000000000" last_upd_db_id="0" rstat_type_code="1">
</work_item_type>is output as:
<work_item_type gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_id="0" last_upd_db_site="0000000000000000" name="Work Step" rstat_type_code="1" user_tag_ident="Step" work_item_db_id="0" work_item_db_site="0000000000000000" work_item_type_code="3">
</work_item_type>As you may notice, there is no difference in these besides order of the attributes!
I am convened that the problem is not in the stylesheet.xslt but if you are not then it is posted bellow.
Please, someone help me out with this! I have a feeling the solution is simple
The following take the XML from source.xml and outputs it to DEST_filename with attributes in a-z order
Code:
private void OutputFile(String DEST_filename, String style_filename){
//StreamSource stylesheet = new StreamSource(style_filename);
try{
File dest_file = new File(DEST_filename);
if(!dest_file.exists())
dest_file.createNewFile();
TransformerFactory tranFactory = TransformerFactory.newInstance();
Transformer aTransformer = tranFactory.newTransformer();
aTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
Source src = new DOMSource("source.xml");
Result dest = new StreamResult(dest_file);
aTransformer.transform(src, dest);
System.out.println("Finished");
catch(Exception e){
System.err.print(e);
System.exit(-1);
}You can't. The reason is, the XML Recommendation explicitly says the order of attributes is not significant. Therefore conforming XML serializers won't treat it as if it were significant.
If you have an environment where you think that the order of attributes is significant, your first step should be to reconsider. Possibly it isn't really significant and you are over-reaching in some way. Or possibly someone writing requirements is ignorant of this fact and the requirement can be discarded.
Or possibly your output is being given to somebody else who has a defective parser which expects the attributes to be in a particular order. You could quote the XML Recommendation to those people but often XML bozos are resistant to change. If you're stuck writing for that parser then you'll have to apply some non-XML processing to your output to fix it up on their behalf. -
Table AGR_1251: Search between a range of the field "LOW" and "HIGH
Hello Experts,
i've got a problem by searching all users who have the authority for a transaction.
The transaction was written in a parameter, called p_trans.
I've the Tables AGR_1251, AGR_AGRS and AGR_USERS.
I know what I've to do.
Here is my Join.
SELECT agru~uname
INTO CORRESPONDING FIELDS OF TABLE gt_users
FROM agr_1251 as ag12
INNER JOIN agr_agrs as agrs
ON ag12~agr_name = agrs~child_agr
INNER JOIN agr_users as agru
ON agrs~agr_name = agru~agr_name
INNER JOIN usr01 as us
ON agru~uname = us~bname
WHERE ag12~object = 'S_TCODE' AND
ag12~field = 'TCD' AND
???? parameter p_trans between ag~low and ag~high????
SELECT agru~uname
APPENDING TABLE gt_users
FROM agr_1251 as ag12
INNER JOIN agr_agrs as agrs
ON ag12~agr_name = agrs~child_agr
INNER JOIN agr_users as agru
ON agrs~child_agr = agru~agr_name
INNER JOIN usr01 as us
ON agru~uname = us~bname
WHERE ag12~object = 'S_TCODE' AND
ag12~field = 'TCD' AND
???? parameter p_trans between ag~low and ag~high????
SORT gt_users BY uname ASCENDING.
DELETE ADJACENT DUPLICATES FROM gt_users COMPARING uname.
Here is my question:
In my code are question marks...here i want to say, that my transaction lays between the fields LOW and HIGH.
But how can i say, that in WHERE.
I have to say... Search that agr_name, where object = s_tcode, field=tcd and where my transaction lies between.
For example: low is T and high is X and i have the transaction va21.
So i must find out, in which range lays ma transaction.
I hope somebody understands me
Thanks!
Regards,
MarcelHi Marcel,
You are mentioning it as a parameter between having low & high values. Is it a parameter or select option.
If its a parameter, then anyway it will have only single value at any point of time.
If its a select option, then you need to use
select * from
and tcode in s_tcode.
Thanks,
Best regards,
Prashant -
A simple DBMS and SQL engine parser
hi guys;
i'm about to start an interesting c++ project described below...what i need is that you give me links ,advice and resources that could help me in my project...thanks for helping ...
here is the description:
Assignment:
In a nutshell, this assignment asks you to create a parse-tree for sample test SQL statements and actually create the underlying data structures to hold the data i.e. you are creating an extremely rudimentary SQL Engine (front-end parser) and a DBMS (back-end data structures). Our SQL Engine can be thought of as a bare-bone compiler. To test the SQL Engine and the DBMS, you will create a sample database. Finally (non-programming part), you will read up on the ODBC driver.
Note that a real compiler and a DBMS have functionality that is way beyond what I am going to ask you to implement. In fact, your DBMS software creation may disregard issues regarding efficiency ? those that couple the DBMS to the OS i.e. page buffering, blocking, concurrency, etc. Ours will be a data-centric view i.e. we will only focus on how best to save the user data. Treat this as DBMS-101 (It is more like DBMS-1.01).
Functionality:
Your SQL-Engine/DBMS software must offer the following capability-
Data: You must design data structures that will allow me to create tables and delete (drop) tables, insert tuples into tables, delete tuples from the tables and modify tuples values in tables possibly based on some criteria. Querying of course is the most important and frequently performed activity, but do NOT worry about joining tables or complicated queries. Data Serialization is of course implied by retrieval.
Meta-Data/Data Dictionary: In addition, I should be able to look up names of all tables that exist or the table definitions that exist and so on.
Future Requirements: I am being vague on this so that I may or may not add some small functionality later.
Software Components:
SQL Engine: Create a basic parser. Your parser should be able to parse the limited SQL statements that have been provided in Appendix A.
? Include the test cases you used for the parser. Software Architecture and Implementation documents should also be attached.
? Have the parser create parse trees for the sample SQL statements in accordance with your proposed grammar. The input could come from command-line or a stored file.
? Print the parse trees (In-order and Pre-order) for sample input to present proof of correctness.
? That completes the front-end of our SQL-engine.
DBMS: Propose a data structure, which will house the actual database. The back-end of the program will ?walk? the parse tree and create/fill in the data-structures in the back-end DBMS accordingly.
? Data Dictionary ? meta-data details. I.e. lists details about tables and fields.
? Data Definition ? creation of tables.
? Data Manipulation ? update/modify, storage and retrieval of records.
? Disregard issues regarding efficiency ? those that couple the DBMS to the OS i.e. page buffer, blocking, etc.
Database: Create a sample database to test your SQL/DBMS software. You must attach database schemas, tables with inserted values in your final submission.I have no comments on the parsing of the SQL language. Without looking at Appendix A, I can't tell what you are being asked to do. However I do have a suggestion for a rather bogus back end storage that seems to fit the spirit of the assignment.
Create a directory named DB and in it keep files that are named things like
int_Employee_ID
string10_Employee_Name
where you follow the naming convention
DataType_TableName_FieldName
What this does for you is this:
To create a table just create files with the names and the datatypes that youwant.
To delete a table just delet files that have that table name as the secon parameter
The data dictionay is essentially a dump of the filenames in the directory.
Given that the data type in encoded in the file name it is easy to locate the ith element in any file for reading or writing.
Yes, it is bogus. It requires that you make dozens of disk reads to pick up all the pieces of a single record. Good thing efficiency was not listed as a requirement. You would NOT want this structure if you were looking for speed, or making sure that no tranaction gets only halfway done during a power outage.
But since the assignment is NOT about building databases but rather about parsing SQL statements, this layout gives you a fairly transparent way to represent your data and allows you to do nice bogus things like to create your initial data all with a simple text editor.
Since there are no joins to be requested of your system, all your SQL queries will essentially boil down into building filters that will run one or more of these lists and essentially create a list of indicies for records in a single table. -
XML Parser and Content-type/encoding problem
I've write a little and simple XML parser and a simple "trasformer" that recive an XML file and an XSL one and return HTML, here is the code:
public static String toHTML(Document doc, String xslSource){
ByteArrayOutputStream testo = new ByteArrayOutputStream();
try{
DOMSource source = new DOMSource(doc);
TransformerFactory tFactory = TransformerFactory.newInstance();
System.out.println("----> " + xslSource);
Transformer transformer = tFactory.newTransformer(new StreamSource(xslSource));
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
transformer.setOutputProperty(OutputKeys.METHOD, "html");
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.transform(source, new StreamResult(testo));
}catch(Exception ioe){
System.out.println("2 XMLTool.toHTML " + new java.util.Date());
System.out.println(ioe);
return testo.toString();
}the problem is that I would like to put the HTML code its return into a JEditorPane; now I'm trying with this code:
JEditorPane jep1 = new JEditorPane();
jep1.setContentType("text/html");
jep1.setText(v);
// 'v' is the string returned by the code posted up (the XML/XSL transformer)but I can't see anything in my JEditorPane.
I think that the problem is this line of code that the transformer add automaticaly ad HTML code:
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">Infact if I try to delete this line from the code I can see what I want but is'n good delete a line of code without understend where is the problem.
So, can anyone help me?good.
when u set ur output properties to html , transformer
searches for all entity references and converts accordingly.
if u r using xalan these files will be used for conversion of
Character entity references for markup-significant
output_html.properties
(this should be in templates package)
and HTMLEntities.res(should be in serialize package)
vasanth-ct -
How to Implement KFF Range (Low and High) in query find form in oracle apps
Hi,
Please provide some sample script for using KFF range LOV (Low and High) in one of the query find form in Oracle apps R12.
I need to customize one of the standard form and add this range functionality for that search form.
Thanks,
PrasannaYuvaraaj,
Your request is unique to the Oracle Enterprise Business Suite (EBS). Please post your question in the General EBS Discussion forum. If you have a general Forms question, by all means, ask it here! ;-)
Craig... -
01.01.0000 date parse and format
Could somebody explain is wrong here?
SimpleDateFormat frm = new SimpleDateFormat("yyyyMMddHHmmss"); // formatter
frm.setTimeZone(TimeZone.getTimeZone("UTC")); // UTC time zone
// --- No problem for the next code ---
String inDate = "19700101000000"; // 01.01.1970 input date
long stamp;
try {
stamp = frm.parse(inDate).getTime(); // input date in long
} catch (ParseException ex) {
System.out.println("Interruption");
stamp = 0;
String outDate = frm.format(stamp); // output date
System.out.println("inDate=>" + inDate + "_longDate=>" + stamp + "_outDate=>" + outDate);
// --- No idea why next code is working wrongly ---
inDate = "00000101000000"; // 01.01.0000 input date
try {
stamp = frm.parse(inDate).getTime(); // input date in long
} catch (ParseException ex) {
System.out.println("Interruption");
stamp = 0;
outDate = frm.format(stamp); // output date
System.out.println("inDate=>" + inDate + "_longDate=>" + stamp + "_outDate=>" + outDate);I try to parse and format the time stamp 01.01.0000 00:00:00. On the finish I have 01.01.0001 instead of the correct 01.01.0000
inDate=>19700101000000_longDate=>0_outDate=>19700101000000
inDate=>00000101000000_longDate=>-62167392000000_outDate=>00010101000000You are calling format with a long parameter. The only format that matches that signature that I can see would be Format.format(Object) assuming autoboxing is changing the long to a Long.
Format.format(Object) eventually calls DateFormat.format(Object, StringBuffer, FieldPosition). I have never used this method so I am not sure what it does.
Was your intention to actually call this method?
See the following example:
System.out.println("Test 1: " + frm.format(new Long(0l), new StringBuffer(), new FieldPosition(0)));
System.out.println("Test 2: " + frm.format(new Long(-62167392000000l), new StringBuffer(), new FieldPosition(0)));
Test 1: 19700101000000
Test 2: 00010101000000Edited by: jbish on Apr 26, 2013 12:43 PM
Edited by: jbish on Apr 26, 2013 1:09 PM -
How to pass the low value and high values for select options.
Hi,
In selection screen I want to display the first date, last date of this month as a default value in low and high fields. Please exaplain me how.
Thanks and Regards,
SuryahI,
Very thanks ,
I did it what u said now. but those contents does not displaying on the screen.
In this order I write the code. Please explain me
SELECT-OPTIONS s_date FOR likp-wadat_ist.
DATA BEGIN TYPE wadat_ist.
DATA LAST TYPE wadat_ist.
initialization.
s_date-low = BEGIN.
s_date-high = LAST.
at selection-screen output.
CALL FUNCTION 'HRWPC_BL_DATES_MONTH_INTERVAL'
EXPORTING
datum = SY-DATUM
month_pst = '0'
month_ftr = '0'
IMPORTING
BEGDA = BEGIN
ENDDA = LAST
EXCEPTIONS
INVALID_VALUES = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
hi friends i have a procedure
and its have *(AD IS NULL OR NVAD LIKE AD||'%') AND (SOYAD IS NULL OR NVSOYAD LIKE SOYAD||'%')*
if i use this query and pass different things for AD ; is it become a brand new query for oracle because of ||'%' or its parse and put in shared pool and for a sometime this query don't parse and take from shared pool
PROCEDURE P_YENI_TALEP_LISTELE(RC_CURSOR OUT SYS_REFCURSOR,TOPLAM_TALEP OUT NUMBER,SAYFA_INDEX IN NUMBER,SAYFA_BUYUKLUK IN NUMBER,TC_NO IN NVARCHAR2,AD IN NVARCHAR2,SOYAD IN NVARCHAR2,ONAY IN NUMBER,H_TIP_ID IN NUMBER)
AS
BEGIN
OPEN RC_CURSOR FOR SELECT TA.NT_ID,TA.NTC_NO,HI.NVHIZMET_TUR AS NVARM_KONU,TA.NVOPRTR_CVP,TA.NVGRSM_SURE,TA.NVGRSM_DRM,
TA.NHIZMET,TA.BONAY,TA.DTLP_TRH,TH.NVAD,TH.NVSOYAD,TH.NVILCE ,TA.DALINAN_TRH,
TA.DBRKLAN_TRH,TA.NG_ID,GU.NVAD1||' - '||GU.NVAD2 AS GUZERGAH,HI.NH_TIP_ID,HT.NVHIZMET_TIP,
FROM H_TALEP TA,TNM_HASTA_BILGI TH,TNM_HIZMET HI,SBT_HIZMET_TIP HT,TNM_GUZERGAH GU
WHERE TA.NTC_NO=TH.NTC_NO AND TA.NH_ID=HI.NH_ID AND HI.NH_TIP_ID=HT.NH_TIP_ID AND(TC_NO IS NULL OR TA.NTC_NO=TO_NUMBER(TC_NO)) AND TA.NG_ID=GU.NG_ID AND
*(AD IS NULL OR NVAD LIKE AD||'%') AND (SOYAD IS NULL OR NVSOYAD LIKE SOYAD||'%')*...............The code you have posted has no DYNAMIC SQL in it.... Static SQL inside PL/SQL will bind all the variables for you.
So what you are saying does not compute.
What is making you think a 'brand new query' is being parsed for each execution?
Edited by: Tubby on Nov 8, 2008 4:19 PM
Maybe you are looking for
-
Message appears at time of query results: NO EXCHANGE RATE FROM
I am executing query using a new currency translation type "ZPERAVG". Variable time reference is defined on End of period for 0FISCPER with exchange rate M1 (Monthly Average). Tested successfully. Purpose is to represent monthly values at differin
-
Why are certain folders 'hidden'?
Can't figure this one out: some folders are, by default, hidden in Finder, particularly Macintosh HD/users/me/Library The only way I can make it visible is to use Onyx or a Terminal command, which also makes tons of other files visible, which I don't
-
Hi Experts, I got an error showing that "TC30C is not set up" while running the CRC2 Transaction. Could any body help to resolve the same. Thanks in advance. Venkat.B
-
Dark path's edges after using shape builder tool or masking objects
hi, i have a problem with path edges after using shape builder tool or masking objects. This problem occurs when i draw bright colored objects above dark colored object. After that i have dark path's edges. Like this: http://img94.imageshack.us/img94
-
I need to create a communication from an R/3 system using a PROXY. What are all the steps needs to be planned to connect an R/3 system with an XI system while doing a Proxy? Thanks