Convert Database NULL Values to default
Hi Friends,
I have two doubts. Any help on this is appreciated -
1. Convert Database NULL Values to default / Convert Other NULL values to default ( from File Menu - Report Option ), can any one please tell that Default Values are the values from respective Database or Crystal Reports itself?
2. Can anybody please provide the site - link, document covering details of Crystal Reports performance optimization?
Thanks in advance !!
Regards,
Ashish B
Hi Ashish,
Here are the few tips to enhance the performance of Crystal Reports.
1. While you are using subreports, always try to use on demand subreport when appropriate.
2. If you are creating linked subreports, try to base the link on an indexed field in the subreport.
3. If you are linking subreports with formula fields, try to keep the formula field in the main report and use a database field in the subreport.
4. Try to create proper indexed field in database, so that the data access will be faster.
5. Donu2019t use multiple data sources in reports. CRYSTAL REPORTS allows this situation, but it degrades performance.
6. Try to create SQL expression fields. Since they are evaluated in database server side, so the performance can be enhanced.
7. Always use server side processing or server side grouping. To do so, choose Database | Perform Grouping On Server from the pull down menu.
8. Donu2019t use Crystal Reports formula languageu2019s built-in functions, such as ToText, in your selection criteria.
9. Donu2019t base record selection on formula fields.
There are a number of factors that affect the processing speed of reports in Crystal Reports. For more information, search for the document u2018Tips to Improving Report Processing Speedu2019 which may improve your reportu2019s performance.
Hope it helps!!
Regards,
Alpana
Similar Messages
-
Crystal Reports 2008: "convert DB null values to default"
All:
Quick question on CR 2008;
Which default value will be set when you enable u201Cconvert DB null values to defaultu201D using report option in CR - based on Database default value setting or Crystal Report's?
Thanks.
Sathish.So it is Crystal Reports settings NOT database default value settings that Crystal Reports uses, correct?
Thank you! -
Setting null values vs Default or initial values in the Database?
i am working on a system and i have set any field that might optional as Allow Null,, but this is causing me a lot of troubles especially when i am querying the data or perfoming some calculations from the database. So is it valid if i changed all the Allow null field to have initial values an restricting null values to be inserted into them, so example, to set the initial values for an integer to be 0 and string to be empty?
Hi,
You can implement business logic on db side or on app side.
Advantage and disadvantage of implementation business logic on DB side.
Advantages:
1.Don't require app server software version changes/compilations (Java, C, C++, C#...)
2.Stored procedures are stored directly in the db.
3.DBA can manage and optimize the stored procedures in flexible way; it'll be transparent for app server because the same remaining interface.
4.Avoidance of network traffic - the stored procedures can run directly within DB engine.
5.Encapsulation of business logic as API in the database.
6.Reports can be implemented like PL/SQL functions that return table data type. The functions can be called from application side - sort of API.
Disadvantages:
1.DB vendor specific, but when dealing with the same databases (for example Oracle) it's not relevant.
2.Require DB skills to write the procedures correctly: it will require time for a pure java/c/c++/c# programmer to understand the DB code and to write it in optimal (from db point of view) way.
3.If it's too complex business logic - the db side implementation can become too complex.
To overcome issue with null(s) please use NVL function.
Example:
drop table TEST_TABLE;
create table TEST_TABLE(parameter varchar2(20), val number(10, 2));
insert into TEST_TABLE values ('A', 23.245);
insert into TEST_TABLE values ('B', null);
insert into TEST_TABLE values ('C', 123);
insert into TEST_TABLE values ('D', null);
select avg(nvl(val, 0)) from TEST_TABLE;Hope this will help.
Best Regards,
http://dba-star.blogspot.com/ -
Hi,
I'm attempting to create a report in Crystal Reports Designer 2008 using a Microsoft Access 2003 table as a source. I'm having difficulty with my report design when the first record of the table contains a NULL value. I wish to find the Maximum() value of this field using the formula Maximum({table.field1}, {table.field2}) where field1 contains the value i'm trying to find the maximum of and field2 contains the grouping data. I find that if field1 contains valid values then the formula works as expected whereas if the first field1 value is NULL then the formula simply refuses to output anything (not even an error).
I attempted to amend my formula to read:
If IsNull({table.field1})
Or {table.field1} = ""
Or {table.field1} = " " Then
"1"
Else
Maximum({table.field1}, {table.field2})
But this also refuses to work.
I also tried the following from the menu File > Report Options ... > Convert Database NULL Values to Default, and the other setting of Convert Other NULL Values to Default, but neither seemed to work for me.
Any ideas on how I can test the table to see if the value is a null and hence deal with it?
Thanks,
MikeIan,
I had previously tried that with no luck.
I've investigated further and I think the problem actually lies elsewhere. In my report design I join a couple of SQL Server views to the MS Access table. I think the join conditions are such that there is no data to bring back and so although the {table.field1} contains a vaule it is being ignored since the other tables can't join to it.
I've managed to alter my other views and the problem still seems to have gone for the moment.
I guess to answer my own question, the use of ISNULL(), = "" or = " " are the correct tests for a MS Access table and probably for most other data sources as well.
Thanks,
Mike -
Cannot display NULL values as 0
I am trying to display a count by dates (which I am grouping by), but when the value is null, nothing displays and the dates are not displayed either. I want to display every date in the range entered in the prompt and its respective count, even if the count is '0', I want to see a '0'.
I have tried every suggestion posted on this forum for that same issue and nothing has worked.
I have checked the boxes under Report Options for 'Convert Database NULL values to Default' and 'Convert Other NULL Values to Default'. I had also created a formula for the count and had selected 'Default Values For Nulls', and that didn't work either.
Can someone suggest something else I may need to check on my report? I can't find any solution,and I'm desperate at this point.
Thanks.You can do so but using a stored procedure.I have done this...since I have got the same requirement.
I am pasting a sample of the stored procedure.This stored procedure is created in Oracle.
create or replace procedure call_as_all_dates(
allDates IN OUT PKG_PCI_Compliance.allDates,
bDate IN solidcor.AS_SS_EVENTS.EVT_TIMESTAMP%TYPE,
eDate IN solidcor.AS_SS_EVENTS.EVT_TIMESTAMP%TYPE
as
dateDiff number;
begin
dateDiff :=TRUNC(TO_NUMBER(SUBSTR((eDate-bDate),1, INSTR(eDate-bDate,' '))));
open allDates FOR select rownum,0 as custID,to_char(null) as gName,to_char(null) as hName,trunc(bDate+ rownum) AS_DATE,to_char(null) as uName,to_char(null) as
evtName,to_char(null) as evtObject from sys.all_objects where rownum<dateDiff
union all
select rownum,asCust.ID,asGroup.NAME,ssEvents.HOST_NAME,ssEvents.evt_timestamp,ssEvents.evt_username,ssEvents.EVT_DISPLAY_NAME,ssEvents.EVT_OBJECT from solidcor.as_solidifier_groups asGroup inner join solidcor.as_ssgrp_ss_assoc ssGrpAssoc on (asGroup.GROUP_ID= ssGrpAssoc.GROUP_ID) right outer join solidcor.as_solidifiers asSf on (ssGrpAssoc.SS_ID=asSf.SS_ID) right outer join solidcor.as_ss_events ssEvents on (asSf.UUID=ssEvents.HOST_UUID) right outer join solidcor.AS_CUSTOMERS asCust on (ssEvents.CUSTOMER_ID=asCust.ID) where ssEvents.EVT_NAME in ('FILE_ATTR_SET_UPDATE', 'FILE_ATTR_CLEAR_UPDATE', 'ACL_MODIFIED', 'ACL_MODIFIED_UPDATE', 'FILE_CREATED', 'FILE_DELETED', 'FILE_MODIFIED', 'FILE_ATTR_MODIFIED', 'FILE_RENAMED', 'FILE_CREATED_UPDATE', 'FILE_DELETED_UPDATE', 'FILE_MODIFIED_UPDATE', 'FILE_ATTR_MODIFIED_UPDATE', 'FILE_RENAMED_UPDATE', 'FILE_SOLIDIFIED', 'FILE_RESOLIDIFIED', 'FILE_UNSOLIDIFIED', 'FILE_ATTR_CLEAR', 'FILE_ATTR_SET');
end;
Regards,
Amrita -
Reading Numeric UDF null value in DI
We have a UDF of Numeric(4) that can be NULL, 0, 1, 2, etc. We try to read it from DI, and if it is NULL, then set the result to be -1 (the default value we difined), so we can differentiate NULL and 0.
The C# code we have look like this:
int LineNumber = -1;
SAPbobsCOM.Company oCompany;
// Code to get Company
SAPbobsCOM.Documents oDoc = oCompany.GetBusinessObject(BoObjectTypes.oQuotations);
oDoc.GetByKey(100); // Get the document by DocEntry
LineNumber = (int)oDoc.UserFields.Fields.Item("U_XX_LN").Value;
The problem is LineNumber gets 0 even if in the database U_XX_LN is NULL. We tried the code below and got the same result because oDoc.UserFields.Fields.Item("U_XX_LN").Value.ToString() always return '0' if it is NULL.
if (string.IsNullOrEmpty(oDoc.UserFields.Fields.Item("U_XX_LN").Value.ToString()))
LineNumber = -1;
else
LineNumber = (int)oDoc.UserFields.Fields.Item("U_XX_LN").Value;
The question is: how can we set it to default -1 if in the database the value is NULL?
Thank you,
GraceHi Grace,
Unfortunately the DI API automatically converts database null values to a default value for the datatype (eg null for numeric becomes 0 and null for strings is an empty string). If you want to differentiate between null and zero you will need to query the table using the isnull command rather than reading the table through the UserTables object:
oRecordSet.DoQuery("select isnull(U_XX_LN, -1) as U_XX_LN from [@MYTABLE] where Code = 'MYCODE')
This will convert the null value to a -1 in the recordset so you can tell the difference between nulls and zeros.
Kind Regards,
Owen -
"Convert Null Database Values to Default" is disabled/greyed out for CR2008
We have a new install of Crystal Reports 2008 12.0.0.683.
I can set the Options to check "Convert Null Database Values to Default", but I created a new report on crdb_odbc.dll to SQL Server BEFORE setting this Option on. I need to check that option on in Report Options, but it is disabled, and I have no idea why - never seen anything like that happen (and cannot find any reference to it in the Forum threads). Another thing I noticed in the Database Expert is the indexed fields do not have a coloured identifier. Not sure if that is related.
However, now in Options if have checked Convert Null Database Values to Default, and when I create a new report, it remains checked in Report Options and enabled. I just don't really want to have to create my report from scratch again.
Any thoughts? Thanks!
Do I need a service pack, and if so, where do I download that from?Hi Angela,
Please try the following :
1. File menu>>Report Options.
2. Uncheck the check box "Perform Grouping on Server".
3. Now check whether "Convert Null Database Values to Default" is enabled or not.
Regards
Manish Tiwari -
Using Convert to handle NULL values for empty Strings ""
After having had the problem with null values not being returned as nulls and reading some suggestion solution I added a converter to my application.
<converter>
<converter-id>NullStringConverter</converter-id>
<converter-for-class>java.lang.String</converter-for-class>
<converter-class>com.j2anywhere.addressbookserver.web.NullStringConverter</converter-class>
</converter>
...I then implemented it as follows:
public String getAsString(FacesContext context, UIComponent component, Object object)
System.out.println("Converting to String : "+object);
if (object == null)
System.out.println("READING null");
return "NULL";
else
if (((String)object).equals(""))
System.out.println("READING null (Second Check)");
return null;
else
return object.toString();
public Object getAsObject(FacesContext context, UIComponent component, String value)
System.out.println("Converting to Object: "+value+"-"+value.trim().length());
if (value.trim().length()==0 || value.equals("NULL"))
System.out.println("WRITING null");
return null;
else
return value.toUpperCase();
...I can see that it is converting my values, however the object to which the inputText fields are bound are still set to empty strings ""
<h:inputText size="50" value="#{addressBookController.contactDetails.information}" converter="NullStringConverter"/>Also when reading the object values any nulls are already converted to empty strings before ariving at the converter. It seems that there is a default converter handling string values.
How can I resolve this problem as set nulls when the input value is an empty string other then checking every string in my class individually. I would really hate to pollute my object model with empty string tests.
Thanks in advance
Edited by: j2anywhere.com on Oct 19, 2008 9:06 AMI changed my converter as suggested :
public Object getAsObject(FacesContext context, UIComponent component, String value)
if (value == null || value.trim().length() == 0)
if (component instanceof EditableValueHolder)
System.out.println("SUBMITTED VALUE SET TO NULL");
((EditableValueHolder) component).setSubmittedValue(null);
else
System.out.println("COMPONENT :"+component.getClass().getName());
System.out.println("Converting to Object: " + value + "< to " + null);
return null;
System.out.println("Converting to Object: " + value + "< to " + value);
return value;
}which produces the following output :
SUBMITTED VALUE SET TO NULL
Converting to Object: < to null
Info : The INFO line however comes from my controller object where I print out the set value :
package com.simple;
import java.util.ArrayList;
import java.util.List;
public class Controller
private String information;
/** Creates a new instance of Controller */
public Controller()
System.out.println("Createing Controller");
information = "Constructed";
public String process()
System.out.println("Info : "+getInformation());
return "processed";
public String reset()
setInformation("Re-Constructed");
System.out.println("Info : "+getInformation());
return "processed";
public String setNull()
setInformation(null);
System.out.println("Info : "+getInformation());
return "processed";
public String getInformation()
return information;
public void setInformation(String information)
this.information = information;
}I also changes my JSP / JSF page a little. Here is the updated version
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%--
This file is an entry point for JavaServer Faces application.
--%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<f:view>
<h:form>
<h:inputText id="value" value="#{Controller.information}"/>
<hr/>
<h:commandLink action="#{Controller.process}">
<h:outputText id="clicker" value="Process"/>
</h:commandLink>
<hr/>
<h:commandLink action="#{Controller.reset}">
<h:outputText id="reset" value="Reset"/>
</h:commandLink>
<hr/>
<h:commandLink action="#{Controller.setNull}">
<h:outputText id="setNull" value="Set Null"/>
</h:commandLink>
</h:form>
</f:view>
</body>
</html>The converter is declared for the String class in the faces configuration file. From the log message is appears to be invoked, however the object is not set to null.
I tested this with JSF 1.2_04-b20-p03 as well as 1.2_09-b02-FCS.
any other suggestions what could be causing this. -
Null-value="default" ignored?
I am experimenting with the null-value attribute on a field and
while a value of "exception" seems to be behaving as expected,
"default" seems to be no different than "none".
I have a trivial class with a String field (fieldTwo) that's
mapped to a non-null column in the database. Here is the JDO
mapping file:
<class name="DumbData" identity-type="application"
objectid-class="DumbData$Oid">
<extension vendor-name="kodo" key="table"
value="dumb_data"/>
<extension vendor-name="kodo" key="lock-column"
value="lock"/>
<extension vendor-name="kodo" key="class-column"
value="none"/>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="data-column"
value="id"/>
</field>
<field name="fieldOne">
<extension vendor-name="kodo" key="data-column"
value="field_one"/>
</field>
<field name="fieldTwo" null-value="default">
<extension vendor-name="kodo" key="data-column"
value="field_two"/>
</field>
<field name="theReference">
<extension vendor-name="kodo"
key="id-data-column" value="dumb_data2_id"/>
</field>
<field name="transientField"
persistence-modifier="transactional" />
</class>
Here is the generated SQL for an insert:
INSERT INTO dumb_data
(field_two, lock, id, field_one, dumb_data2_id)
VALUES (NULL, 0, 20, 1234, NULL)
Apparently, Kodo is attempting to insert a null for fieldTwo
(instead of '') although the mapping specifies
null-value="default". Am I missing something obvious and
completely embarassing myself here?
Thanks,
Alex
Alex Albu
Commerce Technologies, Inc.
21 Corporate Drive
Clifton Park, NY 12065According to the JDO spec, setting null value = 'default' means that a null
for the field will be replaced with that field type's default value. There
is no Java default value for Strings. The default is null.No, the spec says (20.9.6.):
The null-value setting of "default" is used when the default
value for the data store element is to be used for null-valued
fields.
And it even gives an example for String:
[...] a null-valued String field would be written to the data
store as an empty (zero length) String where the null-value
setting is "default".
Alex Albu
Commerce Technologies, Inc.
21 Corporate Drive
Clifton Park, NY 12065 -
How to convert a measure value to null when the actual measure value is 0
Hello Gurus,
I have year, products, measure 1, measure 2, measure 3. I am added three products into one category by using bin in the analysis i am getting zeros for some of the measure cells when it should be null values, because the actual measure values are null for indivudual product. How can i convert that 0's to null. Please advise.
Thanks,
RCTo answer your immediate question, you can write this:
CASE WHEN table.column = 0 THEN NULL ELSE table.column END
Remember though, that any aggregations done on a record that is NULL will not yield a sum. That is why the usual case is to convert NULLs to 0s. But that may not be a concern for what you are doing. Good luck! -
External tables in Oracle 11g database is not loading null value records
We have upgraded our DB from Oracle 9i to 11g...
It was noticed that data load to external tables in 9i is rejecting the records with null columns..However upgrading it to 11g,it allows the records with null values.
Is there are way to restrict loading the records that has few coulmns that are null..
Can you please share if this is the expected behaviour in Oracle 11g...
Thanks.Data isn't really loaded to an External Table. Rather, the external table lets you query an external data source as if it were a regular database table. To not see the rows with the NULL value, simply filter those rows out with your SQL statement:
SELECT * FROM my_external_table WHERE colX IS NOT NULL;
HTH,
Brian -
HELP NEEDED !! Null values in Database
Hi there !!
I need help with EJB 3.0 passing null values to database. The situation looks like that :
I have created EJB entity class called "Osoba.java", it is in relation
with "Rola.java" (one to many). Each Object of class Osoba can have
many Roles. Then I created "OsobaServiceBean.java " I included it with
metod "CreateUnregisteredOsoba(Osoba , Boolean)". From "flex" level I
call this bean - call is accepted, and as a result new object of class Osoba is added to database. Problem is that only one column is filled in table,
dispite that in service bean I enforce it to fill all columns (see
source code - file OsobaServiceBean.java , method
createUnregisteredOsoba() )
I provided source code here :
FILE Rola.java
package test.granite.ejb3.entity ;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
@Entity
public class Rola extends AbstractEntity {
private static final long serialVersionUID = 1L;
@Basic
private String login = new String("");
@Basic
private String rola = new String("");
@Basic
private String roleGroup = new String("");
@Basic
private Boolean zatwierdzony = new Boolean(false);
@ManyToOne(optional=false)
private Osoba osoba;
public Boolean getZatwierdzony() {
return zatwierdzony;
public void setZatwierdzony(Boolean zatwierdzony) {
this.zatwierdzony = zatwierdzony;
public String getLogin() {
return login;
public void setLogin(String login) {
this.login = login;
public String getRola() {
return rola;
public void setRola(String rola) {
this.rola = rola;
public Osoba getOsoba() {
return osoba;
public void setOsoba(Osoba osoba) {
this.osoba = osoba;
public String getRoleGroup() {
return roleGroup;
public void setRoleGroup(String roleGroup) {
this.roleGroup = roleGroup;
FILE Osoba.java
package test.granite.ejb3.entity ;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
@Entity
public class Osoba extends AbstractEntity {
private static final long serialVersionUID = 1L;
@Basic
private String imie;
@Basic
private String nazwisko;
@Basic
private String login;
@Basic
private String haslo;
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER,
mappedBy="osoba")
private Set<Rola> role = new HashSet<Rola>();
@Basic
private String email;
@Basic
private String nrTelefonu;
@Basic
private int rokStudiow;
public String getPelneImie() {
StringBuilder sb = new StringBuilder();
if (imie != null && imie.length() > 0)
sb.append(imie);
if (nazwisko != null && nazwisko.length() > 0) {
if (sb.length() > 0)
sb.append(' ');
sb.append(nazwisko);
return sb.toString();
public String getImie() {
return imie;
public void setImie(String imie) {
this.imie = imie;
public String getNazwisko() {
return nazwisko;
public void setNazwisko(String nazwisko) {
this.nazwisko = nazwisko;
public String getLogin() {
return login;
public void setLogin(String login) {
this.login = login;
public String getHaslo() {
return haslo;
public void setHaslo(String haslo) {
this.haslo = haslo;
public Set<Rola> getRole() {
return role;
public void setRole(Set<Rola> role) {
this.role = role;
public String getEmail() {
return email;
public void setEmail(String email) {
this.email = email;
public String getNrTelefonu() {
return nrTelefonu;
public void setNrTelefonu(String nrTelefonu) {
this.nrTelefonu = nrTelefonu;
public int getRokStudiow() {
return rokStudiow;
public void setRokStudiow(int rokStudiow) {
this.rokStudiow = rokStudiow;
FILE OsobaServiceBean.java
package test.granite.ejb3.service;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.security.RolesAllowed;
import javax.ejb.Local;
import javax.ejb.Stateless;
import javax.persistence.Query;
import org.jboss.annotation.security.SecurityDomain ;
import test.granite.ejb3.entity.Osoba;
import test.granite.ejb3.entity.Rola;
@Stateless
@Local(OsobaService.class)
@SecurityDomain("other")
public class OsobaServiceBean extends AbstractEntityService implements
OsobaService{
private static final long serialVersionUID = 1L;
public OsobaServiceBean() {
super();
public List<Osoba> findAllOsoba() {
return findAll(Osoba.class);
@SuppressWarnings("unchecked")
public List<Osoba> findAllOsoba(String name) {
Query query = manager.createQuery (
"select distinct p from Osoba p " +
"where upper(p.imie) like upper('%" + name + "%')
or upper(p.nazwisko) like upper('%" + name + "%')"
return query.getResultList();
public Osoba createOsoba(Osoba person) { // pozwalamy
tworzyc zeby niezalogowany
return manager.merge (person); //
uzytkownik utworzyl osobe
} // ale
osoba ta i tak nie bedzie jeszcze
// zatwierdzona
@RolesAllowed({"unregistered"})
public Osoba createUnregisteredOsoba(Osoba person, boolean
zatwierdzony) {
Rola niezarejestrowany = new Rola();
niezarejestrowany.setRola("user");
niezarejestrowany.setOsoba(person);
niezarejestrowany.setRoleGroup("Roles");
niezarejestrowany.setLogin(person.getLogin());
niezarejestrowany.setZatwierdzony(zatwierdzony);
Set<Rola> role = new HashSet<Rola>();
role.add(niezarejestrowany);
// Arrays;
Object a[] = role.toArray();
Rola temp;
temp = (Rola)a[0];
System.out.println("Login = " + temp.getLogin() + //
added only for check !!
"Rola = " + temp.getLogin() +
"Zatwierdzony = " +
temp.getZatwierdzony() +
"Rolegroup = " + temp.getRoleGroup());
person.setRole (role);
return manager.merge(person); //
uzytkownik utworzyl osobe
} // ale
osoba ta i tak nie bedzie jeszcze
public Osoba modifyOsoba(Osoba person) {
return manager.merge(person);
@RolesAllowed({"admin"})
public void deleteOsoba(Osoba person) {
person = manager.find(Osoba.class, person.getId());
manager.remove(person);
public void deleteRola(Rola rola) {
rola = manager.find(Rola.class, rola.getId());
rola.getOsoba().getRole().remove(rola);
manager.remove(rola);
DATABASE LISTING :
-----------------------------------------------------------------+----------\
--------------------------------------------------------+
| id | ENTITY_UID | version | rola |
zatwierdzony | osoba_id | login | RoleGroup |
-----------------------------------------------------------------+----------\
--------------------------------------------------------+
| 1 | | NULL | unregistered |
| 0 | unregistered | Roles | NULL |
| 33 | eee91bd9-8c5f-4154-8260-3cac9a18eb97 | 0 | user |
| 34 | NULL | NULL |
| 32 | a7ed4e8d-a1ba-473a-921c-73c8f8f89efb | 0 | user |
| 33 | NULL | NULL |
-----------------------------------------------------------------+----------\
--------------------------------------------------------+
The row numer 1 is added by hand and it works. row number 33 and 32
are added to database by method CreateUnregisteredOsoba. As you can
see fields login as well as Roles and RoleGroup are empty (NULL). What
Im doing wrong ?
Thanks for your help -
Roman Kliś
PS. Table Osoba works fine - everything is added as I want.I solved problem.
The reason why EJB had not added anything to database NULL was becouse wrong names of class. Ive refactored whole class Rola.java to RolaClass.java and suddenly it worked.
True reason is still unknown but most importent is that it works.
Thanx for reading topic - hope next time someone will answer my questions.
By !! -
Cannot Save NULL value to database
I cannot save a null value through the data tab in the multi-row updates pane. It always gives me an error such as "Invalid number". It works fine through normal SQL update statement. Is there a preference somewhere to turn this on?
thanks in advance
Paul PHi Paul,
Just use the backspace key to obliterate any existing value -- that makes it null. Afterwards, if you refresh or close/reopen the object, the data tab will display any null as the value set in Tools | Preferences | Database | Advanced | Display Null Value As .
Regards,
Gary
SQL Developer Team -
Convert hashmap (containing null values) to hashtable
hi
the following code gives me java.lang.NullPointerException
how can i convert a hashmap ( contaiing null values ) to hashtable... ??
and vice versa ?
HashMap hm =new HashMap();
hm.put("1","one");
hm.put("2","two");
hm.put("3","three");
hm.put("4",null);
Hashtable ht = new Hashtable(hm);how ever the code will run perfectly well if i remove
hm.put("4",null);Regards
Lavso does that mean that theres is no way to convert a
hashmap containing null values to hashtable ..!!There are several ways described above.
If you mean is there a way to preserve the nulls as nulls, then, no, you cannot do that, because, as stated in the docs, null cannot be a key or value in a Hashtable. -
Converting Null Values to Zero
My report output shows expense dollars by category. In the instance where there were no expenses within a category, the output is blank/null. Where can I put a condition to convert null values to zero for the report output?
Angela Calhounyou can try doing this in Query definition by creating a formula variable.
Thanks...
Shambhu
Maybe you are looking for
-
I can not get my Iphone or ipad to except the new email address that is now on Apple so nothing will back up or work on Icloud on those devices Thx plz help Sheyw
-
IRQ problems?, especially with USB.... read this
Summary: the following things are listed to help people configure or disable USB and USB IRQ related options, some steps may help diagnose/eliminate other IRQ problems. Some Operating Systems/Motherboards may have Similiar or Alternative ways to pref
-
I have a BLOB column which contains BASE64 encoded jpegs. I want to decode these from BASE64 such that I can get the original JPEG. I've written a function to do this (based on an example found here but modified slightly since my source is a BLOB not
-
Simultaneous multi track recording in Logic Pro7 using MOTU 828 mk2
I would like to use the eight separate audio inputs on my MOTU 828 and connect them directly in line to eight channel strips/tracks in Logic Pro 7 v 7.2.1. (presumably through the firewire interface). I can't find any documentation in either the Lo
-
I've been trying for 4 days to download purchased media from iTunes and I keep getting this error message "The network connection timed out." I assure you my internet connection works perfectly. Not sure if this is relevant, but this error spontaneou