0 to be display in place of null value
Hi,
I am working on oracle reports. In data model I am having 5 query builder each query builder is linked with main query bulder. I need to display vendor name , below branch name, under branch I am having 4 types of sales, 1)Panda 2)Key account 3)Wholesale and catering 4) Minimarket & Retails. Every type of sales having two rows one is target and other is actual sales.targets are displaying fine, problem getting in actual sales. If table column having null value in panda that row is not displaying and the other rows are getting up.
ex:
VNDR/Branch 2014 AUG
XXXX(vendor)
XXXX(branch)
PANDA 0 (target)
Key account 10000 (target)
12000 (actual)
Wholesale&catering 15000 (target)
17000 (actual)
Minimarket&Retail 7000 (target)
6000 (actual)
I need 0 in place of actual sales in PANDA also.
Help will be appreciable.
Thank you.
are you sure the row for the panda actual is being returned by the query?
you could try testing the query in sqlplus or some other tool to make sure it's being returned.
are you using the value of the actual sales in a condition somewhere? maybe you should wrap it in nvl.
Similar Messages
-
How to display empty space in place of null values
Hi all,
In my application, i am reteiving values from db and printing thm in a jsp page. Right now, when there is a null value in db for a particular column, i am getting the same null value in my jsp page also. I don't want to print this null value and want to keep those particular fields as blank.Where should i make this change. Can anyone help me out.Use JSTL c:out tag for that.
Try to omit scriptlets as much as possible. Use JSPs for view only and load the data using a servlet and DAO class. To display data and doing some conditional logic, you can use the JSTL tag library for that. -
Display xml- tags with NULL - value
Hello
is there a way to display a tag while the value is null in this matter :
select
xmlforest(AFRAGNR_1, AFRAGNR_2 , AFRAGNR_3 ,AFRAGNR_4 )
AS XML
FROM VIEW_ABC WHERE x = v1 and y = v2
-- result: :AFRAGNR_3 and AFRAGNR_4 is null and not displayed:
XML
<AFRAGNR_1>J</AFRAGNR_1><AFRAGNR_2>J</AFRAGNR_2>
-- by using this, its not the result I want to get,
select
xmlelement( "AFRAGNR_1" , AFRAGNR_1 ) AFRAGNR_1
,xmlelement( "AFRAGNR_2" , AFRAGNR_2 ) AFRAGNR_2
,xmlelement( "AFRAGNR_3" , AFRAGNR_3 ) AFRAGNR_3
,xmlelement( "AFRAGNR_4" , AFRAGNR_4 ) AFRAGNR_4
FROM VIEW_ABC WHERE x = v1 and y = v2
another way ?
regards Norbert
Edited by: astramare on Nov 20, 2008 12:32 PMI have the same problem:
- I need to generate XML in format <element id="1" />
- I need to pass some null values:
SELECT XMLElement ( "ShipToAddress"
, XMLAttributes ( customer_id as "CustomerNo"
, '' as "Code"
, substr(name,1,30) as "Name"
, '' as "Name2"
, substr(street||' '||house_nr,1,30) as "Address"
, '' as "Address2"
, city as "City"
, last_name ||' '|| first_name as "Contact"
, phone as "PhoneNo"
, '' as "CountryCode"
, fax as "FaxNo"
, zip_cd||' '||postal_code_extention as "PostCode"
, '' as "County"
, email as "EMail"
, website as "HomePage")) customer
FROM customers;
result should be:
<ShipToAddress CustomerNo="100001004" Code="3" Name="4C
Cons" Name2="" Address="Metrologielaan" Address2="" City="BRUSSEL" Contact="" PhoneNo="" CountryCode="BE" FaxNo="" PostCode="1130" County="" EMail="" HomePage="" />
and NOT (this is my result at the moment):
<ShipToAddress CustomerNo="100001004" Code="3" Name="4C
Cons" Address="Metrologielaan" City="BRUSSEL" CountryCode="BE" PostCode="1130"></ShipToAddress>;
Can someone help me with this please?
Edited by: willeha on Mar 5, 2009 7:18 AM -
hi how can i display the null value in th following query , where c512 got null value in position column
SELECT par.c_code,tab_to_string(cast(COLLECT(per.lastname) AS t_varchar2_tab)) AS lastname,Tab_to_string(cast(COLLECT(ATYPE.NAME) AS t_varchar2_tab)) AS POSITION
FROM SMS_PARTIES per,
SMS_ORGANISATION_CONTACTS con,
SMS_PARTIES par,
SMS_AFFILIATION_TYPES atype
WHERE per.id = con.per_id
AND par.ID = con.ORG_ID
AND ATYPE.ID = CON.ATYPE_ID
AND par.C_CODE IN ('C512','C70')
GROUP BY par.c_code
C_CODE LASTNAME POSITION
C70 Meyer,McPherson Chairperson,Treasurer
Edited by: user603350 on 2011/07/13 12:27 AM
Edited by: user603350 on 2011/07/13 12:27 AMuser603350 wrote:
i try this
SELECT par.c_code,Tab_To_String(cast(COLLECT(NVL(per.lastname,' ')) AS t_varchar2_tab)) AS lastname,
Tab_To_String(cast(COLLECT(NVL(ATYPE.NAME,' ')) AS t_varchar2_tab)) AS POSITION
FROM SMS_PARTIES per,
SMS_ORGANISATION_CONTACTS con,
SMS_PARTIES par,
SMS_AFFILIATION_TYPES atype
WHERE per.id = con.per_id
AND par.ID = con.ORG_ID
AND ATYPE.ID = CON.ATYPE_ID
AND par.C_CODE IN ('C512','C70')
GROUP BY par.c_code
but stil does not show null column it only show the c70 columnwhere is that c70 column?
do you mean this, c_code column which contains c70 data?
AND par.C_CODE IN ('C512','C70') If I understand you correctly: you want to display c_code column with null values, 'C512', and 'C70'.
AND nvl(par.C_CODE, 'C512') IN ('C512','C70') -
Handle NULL Values from Teradata Database in OBIEE
Hi All,
I have records in a Teradata that are marked with 'A' for Available and sometimes blanks. Even though in OBIEE I have put a filter that says display all records with NULL values or 'A' I am only getting values with 'A'. How can I pick up the records with blanks in that field.Looks like the column value is not NULL. I would suggest to know the exact value of the column
you may go for expression like length(col) where col!='A'
or
case when col is null then '1null'
when col='' then '2'
etc..
once you know the value then replace with 'Unspecified' or any text. -
ODI - Issue with handling null value
Hi,
I have a flat file as below. When i am trying to load the data file into Essbase through ODI, i am not able to load. If i given the Null value as 0, i'm able to load the file into Essbase. If we pass 0 in place of null value, blocks will be created in Essbase and it might cause the performance issue.
Account,Product,Customer,Version,Year,BU,Data
A1,P1,C1,V1,2010,BU1,7677
A2,P2,C2,V2,2010,BU2,0908
A3,P3,C3,V1,2010,BU3,
Can any one help if there is any way to handle the null values to load the data into Essbase?
Your help is more important to us as it is one of the critical one we are facing.
Thanks
V D ReddyHi
I am not using any query.
Data column is empty (no data) for few records in my flat file. After the data load is done to Hyperion Essbase, in the excel retrieve should show me as #Missing. But ODI is defaultly loading it as 0 into Essbase.
Is there any way to load it as #Missing?
Thanks
V D Reddy -
Not to display the null values from data base
Hiiii.
In a jsp file i have ten check boxes.The jsp file is mapped to a servlet file for parameter requesting and to
store it in DB.
The unchecked box values has null values.All the values are store in a Mysql DB table.
Again i have to display it in a jsp page from table.
The problem am facing was,how can i display only the values in a row.it must not display the null values and the crresponding column name.
Or any other way is their like below
How i can retrieve only the selected check boxes from tht jsp file.and store in backend.
Thanks in Advance
regards,
satheesh kannanHere is a rough example that may give you some ideas:
On the JSP page:
<%if(myData.getFirstName()!=null){%>
Your First Name'
<input type="text" name="firstName" value="<%=myData.getFirstName()%>">
<%}%>
In the servlet:
String firstName= request.getParameter("firstName");
if(firstName!=null){
//write it to the database
} -
A page is using PL/SQL script to display data. There are 2 display variables. Instead of bringing initial set of data, it displays NULL values. It "fixes" itself after changing variable values from a drop down menu. Why is that and how to fix it?
If you plan on performing all of the work under the Click event, then you won't need to worry about assigning a Script scope to the variables, but if you are planning on using those variables outside of the Event, then David's answer is the way to go.
Another option is to use a hash table as it also works around the issue with variable scope in a UI Event.
#Define at beginning of script
$hashtable = @{}
$OKButton.Add_Click({$hashtable.SelectedTemplate=$Something})
Boe Prox
Blog |
Twitter
PoshWSUS |
PoshPAIG | PoshChat |
PoshEventUI
PowerShell Deep Dives Book -
Prevent null values from displaying in answers OBIEE 11g
Is there any possibilities in OBIEE to Prevent null values from displaying in answers
For example, If i have two records in table
TV cost=NULL(having agg rule sum in BMM layer)
RADIO cost=10(having agg rule sum in BMM layer)
in answers i get two records
TV NULL
RADIO 10
but i want to get one, only with not null costJust want to clarify your question,You want to eliminate the NULL values from the report am i right? If that is the case then put the filter COST <> NULL.
Do let me know the updates?
Thanks, -
Grouping to display null values for all the missing dates
Hi SAP,
I am trying to display '0.00' value for all the missing dates in my crystal reports as follows:
17-Jan-14 40.00
18-Jan-14 0.00
19-Jan-14 0.00
20-Jan-14 80.00
However, my crystal report is showing as follows:
17-Jan-14 40.00
18-Jan-14 0.00
19-Jan-14
20-Jan-14 80.00
The missing dates with no data are group together and my '0.00' value is not. Kindly advise me the solution. The formula is shown as per attached.
Thank you.
Regards.Hi,
Thanks for your reply.
Fyi, I am using a formula field in crystal report to display "0.00" for days in between as follows:
whileprintingrecords;
if Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy') = "" then "" else "0.00"
There is another formula field in crystal report to display the missing dates in between as follows:
whileprintingrecords;
Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy')
Below is my report custom functions:
Function Days_Between (datefield as datetime, nextdatefield as datetime, format as string)
' This function is only used to display what data is missing within a specified date range...output type is text
dim thisdate as date
dim nextdate as date
dim output as string 'output is the text display
dim daysbetween as number
dim looptimes as number
looptimes = 0
daysbetween = 0
output = ""
thisdate = datevalue(datefield) + 1
nextdate = datevalue(nextdatefield)
if nextdate - thisdate > 1 then daysbetween = nextdate - thisdate else daysbetween = 1
do
if nextdate - thisdate > 1 _
then output = output + totext(thisdate, format) + chr(10) _
else _
if nextdate - thisdate > 0 _
then output = output + totext(thisdate, format)
looptimes = looptimes + 1
thisdate = thisdate + 1
loop until looptimes = daysbetween
Days_Between = output
End Function
The issue arise when when there is more than one missing dates in between but the null values ("0.00") displayed is only for the first missing dates and not for all the missing dates.
Regards,
Ting Wei -
Mail will not display images with .jpeg extension. .jpg works fine. (displays in place when opening the email. What plug-in would correct this?
If you think you're insane now, try maintaining those pop up menus.
As far as I know, these menus have not been updated since FW 8, so
they are at least two versions old.
Save yourself a lot of grief by avoiding those menus. There are many
other products on the market which do a much better job of creating
and maintaining this type of navigation structure.
Read this link before you climb any higher on this slippery slope:
http://apptools.com/rants/jsmenu.php
There was another blog post by the fellow who originally wrote the pop
up menu feature, but I can't seem to locate it. Even he says stay away
from them.
Not the answer you probably want, but I hope it helps, nonetheless.
Jim Babbage -
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 -
Am writing a 3 tier program. I am using java applets and mysql. One of the functions is to display values from the table in an applet. The condition is to display fields from the table that are null. I have been able to disply not null values (but not in an applet) but not null values. Can someone please tell me if it is possible and if so how. Sample code would be soooo helpful.
thanxhttp://forum.java.sun.com/thread.jsp?thread=503983&forum=48&message=2386043
-
Need to display null values against table
Hi All,
I have one table in which I only need to display null values along with the rest of columns. for example
ename sal date
scott 2000 15/07/06
Michal
now my query should return---
ename sal date
michal
hare krishna
AlokMaybe it is something like this?:
michaels> select column_name || ' contains ' ||
dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() ||
' NULL values' null_columns
from cols
where table_name = 'EMP'
and dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() > 0
NULL_COLUMNS
MGR contains 1 NULL values
COMM contains 10 NULL values -
Keeping table description on change and not displaying NULL values
I have the table grouped by BFY and then showing by fund. I can only get the description section to show up for the first fund and then when it changes funds nothing shows up. Then when the year changes again it appears.
ex.
BFY: 2005: 0100AXXXXD
but when the fund changes from 0100AXXXXD........nothing shows up.
Also I wanted to not include any funds/years that are null. I had the following code in but it isn't stopping the null values.
<?if: SEC_ZERO_INDICATOR !=0?>
Thanks for any help.Need to see your xml data structure. Can you send me the xml and RTF file to [email protected]? I will take a look.
Thanks,
Bipuser
Maybe you are looking for
-
As the summary states, I have been scouring the internet high and low trying to find a WORKING contact form created in Flex 2. I have yet to see it. And the frustration of building it myself is starting to get to me. So I am asking for the help of an
-
With new IOS7 there is no attachment feature in mails!
Need help, no attachment feature in mail since installation of IOS7
-
After experiencing failures attempting to perform an 18GB data backup to CD or DVD using almost every backup program on the market, I decided to try using Vista Live File System to a Blue-ray disc. While I can use Vista's Live File System to write C
-
hi im trying to import my contacts from my sim card but it doesnt seem to be working......i put my sim card in my old phone moved the contacts to the micro sim, then went to settings and all that went to import contacts then the propmt came up for ha
-
Convergence patch 10 and 11 Printing Calendar Problem
I'm printing a month view of the calendar using 3 shared calendars. Each calendar is has it's own colour. I don't see the little colour box next to the calendar item. I have been able to confirm this with FF 3.5.4 on Nevada build 129, FF 3.5.7 on Mac