How to do a null subclassing?
I have used subclassing, but I'd like to understand it better.
Suppose I wanted to create a subclass which will not be a strict
subclass of its superclass, but it will be identical. No methods
overidden at all. The only difference would be that the original
and the clone have different name.
That would be a very good example for textbooks and tutorials.
How would one create such a class?
TIA,
-Ramon
it's the so called default constructor for extended classes and it's supplied automatically.It's supplied automatically only if there is no user-defined constructor. So if you define one taking an int, you have to definer the no-arg one explicitly.
public class B {
private B (int i) {}
$ javac B.java
$ javap B
Compiled from B.java
public synchronized class B extends java.lang.Object
/* ACC_SUPER bit set */
$ javap -private B
Compiled from B.java
public synchronized class B extends java.lang.Object
/* ACC_SUPER bit set */
private B(int);
}
Similar Messages
-
Hi All,
I did one personalization which is related to DFF of an Item.
It is working partially but i need the perfect solution will u please resolve my doubts.
My requirement is as follows:
I have one DFF in Items page say attribute1 which has a maximum of 3 values i.e., 'A' or 'B' or 'C'
In my Purchase order Auto create form, when an select an requisition, the related lines are displayed for me.
When i select an line and if the line has an item which has an attribute values of either 'A' or 'B' or 'C'.
Then i need to display an error message.
For this I do the following steps.
In conditions tab i wrote the following condiitons:
Not Null IN ( SELECT attribute1 FROM mtl_system_items_b where segment1= :REQ_LINES.ITEM_NUMBER AND organization_id=FND_PROFILE.VALUE('ORG_ID'))
But my condition evaluates to false, even though i have values in attribute1---------------------- My question is will the above query is right or not. if not will u please provide me the correct syntax of how to use not null.
'A' IN ( SELECT attribute1 FROM mtl_system_items_b where segment1= :REQ_LINES.ITEM_NUMBER AND organization_id=FND_PROFILE.VALUE('ORG_ID'))
The above query is working fine. Please help me on this issue.
Thanks and Regards
ZaheerDear Zaheer,
you compare the organization with Operating unit, Please use
fnd_profile.value('MFG_ORGANIZATION_ID') inspite of org_id.
Tariq. -
How do I restrict null values??????
Hi,
Created BW report Purchase Orders Awaiting Goods Receipting. Having difficulty in restricting the report to those orders that have not been goods receipted. How do I restrict null values.
thanks in advance
S VRHi,
I believe you are using Standard Business Content.
You can use the following reports for overcome your requirement:
Query Name: 0PUR_C01_Q0017 - Quantities Purchase Order Delivery - Invoice
Link: http://help.sap.com/saphelp_nw04/helpdata/en/99/670539b15b186ce10000000a114084/content.htm
Try to use it. And let me know still you are having some doubts.
Regards,
Vivek V -
How to eliminate explicit "null" values
Hello,
I am having a problem in eliminating the explicit "null" values while retrieving them from the database.
Here is my problem as follows,
For the optional fields in a form i am explicitly entering "null" as value or else it is throwing null pointer exception in linux. While i am trying to display the values existing in a table it is displaying fine when i use this condition
if(varialble.equals("null") ||varialble.equals("") || variable.equals(null))
varialble = "";
else
out.println(variable)
But when i use the same for the values i retrieve from the view it is displaying "Null" for the explicit "null" values and null from implicit null values.
Please help me out how to remove the explicit null values. It would be great help if somebody replies me at the earliest.
Thanks in advance
dayathe following is the code which i am using to retrieve values.
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.*;
import StrChk.*;
public class DataSearch extends HttpServlet
Connection con=null;
Statement st=null;
ResultSet rs=null;
ResultSetMetaData rsmd=null;
PrintWriter out=null;
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws IOException,ServletException
String key;
String sql;
res.setContentType("text/html");
out = res.getWriter();
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:daya","daya","daya");
st = con.createStatement();
catch(Exception e)
System.out.println("Error Accessing DataBase:"+e);
key = req.getParameter("key");
// Search(str1.retString(key));
Search(key);
public void Search(String key)
int res=0;
boolean flag=true,found=false;
StringTokenizer strt = new StringTokenizer(key, " ");
String sql;
String str1,str2;
int i=0;
int count = strt.countTokens();
String keywords[] = new String[count+1];
keywords=key;
i++;
if(count > 1)
count++;
while(strt.hasMoreTokens())
keywords[i] = strt.nextToken();
i++;
out.println("<html><title>DataSearch</title>");
out.println("<script>");
out.println("function myclose(){ self.close(); } ");
out.println("</script><body>");
for(i=0; i<count && flag==true; i++)
try
/* sql = "select ";
sql += " nvl(\"Topic Title\",' '), ";
sql += " nvl(\"Name\",' '), ";
sql += " nvl(\"Title\",' '), ";
sql += " nvl(\"Affiliation\",' '), ";
sql += " nvl(\"Street Name\",' '), ";
sql += " nvl(\"City\",' '), ";
sql += " nvl(\"State\",' '), ";
sql += " nvl(\"Country\",' '), ";
sql += " nvl(\"Zip Code\",' '), ";
sql += " nvl(\"Phone\",' '), ";
sql += " nvl(\"Fax\",' '), ";
sql += " nvl(\"eMail\",' '), ";
sql += " nvl(\"Web Site\",' ') ";
sql += " from SEARCHVWUSERDET where ";
sql += " lower(\"Name\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Title\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Affiliation\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Street Name\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"City\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"State\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Country\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"eMail\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Web Site\") like " + "lower('%" + keywords[i] + "%')";*/
sql = "select ";
sql += " nvl(\"Name\",' '), ";
sql += " nvl(\"Title\",' '), ";
sql += " nvl(\"Affiliation\",' '), ";
sql += " nvl(\"Street Name\",' '), ";
sql += " nvl(\"City\",' '), ";
sql += " nvl(\"State\",' '), ";
sql += " nvl(\"Country\",' '), ";
sql += " nvl(\"Zip Code\",' '), ";
sql += " nvl(\"Phone\",' '), ";
sql += " nvl(\"Fax\",' '), ";
sql += " nvl(\"eMail\",' '), ";
sql += " nvl(\"Web Site\",' '), ";
sql += " nvl(\"Key Words\",' ') ";
sql += " from searchcombi where ";
sql += " lower(\"Name\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Title\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Affiliation\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Street Name\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"City\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"State\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Country\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"eMail\") like " + "lower('%" + keywords[i] + "%') or ";
sql += " lower(\"Web Site\") like " + "lower('%" + keywords[i] + "%') or";
sql += " lower(\"Key Words\") like " + "lower('%" + keywords[i] + "%')";
sql += " order by \"Name\" ";
rs = st.executeQuery(sql);
//out.println(sql);
if(rs.next())
if(i == 0)
flag=false;
found=true;
res=0;
do
res++;
}while(rs.next());
out.println(res++);
out.println("<center><font color=#ff9999 face=\"verdana, geneva, arial, sans-serif\" size=2><b>Searched for \""+ keywords[i]+"\", ");
out.println("Total Matches found : "+res+"</center><br>");
rs = st.executeQuery(sql);
while(rs.next())
res++;
out.println("<table width=600 align=center>");
str1 = disp(rs.getString(1),keywords[i]);
out.println(str1);
//if(str1.equals("null") || str1.equals(" ") || str1.equals(null))
if(str1 == "null" || str1 == "")
str1 = "";
else
out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Name </td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
//System.out.println(str1);
//out.println(str1);
str2="";
str1 = disp(rs.getString(2),keywords[i]);
if(!str1.equals("") || !str1.equals(""))
str2 = str1;
str1 = disp(rs.getString(3),keywords[i]);
if(!str1.equals(" ") || !str1.equals(""))
if(str2.length() > 0 || !str2.endsWith(", "))
str2+= ", ";
str2 += str1;
if(!str2.equals(""))
out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Title, Affiliation</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>");
out.println(str2);
out.println("</td></tr>");
str2="";
str1 = disp(rs.getString(4),keywords[i]);
if(!str1.equals(" ") || !str1.equals(""))
str2 = str1;
str1 = disp(rs.getString(5),keywords[i]);
if(!str1.equals(" ") || !str1.equals(""))
if(str2.length() > 0 || !str2.endsWith(", "))
str2+= ", ";
str2 += str1;
str1 = disp(rs.getString(6),keywords[i]);
if(!str1.equals(" ") || !str1.equals(""))
if(str2.length() > 0 || !str2.endsWith(", "))
str2+= ", ";
str2 += str1;
str1 = disp(rs.getString(7),keywords[i]);
if(!str1.equals(" ") || !str1.equals(""))
if(str2.length() > 0 || !str2.endsWith(", "))
str2+= ", ";
str2 += str1;
str1 = disp(rs.getString(8),keywords[i]);
if(!str1.equals(" ") || !str1.equals(""))
if(str2.length() > 0 || !str2.endsWith(", "))
str2+= ", ";
str2 += str1;
if(!str2.equals(""))
out.println("<tr><td valign=top width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Address </td>");
out.println("<td><font face=\"verdana, geneva, arial, sans-serif\" size=2>");
out.println(str2);
out.println("</td></tr>");
str1 = disp(rs.getString(9),keywords[i]);
if(!str1.equals(" ") || !str1.equals(""))
out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Phone</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
str1 = disp(rs.getString(10),keywords[i]);
if(!str1.equals(" ") || !str1.equals(""))
out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Fax</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
str1 = disp(rs.getString(11),keywords[i]).toLowerCase();
if(!str1.equals(" ") || !str1.equals(""))
out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>eMail</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
str1 = disp(rs.getString(12),keywords[i]).toLowerCase();
if(str1.equals("null") || str1.equals(" ") || str1.equals(null))
str1="";
else
out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Web Site</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
str1 = disp((rs.getString(13)).replace(',',' '),keywords[i]);
if(str1 == "null" || str1 == null || str1 == "")
//if(!rs.wasNull())
out.println("nothing");
else
out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Key Words</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
out.println("<tr><td width=150><hr></td><td><hr></td></tr>");
out.println("</table><br>");
} // end while
} // end if
catch(Exception e)
System.out.println("Exception while executing query: "+ e);
} // end for
if(!found)
out.println("<center><font color=#ff9999 face=\"verdana, geneva, arial, sans-serif\" size=2><b>Searched for \""+ key+"\", ");
out.println("Total Matches found : 0</center><br>");
out.println("<center><a href=\"javascript:myclose()\"><font color=red face=\"verdana, geneva, arial, sans-serif\" size=2>Close</a></center>");
out.println("</body></html>");
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException,ServletException
doPost(req,res);
public String disp(String str1, String str2)
int i,j,k;
boolean found=false;
String s1,s2,s3;
String t1,t2;
t1 = initCap(str1);
s1 = t1.toLowerCase();
s2 = str2.toLowerCase();
for(i=0;i<s1.length() && !found ;i++)
k=i;
for(j=0;j<s2.length() && k < s1.length() && s1.charAt(k) == s2.charAt(j) ;j++,k++);
if(j==s2.length())
found=true;
if(found)
i--;
s3 = t1.substring(0,i);
s3 += "<font color=blue face=\"verdana, geneva, arial, sans-serif\" size=2><b>";
s3 += t1.substring(i,i+str2.length());
s3 += "</font></b>";
s3 += t1.substring(i+str2.length(),t1.length());
else
s3 = t1;
return s3;
public String initCap(String str)
StringTokenizer st = new StringTokenizer(str," ");
String s1="";
String s2="";
String s3="";
String s4="";
while(st.hasMoreElements())
s1 = (String)st.nextElement();
if(s1.length() > 0)
s2 = s1.substring(0,1);
s2 = s2.toUpperCase();
if(s1.length() > 1)
s3 = s1.substring(1,s1.length());
s2 += s3;
s4 +=" "+s2;
return s4; -
How to see a null or empty value in JFormattedTextField
Hello, I am having a problem. I'm trying to use a JFormattedTextField, and I keep getting errors.
I know what is causing the error, but I don't know how to fix it.
Here is my code:
String cf = countFTX.getText();
if(cf.equals(" ")) {
i = Integer.valueOf(countJTX.getText());
}else{ i = Integer.valueOf(countFTX.getText()); }what happens is I get an error when it goes to change it into an int. Because it see's it as being (" ") and not (" ") or even ("") so it doesn't fit into my if statement. And returns it being false, then tries to turn it into an int, and blows up there.
Now how can I fix my if statement to be able to see if nothing was entered, and if so then use the countJTX and not the countFTX?
countJTX is a regular JTextField, and countFTX is a JFormattedTextField.
the JTX is filled automaticaly with an int, and if there needs to be a change, the user puts it into the FTX. (so you understand the logic behind it)
any ideas? or should i just revert to not using the FTX?you need to know the differenct between NULL and "" (empty) of a string. Also both of these values cann't converted to in integer so you can not call Integer.valueOf(cf). I don't understand why you need to do that. Instead:
String cf = countFTX.getText();
if(cf == null || cf.length() == 0)) {
i = ?; //something you want i to be when cf is null or empty but not call Integer.valueOf(countJTX.getText());
}else{
i = Integer.valueOf(cf);
}Also, you may need to add try/catch exceptions. -
How to check for null value/field?
Hi!
I have created a form that is designed to calculate the rows using the FormCalc function.
My problem is that if I have no value in the some of the rows, a 0 is automatically display as the calculated output field. If a row has no data, how can I get a null or blank field in the result (calculated field) field?
Let's say, I have 5 rows and each row should have a calculated value in one of the fields; when I fill out only two of the rows, the remaining three rows come out with 0s in the calculated output field. I need a blank output field for the remaining calculated values instead of 0s. I am a newbie so please excuse me if I am not explaining well.
Thanks
Jofar1This is the value that I have on my calculate event: "Rate*Units_of_ServiceRow2".
How should/can I incorporate the two codes? -
How to check for null values in pl sql?
Hello,
I have an sql statement where I read the db column into a number of variables, some of the columns contain NULL values or empty varchars. How can I check if my variable contains any data?
Thanks,
Jto check if your variable contain null or not use like this
if v_variable is null if you use
if v_variable=NULL this is right according to syntax but it will not give you desired result
SQL> declare
2 v_empname varchar2(20);
3 v_comm number;
4 begin
5 select ename,comm into v_empname,v_comm from emp
6 where empno=7839 and comm is NULL;
7 dbms_output.put_line(v_empname);
8 if v_comm is NULL then
9 dbms_output.put_line(v_empname);
10 end if;
11 end;
12 /
KING
KING
PL/SQL procedure successfully completed.but if you will use = null then you will not get result
SQL> declare
2 v_empname varchar2(20);
3 v_comm number;
4 begin
5 select ename,comm into v_empname,v_comm from emp
6 where empno=7839 and comm is NULL;
7 dbms_output.put_line(v_empname);
8 if v_comm = NULL then
9 dbms_output.put_line(v_empname);
10 end if;
11 end;
12 /
KING -------------king will get printed only once.
PL/SQL procedure successfully completed. -
How to check for null value of output parameter?
Hi guys, I get a test procedure with 2 output parameters and do nothing:
CREATE OR REPLACE PACKAGE BODY p_parameters_test AS
PROCEDURE p_null_output_basetype(p1 OUT NUMBER,p2 OUT VARCHAR2)
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('DO NOTHING');
END p_null_output_basetype;
END;And I have below C# code:
cmd.CommandText = "p_parameters_test.p_null_output_basetype";
OracleParameter p1 = new OracleParameter("p1", OracleDbType.Decimal, System.Data.ParameterDirection.Output);
OracleParameter p2 = new OracleParameter("p2", OracleDbType.Varchar2, System.Data.ParameterDirection.Output);
cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
try
conn.Open();
cmd.ExecuteNonQuery();
if (p1.Value==null)
Console.WriteLine("p1.Value==null");
else if (Convert.IsDBNull(p1.Value))
Console.WriteLine("Convert.IsDBNull(p1.Value)");
else
Console.WriteLine("p1 else "+p1.Value);
if (p2.Value==null)
Console.WriteLine("p2.Value==null");
else if (Convert.IsDBNull(p2.Value))
Console.WriteLine("Convert.IsDBNull(p2.Value)");
else
Console.WriteLine("p2 else "+p2.Value);
Console.WriteLine("finished");
catch......The output of it is:
p1 else null
p2 else null
Does anyone have any idea why it always goes to the 'else' of the condition-branching, and how can I check if the output parameter is null?
Thanks in advance.Morven... I ran into similar problems. Maybe you've found a solution of your own by now, but here's what I've learned...
The Value property of output parameters, like p1 and p2 in your code, actually varies, according to (I think) the OracleDbType of the parameter. You've got OracleDbType.Decimal for p1 and OracleDbType.Varchar2 for p2. These look about right, since they match the parameter types in your actual stored procedure.
After cmd.ExecuteNonQuery() executes, the respective Value properties of p1 and p2 are actually of different types. For p1, it's going to be "OracleDecimal" and for p2 it's "OracleString". Keep in miind that these are the types of the Value property of the OracleParameter objects, not the OracleParameter objects themselves.
OracleDecimal and OracleString (and some other types like OracleDate, etc.) have an "IsNull" property you can use if you cast the Value property to its runtime type...
if ((OracleDecimal)cmd.Parameters["p1"].Value).IsNull) { …do something… }
else { …do something else… }
Or maybe something like this...
Decimal p1val = ((OracleDecimal)cmd.Parameters["p1"].Value).IsNull ? 0 : ((OracleDecimal)cmd.Parameters["AVG_SALARY"].Value).Value;
I'll admit that expressions like this: ((OracleDecimal)cmd.Parameters["AVG_SALARY"].Value).Value look a little weird. But the "Value" of the "OracleDecimal" property is a regular .NET decimal type (System.Decimal). So, it's a "Value" of the "Value" property of the OracleParameter class.
Even when the stored procedure returns a null, the Value property is still populated. In the case of p1, it's populated with an OracleDecimal object (actually a struct) where IsNull is true. That's why "p1.Value==null" tests false.
From what I can see, OracleDecimal, OracleString, etc. will never be typed as DbNull, or DBNull.Value. So, that would be why Convert.IsDBNull(p1.Value)) always returns false. btw, it appears that these are Value types. That would suggest that coding something like like this, should be avoided…
OracleString p2val = ((OracleString)cmd.Parameters["p2"].Value;
if (p2val.IsNull) { …do something… }
else { …do something else… }
By assigning the value to another variable, you’d be actually creating an entire copy of the OracleString structure, which is pointless.
I hope that helps
Edited by: 897674 on Jan 3, 2012 10:44 AM
Edited by: 897674 on Jan 3, 2012 10:46 AM -
How can I get null values for the later weeks
Hi All,
When I execute this code I get the records till current week.
How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
Thanks,
Vikram
DECLARE
v_query VARCHAR2(4000);
TYPE ref_cursor IS REF CURSOR;
v_refcur ref_cursor;
v_sum NUMBER;
v_id NUMBER;
v_name VARCHAR2(1000);
v_weeknum NUMBER;
v_pernum NUMBER;
v_numOfWeeks NUMBER := 5;
BEGIN
v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
FROM s_postn) postn_tbl
WHERE lvl_6_id = 5767
AND fiscal_year = 2008
AND b.week_num < 4
AND b.period_num = 3
AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
ORDER BY postn_tbl.postn_name, b.week_num';
OPEN v_refcur FOR v_query;
LOOP
FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
EXIT WHEN v_refcur%notfound;
dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
END LOOP;
END;
This is the output when I execute this code.
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W2 COMM CNTRL TAM 216 12561.4
P3W3 COMM CNTRL TAM 216 2027.1
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
This is the output I'd like to get
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W4 COMM CNTRL ISAM 213
P3W5 COMM CNTRL ISAM 213
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W4 COMM CNTRL ISAM 273
P3W5 COMM CNTRL ISAM 273
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W4 COMM CNTRL TAM 213
P3W5 COMM CNTRL TAM 213
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W4 COMM CNTRL TAM 273
P3W5 COMM CNTRL TAM 273
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
P3W4 Damon Walters
P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PMSure, in a Single SQL ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>-- Start Of Test Data --
satyaki>with week_tab
2 as
3 (
4 select 1 period_num, 1 week_num, 10 bkg1 from dual
5 union all
6 select 1, 2, 40 from dual
7 union all
8 select 1, 3, 30 from dual
9 union all
10 select 1, 2, 20 from dual
11 union all
12 select 1, 1, 10 from dual
13 union all
14 select 1, 1, 20 from dual
15 union all
16 select 1, 3, 10 from dual
17 union all
18 select 2, 1, 15 from dual
19 union all
20 select 2, 2, 20 from dual
21 union all
22 select 2, 3, 10 from dual
23 union all
24 select 2, 1, 15 from dual
25 union all
26 select 2, 2, 30 from dual
27 union all
28 select 2, 3, 20 from dual
29 )
30 -- End Of Test Data --
31 select period_num,
32 week_num,
33 (
34 select sum(week_tab.bkg1)
35 from week_tab
36 where period_num = m.period_num
37 and week_num = m.week_num
38 group by week_num, period_num
39 ) sum_bkg1
40 from (
41 select dum.week_num,
42 wk.period_num
43 from (
44 select 1 week_num from dual
45 union all
46 select 2 from dual
47 union all
48 select 3 from dual
49 union all
50 select 4 from dual
51 union all
52 select 5 from dual
53 ) dum ,
54 (
55 select distinct period_num
56 from week_tab
57 ) wk
58 ) m;
PERIOD_NUM WEEK_NUM SUM_BKG1
1 1 40
1 2 60
1 3 40
1 4
1 5
2 1 30
2 2 50
2 3 30
2 4
2 5
10 rows selected.
Elapsed: 00:00:00.48
satyaki>Regards.
Satyaki De. -
How can I skip Null values from being part of sorting
Hi,
I am using ADF sorting for table, where i dont want to consider null values of that column when i do sorting . Now when I do ascending sort null values for that column are coming first and then the not null values are coming in ascending order.User,
Always mention your JDev version.
Now when I do ascending sort null values for that column are coming first and then the not null values are coming in ascending order.
.. which is expected. How would you want it to be? You may probably want to have a custom sortListener for the table and try out. Ex : Custom sort function in ADF table
-Arun -
How to avoid the null values from xml publisher.
I am creating a report which have the claim numbers with the values CLA001,CLA111,null, null . when i preview my report it is showing some spaces for null values also. How can i avoid the spaces from the report.
I am giving for loop for the claim numbers in the template.
<?for-each:ROW?> <?sort:CLAIMNUMBER;'ascending';data-type='text'?>
<?CLAIMNUMBER?>
<?end for-each?>
Please help me out to solve this problem.
Thanks,
vasanth.Hi Sheshu,
According to your description, you are experiencing the null values and infinity values when browser the calculated measure, right?
Based on my research, the issue is caused by that dividing a non-zero or non-null value by zero or null. In this cases, we need to check for division by zero to avoid this situation. Here is the sample query for you reference.
IIF(
Measures.[Measure B]=0,null,
Measures.[Measure A] / Measures.[Measure B]
If you have any questions, please feel free to ask.
Regards,
Charlie Liao
TechNet Community Support -
How can I delete null values from List Item?
Hi Friends,
I used List item for field job_Type, I entered values in List item at design time through property pallet. When I run form I will see null values in this List Item.
How can I remove these null values from the List?
Best regards,
ShahzadDear Shahzad,
It can be removed by adding the following code in the When-new-Form-Instance.
Set_item_property('List name', required, property_true);
:block_name.list_name := <put your default value here>; (If you didn't oput the default value, then you will get some problem and the cursor may not navigate away from the list).
Senthil Alagu .P. -
How to see values (null, 0) instead of blank fields
Hi.
I search the forum but only found messages about users who want to show fields blank, when value is null.
I have the problem other way around. I work with DevSuite 10g and have a xml-Report.
I have fields and for some the query returns null (no value). Than the report shows nothing for this fields. Neither a blank line nor a value like 0.
The problem is, that the other values afterwards the blank ones, slip above.
For Example:
field 1
field 2
field 3
field 4
The Query returns null for field 2 and 3.
Then on the report I see:
field 1
field 4
But what I want to see is:
field 1
field 4
or:
field 1
0
0
field 4
But all I tested doesn´t work. I set a value for "when null" in the attribute inspector and the horizontal elasticity of "fix" (I thought it maybe it "slip together" so it is not shown).
Has anyone a idea how I can show a (blank or 0 value) instead of nothing, so that fields afterwards doesn´t slips up?
Thanks for your suggestions
Message was edited by:
ulfkHej MLA.
I think it was from query, but it is anyway if it is from query or from form (it´s not from column).
@Brad
Thanks for your suggestion.
We solve this problem in a similar way.
We put a field under/over the other. We give the field we want to show a white background. So it is "sitting" over the other and the underlaying one is not shown (because the overlaying one has a white background).
If the overlaying one is blank it is not shown (so it can´t has a white background) and we see the underlaying field.
But to use triggers is a better solution.
I solve it on the same way as explained above but using triggers also.
But I have to leave a statement about Oracles Report Builder. Sorry but it is more than horrible program. I never have seen such a (also new and) bad programmed program. It is more than hard to work with it ... it cost me every hour I use it more and more power to stay quite ...
Here are the things I really wish to change at reports bulder directly:
- more than one step back (undo)
- there is a difference between the output in reports bulder on the paper output, what is shown when you print it on a paper (from reports bulder) and from what is shown in a PDF file produced with a reports server (that is really annoying, you never now if it is correct what you see in reports builder!)
- better editing and better selectable of the text-boxes and fields
- a way to hierarchically objects that are on the same layer (frame) so that you can really bank on it, that one object is ever behind another one
- not only moving and scaling of fields and boxes on a fix gutter (free transforming and moving would be great) because sometimes a text or a box with line around is not on the right place (out of order; above another object/text a.s.o.) and when it is (why I don´t really know) is not on the right place and the distance to the other object is less than the fix gutter-distance you can´t move it in such a way, that the two objects are flush with/on a fix line/place. It´s because the fix gutter. The distance is lower than the gutter, if you move it, it is not makeable to move it this less-than-the-gutter-distance to be flush with the other object. You can only move it in the fix gutter-distance and than it can´t be flush with the other objects.
It looked really bad and amateurish!
- a tool (a button or something) where you can marked object to flush all together on the same line, so that all objects for example are flush together on one start-line or ends (horizontal or vertical flush).
It would be great and would the work so really easier and better. -
How to restrict the Null Values for Key Figules in the Bex Query
Hi Friends,
I want to restrict the Null values of a perticular key figure in the Bex Query Output.
I will explain in details. i have 3 key figures in my query.. let us assume.. key1 key2key3
key1 key2 key3
4 4 100.00
5 0 200.00
1 0 19.00
0 1 10.00
i don't want to see the the records for which key 2 is 0.
we have a setting in the Bex Query for restricting the Zero values in the query properties. If we enable that setting it will show
4 4 100.00
but i want the report to display..
4 4 100.00
0 1 10.00
can any body guide me. <b>i want to display the values if key2 <> 0.</b>
Regards,
Nagesh.Hi AVR,
nice to see reply.
can you eloborate your view...how can i put the condition.
<b>i want to put the condition key2 <> 0.</b>
Regards,
Nagesh. -
How to delete the NULL entries in nest table
Hi,
After I used a loop and open/fetch cursor populated the object table
I found there are random NULL entries in my object table (nest table)
The data look like this
NULL NULL NULL
NULL NULL NULL
123 03-MAY-04 ACTIVE
NULL NULL NULL
NULL NULL NULL
234 21-MAY-04 ACTIVE
NULL NULL NULL
345 11-MAY-04 ACTIVE
NULL NULL NULL
How can I get rid of those NULL entries in my nest table? So it can become
123 03-MAY-04 ACTIVE
234 21-MAY-04 ACTIVE
345 11-MAY-04 ACTIVE
Additional info:
create type myType as object
(id NUMBER (10,0),
eff_date date,
status VARCHAR2(17)
create type myNestTab as table of myType;
I have tried Delete procedure in following two ways.
Version 1:
FOR i IN l_my_nest_tab.FIRST..l_my_nest_tab.LAST
LOOP
IF l_my_nest_tab(i).id IS NULL THEN
l_curr_event_tb.DELETE(i);
END IF;
END LOOP;
Version 2:
FOR i IN l_my_nest_tab.FIRST..l_my_nest_tab.LAST
LOOP
IF l_my_nest_tab(i) IS NULL THEN
l_curr_event_tb.DELETE(i);
END IF;
END LOOP;
Both of them give me the error no data found. And only left me the first NOT NULL entry in the table.
123 03-MAY-04 ACTIVE
Thanks in avdance.Hi Vishnu,
u can write a report program for this and in that use the event :
AT NEW <field-name> ( use primary key)
your statements
ENDAT
for eg.
loop at itab ( herfe itab must be of type of table for which u want to track new entries)
at new matnr
write:/ new record
endat
endloop.
schedule this report in background to run in every 5 or 10 mins as per your requirement and hence changes can be tracked.
regards
Vinod
Maybe you are looking for
-
How do I set up a redirect from a subdomain to a specific path in my site?
Running OS X Tiger Server 10.4.11 (all latest updates). For our online Web site we want to be able to allow users to type in a simple URL to get to our sign-in page which has a terribly long URL. User types http://signin.ourdomain.com ---> goes to --
-
I make data DVD's with photos on it for my clients and those with PC's can't open them. Why?! Help
-
LSMW to upload documents in DMS
Hello guys Can we use LSMW to upload large number of documents at once? If yes, please list the detailed steps. I have never used LSMW before. So keeping that in mind, please respond in detail. Looking forward to your replies Thanks a lot Best Regard
-
CS5: What could be causing my CPU to spike?
Machine Specs: Mac OSX 10.6.6 2.66GHz Quad Core Intel Xeon Processor 8GB RAM Running Adobe CS5 Design Standard Background story: I have inherited a magazine from a co-worker. The magazine has been worked on for years by our business and has undergone
-
Hi I want to install Oracle Enterprise manager 11g, I have downloaded V23675-01.zip, V23676-01.zip, V23677-01.zip I unziped V23676-01.zip, V23677-01.zip and they made oms directory, however if i am trying to unzip V23675-01.zip, it gives below messag