Replacing NULL and EmptyString('') with "Unknown" in SSRS parameter dropdown

All,
What I want to do is, in the SSRS parameter drop down, instead of showing NULL and Blank values(), i want to categorize them as "Unknown", so, if the user selects "Unknown" from the SSRS drop down parameter, he should be able to see all
the records that have NULL values or empty strings in that particular column in the result set.
Can you tell me, how should I handle it in my main stored proc as well as in the dataset?
Right now, i have something like this:
Where
(t1.name in (select value from dbo.Split(@TName,',')) OR @TName IN ('All'))
-- Where t1.Name has empty strings and NULL values. Both of these values should be categorized under "Unknown"
-- How would the dataset query look like? Right now I have this query for populating the drop down for that parameter:
Select All
UNION
Select Distinct Name
Order BY 1

Hello,
Please refer to the following stored procedure:
SELECT
CASE WHEN TName IS NULL OR TName = ''
THEN 'Unknown' ELSE TName END AS TName
From DemoTable
Then, use following query code to get the parameter values:
SELECT Distinct
CASE WHEN TName IS NULL OR TName = '' THEN 'Unknown'
ELSE TName END AS TName
FROM DemoTable
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support

Similar Messages

  • Replace quotient and Remainder with Scale by power 2

    I want to replace quotient and Remainder function with Scale by power 2 to reduce resource usage on FPGA.
    Here is my problem, I want to achive the same result, but no sure if the code will allow me to input the value I need, i also am not sure what that value should be?
    Attachments:
    quotientProblem.png ‏37 KB

    Florian.Ludwig wrote:
    The problem is I don't know what's expensive in RT.
    The OP is asking about FPGA, not RT.
    RT is fine with the Quotient & Remainder.  It'll take a few clock cycles of your processor, but that is nothing in the rates for an RT system.
    An FPGA is a different beast since you need to look at how much of your FPGA hardware you are using up.  Bit shifting (which is what the power of 2 actually does) is dirt cheap in an FPGA.  But divisions are really expensive to do.  But since you are dealing with powers of 10, you are kind of stuck.  Hardware (FPGA in this case) works best when dealing with binary (ie powers of 2).
    So what device is this one?  How fast do you need these outputs?  It might make sense to pass some of the data up to the RT system and then the RT can pass the results back down to the FPGA for actual output.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Tunneling and problem with unknown host exception

    hello! i've got a problem with https. i use jdk 1.5.0, jboss-4.0.4.ga-patch1, soap.
    and i'm going crasy.. i've testet my client code at our network and it works fine. but if i want to get jobs from the server of our customer, my client throw an "unknown host exception: firm".
    i wonder why it hasn't the full host. the url may look like this: https://firm.sub.com:443/ and while the client connects to the server, i depugged it and the host is correct: firm.sub.
    but after the connection, when the client want to get something from the server (when it wants to communicate with the server over soap) it crashs.
    my client code looks like this:
    private ClientInterfaceEndpoint getClientInterface() throws ServiceException {
    QName serviceQName = new QName(DOCSERVER_NAMESPACE, CLIENT_INTERFACE_SERVICENAME);
    URL wsdlUrl = getClientInterfaceWsdlUrl();
    log.info("*******WSDLURL host: " + wsdlUrl.getHost()); // out: firm.sub
    log.info("*******WSDLURL port: " + wsdlUrl.getPort()); // out: 443
    URL mapping = getClass().getClassLoader().getResource("META-INF/DocumentServer_Mapping.xml");
    log.info("*******MappingURL path: " + mapping.getPath());
    if (wsdlUrl.toString().toLowerCase().contains("https")) {
    if (null == getConfig().getTruststore() || getConfig().getTruststore().equalsIgnoreCase("")) {
    throw new RuntimeException("No or incorrect TruststorePath in the docclient-config");
    File tmp = new File(getConfig().getTruststore());
    if (!tmp.isFile() || !tmp.canRead()) {
    throw new RuntimeException("The truststore at the 'TruststorePath' isn't a file or can't be read.");
    System.setProperty(SYS_PROPERTY_KEY_TRUST, getConfig().getTruststore());
    System.setProperty(SYS_PROPERTY_KEY_TRUST_PW, config.getTruststorePass());
    ServiceFactoryImpl factory = null;
    factory = (ServiceFactoryImpl) ServiceFactory.newInstance();
    Service clientInterfaceService = null;
    try {// create the service for the ClientInterface
    clientInterfaceService = factory.createService(wsdlUrl, serviceQName, mapping, new URL(config.getServerURL())); //, new URL(config.getServerURL())
    log.info("*******ClientInterFaceService WSDL URL Host: " + clientInterfaceService.getWSDLDocumentLocation().getHost()); // out:firm.sub
    log.info("*******ClientInterFaceService WSDL URL Port: " + clientInterfaceService.getWSDLDocumentLocation().getPort()); // out: 443
    } catch (ServiceException e) {
    log.error(e.getMessage());
    throw new RuntimeException(e.getMessage());
    } catch (MalformedURLException e) {
    log.error(e.getMessage());
    throw new RuntimeException(e.getMessage());
    } catch (Exception e) {
    log.error(e.getMessage());
    throw new RuntimeException(e.getMessage());
    }// getting the ClientInterfaceEndpoint
    ClientInterfaceEndpoint clientInterface = (ClientInterfaceEndpoint) clientInterfaceService.getPort(ClientInterfaceEndpoint.class);
    return clientInterface;
    protected URL getClientInterfaceWsdlUrl() {
    URL url = null;
    String urlString = getConfig().getServerURL() + CLIENT_INTERFACE_URI + "?wsdl";
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    Properties properties = System.getProperties();
    String handlers = System.getProperty(SYS_PROPERTY_KEY_PKGS);
    if (handlers == null) {
    properties.put(SYS_PROPERTY_KEY_PKGS, SYS_PROPERTY_VALUE_PKGS);
    else {
    properties.put(SYS_PROPERTY_KEY_PKGS, SYS_PROPERTY_VALUE_PKGS.concat("|").concat(handlers));
    try {
    url = new URL(urlString);
    log.info("*******URL host: " + url.getHost());
    log.info("*******URL port: " + url.getPort());
    log.info("*******URL path: " + url.getPath());
    } catch (MalformedURLException e) {
    log.fatal("DocumentProvider SOAP configured incorrectly. DocServer URL malformed: " + urlString);
    throw new RuntimeException("DocumentProvider SOAP configured incorrectly. DocServer URL malformed: " + urlString, e);
    System.setProperties(properties);
    return url;
    }if it's usefull: the customer use a apache server (not tomcat) where a the server is and the client at another system the jboss.
    The customer told me: if i want to connect the client via http i have to tunnel.. maybe i have to tunnel using https too?
    have i to generate the endpoint classes a second time, extra for https?
    or doesn't soap like host like "firm.sub"?
    can anyone help me please?!
    sorry, my english isn't very well...

    sorry, it's not the same error. The output is: Unable to connect to any host due to exception: java.net.socket.exception: java.net.socket.exception: Unregcognized windows socket error: 10106: create.

  • Replace bzip2 and gzip with pbzip2 and pigz system wide?

    I just now got word of these multithreaded ports and would like to know if theres anyway to replace their single threaded brethren? pigz is already in AUR and it wouldn't take much to put pbzip2 into it either.
    Maybe some global variable should be set?
    Edit: Strike the part about pbzip2. It's already in community
    Last edited by uncholowapo (2010-10-10 23:48:04)

    karol wrote:One thing you may want to check: if you compress a file w/ pbzip2 and send it over to me, will I be able to uncompress it with bzip2?
    I just did some testing by downloading the Linux kernel source, and then using bzip2 and pbzip2 to decompress and recompress it several times.  In another terminal window I monitored the speed of each CPU core by running:
    watch 'cat /proc/cpuinfo | grep MHz'
    What I found out was that yes, the files created by either tool will be able to be decompressed with the other.  However, if you use pbzip2 to decompress a file compressed with the regular bzip2, it will only use one core.  Only when decompressing a file that was compressed with pbzip2 did pbzip2 use both CPU cores.

  • Replacing Palm and Syncing with Mac

    I have been using a Palm handheld (the bottom-of-the-range Z22) for many years, together with the appropriate version of the Palm Desktop application on my Mac. Now my handheld has given up the ghost, and, having begun to look for a replacement, have begun to realize that the world has changed while I haven't been watching. Where have all the Palm handhelds gone?
    I would be really grateful for advice, since any replacement will have to fulfil the following requirements. Firstly, I must be able to back up data from it onto my Mac (and vice versa), just as I have been able to do hitherto. Secondly, I want to be able to transfer all my data from my present Palm Desktop application to the new device and whatever desktop application comes with it. (As far as my contacts are concerned, I have kept them in an AppleWorks database as well as on my Palm and Palm Desktop. I suppose it conceivably might be easier to import them from the AW database than from Palm Desktop. But my diary entries for the next year or two, and my Memo data, will in any case have to come from Palm Desktop.)
    The crucial thing in both these matters is that my computer is a PPC one and my operating system is Tiger (10.4.11), and I am not proposing to upgrade these, since a great deal of my expensive software would also have to be upgraded if I did.
    As far as I can see, only fossilized remains of plain old handhelds (diary, address book, memos) now exist. I do not really want a smartphone, since I have an ordinary mobile 'phone anyway and do not require mobile access to e-mails and internet. But if I have to have a smartphone, so be it, as long as I can synch it with my Mac and can import my data from Palm Desktop into it.
    Thank you very much for suggestions, ideas amd advice.

    Appleworks is no longer supported.  So a Palm software may actually be better when moving to the modern day.  See this user tip with regards to converting your Appleworks files:
    https://discussions.apple.com/docs/DOC-2522
    According to:
    http://roaringapps.com/app:2293
    It appears Palm has abandoned the Mac as well, and Missing Sync is your best bet to keep your old files updated:
    http://www.markspace.com/osx-lion/index.html
    So you might want to consider their software, and compatible devices to integrate yourself when you move up to Intel Macs.  This migration tip explains other things you may need to consider:
    https://discussions.apple.com/docs/DOC-2295
    And if upgrading to Leopard:
    https://discussions.apple.com/docs/DOC-2275
    Or Snow Leopard:
    https://discussions.apple.com/docs/DOC-2455
    Or Lion:
    https://discussions.apple.com/docs/DOC-2465
    Should be in your future.

  • Continuous data send and receive with unknown source

    When I connect my ipad to the lightning cable, no matter if it is connected to PC or it is going to be charged, if the wifi is on, it will start sending and receiving data continuously and with a high speed.
    I want to stop this thing from happening because it nearly consumed all of my internet account
    What is the reason?

    >
    >
    Did you download from
    http://java.sun.com/products/javacomm/
    If so, there is an example in
    commapi\samples\SerialDemo
    but this only sends characters back and forth.
    You will have to create a design to handle the send
    and recieve. What will the data be?
    Will you transmit files? Maybe you need to create
    something like XMODEM.
    Will you transmit media streams? Maybe you should look
    at JTAPI
    http://java.sun.com/products/jtapi/
    (which is only a definition, or a real reference
    implementation like:
    http://gjtapi.sourceforge.net/
    ==================================================================I'm sending information from a client for a credit verification, This information is sent in a variable, and then the modem receives a file with the results.

  • OVI problem replace calender and tasks with those ...

    hi all,
    I have a brand new Nokia C2-01 that I love. But I am struggling with the OVI suite and beg for your help
    Using the latest version of OVI (3.1.1.85), I want to keep the calender on the mobile up to the date with those in my Outlook. As I mainly change my dates in Outlook, I want this calender as the only source for the mobile calender.
    here is the problem: whenever I sync the calender with the C2-01, it does not recognize the changes made in Outlook. it simply mixes the dates both calenders and creates a mess in both (same when I allow to delete dates)
    in the old nokia pc suite - which, unfortunately, does not suppert the C2-01; I already tried - there was this nice feature that first deleted all entries on the mobile phone and then but the content of the Outlook calender in there. OVI, for whatever reason, does not have it anymore
    what can I do to make this work?
    thanks a lot!
    harry

    Yes I've checked the link too. But I still can't sync the notes (and only the notes) from my Nokia E65.
    OVI Suite will happily copy all other content at start up but failes when it starts to copy the notes each time giving the "Reconnect USB...." message with error number 83860005 (if that means anything to anyone).
    After many attempts yesterday I copied the notes to my Outlook, but again I now get the same mesage and it won't update! The only thing that I can think of is that some of my notes are pretty long and that there maybe a limit to the number of characters copied befor the process terminates???

  • Replace last delimeter with "and" in a string in SSRS

    Hi,
    I want to replace last delimeter (comma) with and 
    in a string in SSRS 2008 R2.
    if there are more than one unit, and the Area of the units are different, then the area of each must must be listed separated by commas and ‘and’ before the last one.
    i.e.,
    Input string- Hi,Hello,HRU,
    Desired output- Hi,Hello and 
    HRU..
    how can I achieve this (and
    before last word) ?
    (suggest in SSRS or even in SQL)
    Rgds/-

    Your example seems to indicate you wish to substitute "and" for the second to last delimiter and ".." for the last. Is that the ask? Will there actually be a trailing delimiter on the input string?
    This can be done several ways: In the dataset, in an expression, using custom code.
    The approach for the dataset and expression are similar, just the language is different. Dataset will usually deliver better performance since the source is often a more powerful server (in the case of a SQL dataset).
    In an SSRS expression it might look like this:
    =Left(Fields!InputString.Value,InStrRev(Fields!InputString.Value,",")-1)+" and "+Right(Fields!InputString.Value,Len(Fields!InputString.Value)-InStrRev(Fields!InputString.Value,","))
    This assumes the input string is actually a field from your dataset but it could be anything. The Left piece gets the string that occurs before the last comma without the comma, then append " and ", then the Right expression gets everything after the last
    comma and appends it. If you will have a trailing delimiter, you could substitute the following formula anywhere you see Fields!InputString.Value:
    =Replace(Trim(Replace(Fields!InputString.Value,","," "))," ",",")
    Because Trim in an SSRS expression only trims leading and trailing spaces, the delimiters must be converted to a space. So this only works if there are no spaces in the original string. If the input is "Hi,Hello,How are you," the result of this formula will
    be "Hi,Hello,How,are,you" because the spaces between How, are and you will get replaced by ",". To handle embedded spaces makes the expression more complex. Assuming the input string is "Hi,Hello,How are you,":
    =Replace(Replace(Trim(Replace(Replace(Fields!InputString.Value," ","|"),","," "))," ",","),"|"," ")
    This expression uses 2 more replace statements. The innermost statement substitues "|" for the embedded spaces so they don't get replace with ",". You should use a character that you are sure will not appear in the string otherwise. Or use a sequence of
    characters like "|^|" that you are sure won't appear if any one character may possibly appear. The outermost Replace restores the "|" characters back to spaces.
    A code solution may be easier. Just wrap the below in a simple function:
    return str.Trim(",".ToCharArray()).Substring(0, str.Trim(",".ToCharArray()).LastIndexOf(",") - 1) + " and " + str.Trim(",".ToCharArray()).Substring(str.Trim(",".ToCharArray()).LastIndexOf(",") + 1);
    This is the VB.Net equivalent of the expressions above.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • More Fun with NULLs and Empty Strings

    Greetings,
    I ran across this behavior recently and thought I'd share with the forum. I'm running 10.2.0.2. Note the difference in behavior between passing and explicit NULL in the parameter vice passing an empty string (''):
    CREATE OR REPLACE PROCEDURE NULL_ES_TEST(PARAM1 IN VARCHAR2) IS
    VAR1 CHAR(1);
    BEGIN
    IF PARAM1 IS NULL THEN
    DBMS_OUTPUT.PUT_LINE('PARAM1 IS NULL');
    END IF;
    VAR1 := PARAM1;
    IF VAR1 IS NULL THEN
    DBMS_OUTPUT.PUT_LINE('VAR1 IS NULL');
    ELSE
    DBMS_OUTPUT.PUT_LINE('VAR1 IS NOT NULL');
    END IF;
    DBMS_OUTPUT.PUT_LINE('THE LENGTH OF VAR1 IS '||TO_CHAR(LENGTH(VAR1)));
    END NULL_ES_TEST;
    EXEC NULL_ES_TEST(PARAM1 => '');
    PARAM1 IS NULL
    VAR1 IS NOT NULL
    THE LENGTH OF VAR1 IS 1
    (var1 now holds a single space)
    EXEC NULL_ES_TEST(PARAM1 => NULL);
    PARAM1 IS NULL
    VAR1 IS NULL
    THE LENGTH OF VAR1 IS
    Any Comments or Insights are welcome.
    Sincerely,
    Dale Ward

    Well somethings not as expected (tested on 10.2.0.3)
    Even if you default the parameter to '', it treats null and '' differently.
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE OR REPLACE PROCEDURE NULL_ES_TEST(PARAM1 IN VARCHAR2 := '') IS
      2    VAR1 CHAR(1);
      3  BEGIN
      4    IF PARAM1 IS NULL THEN
      5      DBMS_OUTPUT.PUT_LINE('PARAM1 IS NULL');
      6    END IF;
      7    VAR1 := PARAM1;
      8    IF VAR1 IS NULL THEN
      9      DBMS_OUTPUT.PUT_LINE('VAR1 IS NULL');
    10    ELSE
    11      DBMS_OUTPUT.PUT_LINE('VAR1 IS NOT NULL');
    12    END IF;
    13    DBMS_OUTPUT.PUT_LINE('THE LENGTH OF VAR1 IS '||TO_CHAR(LENGTH(VAR1)));
    14* END NULL_ES_TEST;
    SQL> /
    Procedure created.
    SQL> exec null_es_test(null);
    PARAM1 IS NULL
    VAR1 IS NULL
    THE LENGTH OF VAR1 IS
    PL/SQL procedure successfully completed.
    SQL> exec null_es_test('');
    PARAM1 IS NULL
    VAR1 IS NOT NULL
    THE LENGTH OF VAR1 IS 1
    PL/SQL procedure successfully completed.
    SQL>

  • Problem replacing Null nodes with real values in XML documents...

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    Our friends in Java land are insisting on passing data between Java and PL/SQL using fairly small XML documents (don't ask). I then need to extract the input parameter values and pass them, on to the stored procedures that actually do the work. These return a result which needs to be returned to the java layer in the output XML document.
    Here is a cut down version of the input XML...
    <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Parameter>
    <Id>1</Id>
    <Result xsi:nil="true"/>
    </Parameter>
    <Parameter>
    <Id>2</Id>
    <Result xsi:nil="true"/>
    </Parameter>
    </ParameterList>
    and this is an example of what I am expected to return...
    <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Parameter>
    <Id>1</Id>
    *<Result>SUCCESS</Result>*
    </Parameter>
    <Parameter>
    <Id>2</Id>
    *<Result>WARNING</Result>*
    </Parameter>
    </ParameterList>
    i.e. I am expected to replace the value of the Result node with a string indicating the succes or otherwise of the underlying PL/SQL process.
    I am extracting the input values using the DBMS_XMLDOM functions and naively assumed that DBMS_XMLDOM.SETNODEVALUE could be used to update the value in the Result node - It didn't work so I resorted to reading the documentation which revealed that it will not work for a null node.
    Am I going to have to use XSLT to generate the output XML from the Input and incorprate the result? Or is there a simpler way?
    I have used XSLT in Oracle before and still have the nervous tick...

    Thanks A Non,
    With your suggestion and a bit of help from the w3schools.com xml dom tutorial I eventually managed to work out how to do this.
    Here is the code (with all my debug stuff in so it looks worse than it is...)
    create or replace
    PROCEDURE ExtractXMLValues (p_inXml IN CLOB ) IS
    l_string VARCHAR2(4000);
    l_value VARCHAR2(4000);
    l_DOM_doc dbms_xmldom.DOMDocument;
    l_DOM_node dbms_xmldom.DOMNode;
    l_new_DOM_node dbms_xmldom.DOMNode;
    l_new_element dbms_xmldom.DOMElement;
    l_new_DOM_nodevalue dbms_xmldom.DOMNode;
    l_value_Node dbms_xmldom.DOMNode;
    l_parameter_Node dbms_xmldom.DOMNode;
    --l_DOM_nodelist    dbms_xmldom.DOMNodeList;
    l_Result_DOM_node dbms_xmldom.DOMNode;
    BEGIN
    l_DOM_doc := dbms_xmldom.newDomDocument(p_inXml);
    l_DOM_node := dbms_xmldom.makeNode(l_DOM_doc);
    dbms_xmldom.writeToBuffer(l_DOM_node, l_string);
    dbms_output.put_line('1 ' || l_string);
    l_parameter_node := dbms_xslprocessor.selectSingleNode(l_DOM_node,'//Parameter');
    -- get the current values in the XML document for Id and Result
    l_Result_DOM_node := dbms_xslprocessor.selectSingleNode(l_DOM_node,'//Id');
    l_value_Node := dbms_xmldom.getFirstChild(l_Result_DOM_node);
    l_value := dbms_xmldom.getnodevalue(l_value_Node);
    dbms_xmldom.writeToBuffer(l_Result_DOM_node, l_string);
    dbms_output.put_line('2 ' || l_string || ' : ' || l_value);
    l_Result_DOM_node := dbms_xslprocessor.selectSingleNode(l_DOM_node,'//Result');
    l_value_Node := dbms_xmldom.getFirstChild(l_Result_DOM_node);
    l_value := dbms_xmldom.getnodevalue(l_value_Node);
    dbms_xmldom.writeToBuffer(l_Result_DOM_node, l_string);
    dbms_output.put_line('3 ' || l_string || ' : ' || l_value);
    -- create new Result node
    l_new_DOM_node      := dbms_xmldom.makenode(dbms_xmldom.createElement(l_DOM_doc, 'Result'));
    dbms_xmldom.writeToBuffer(l_new_DOM_node, l_string);
    dbms_output.put_line('4 New node : ' || l_string);
    -- create a value for it
    l_new_DOM_nodevalue := dbms_xmldom.makenode(dbms_xmldom.createtextnode(l_DOM_doc, 'SUCCESS'));
    dbms_xmldom.writeToBuffer(l_new_DOM_nodevalue, l_string);
    dbms_output.put_line('5 New node value : ' || l_string);
    -- add the value to the new Result node
    l_new_DOM_nodevalue := dbms_xmldom.appendchild(l_new_DOM_node,  l_new_DOM_nodevalue);
    dbms_xmldom.writeToBuffer(l_new_DOM_node, l_string);
    dbms_output.put_line('6 New node : ' || l_string);
    -- replace the old node with the new one
    l_Result_DOM_node := dbms_xmldom.replaceChild(l_parameter_node, l_new_DOM_node, l_Result_DOM_node);
    dbms_xmldom.writeToBuffer(l_parameter_node, l_string);
    dbms_output.put_line('6 parameter node : ' || l_string);
    dbms_xmldom.writeToBuffer(l_DOM_node, l_string);
    dbms_output.put_line('7 Updated document ' || l_string);
    dbms_xmldom.freeDocument(l_DOM_doc);
    END ExtractXMLValues;
    and the output...
    1 <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Parameter>
    <Id>1</Id>
    <Result xsi:nil="true"/>
    </Parameter>
    </ParameterList>
    2 <Id>1</Id> : 1
    3 <Result xsi:nil="true"/> :
    4 New node : <Result/>
    5 New node value : SUCCESS
    6 New node : <Result>SUCCESS</Result>
    6 parameter node : <Parameter>
    <Id>1</Id>
    <Result>SUCCESS</Result>
    </Parameter>
    7 Updated document <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Parameter>
    <Id>1</Id>
    *<Result>SUCCESS</Result>*
    </Parameter>
    </ParameterList>
    One question, why do the dbms_xmldom functions return the Old value? I was expecting the returned value to be the updated node.
    Edited by: Lone voice on May 14, 2009 11:24 AM

  • Replace Null With 0 in Pivot Table in a BI Publisher Report (Not OBIEE Answ

    I have a problem with nulls in a pivot table. I got a measure column in my BI Answers analysis and I made a report with a model based in this analysis. When I add a pivot table to my report the 0 measures don't display.
    In first place I found that there's a bug (13054445). I download and ran the patch, then I tried editing data format in my analysis column and in BI Answers and this worked. The 0 displays correctly, but in the report it's still not displaying.
    I tried editing the formula in the analysis with:
    IFNULL(column,0)
    CASE WHEN column IS NULL THEN 0 ELSE column END
    CASE WHEN column IS NOT NULL THEN column ELSE 0 END
    IFNULL(cast("column"as varchar (10)), '0')
    And nothing works
    When I tried this: CASE WHEN column IS NULL THEN 0 ELSE 656565656 END
    in the report the 6565656565 display correctly but the 0 still doesn't display.
    Does anybody know if that is a bug? Or does another option exist that can I try?

    Hi,
    Following on with this post, I followed the document posted and the formula worked fine. I was able to replace nulls with strikethrough in a pivot table. Since combining the report into a compound layout, the strikethrough has reverted back to nulls. Even when just viewing the pivot table, the same applies.
    I have double checked the column properties and the condition(is null) and formatting(strikethrough) still exists but does not take effect in the pivot table.
    I hav also checked that no data exists in the fact table under the null categories and they are true.
    Can anyone help with this problem, I have also removed the condition and re-applied but still face the same problem.
    Thanks

  • Union two tables with diffrent count of fields with null and float value

    Hello,
    i want to union two tables, first one with 3 fields and second one with 4 fields (diffrent count of fields).
    I can add null value at end of first select but it does not work with float values in second table. Value form second table is convert to integer.
    For example:
    select null v1 from sessions
    union
    select 0.05 v1 from sessions
    result is set of null and 0 value.
    As workaround i can type:
    select null+0.0 v1 from sessions
    union
    select 0.05 v1 from sessions
    or simple change select's order.
    Is any better/proper way to do this? Can I somehow set float field type in first select?
    Best regards,
    Lukasz.
    WIN XP, MAXDB 7.6.03

    Hi Lukasz,
    in a UNION statement the first statement defines the structure (number, names and types of fields) of the resultset.
    Therefore you have to define a FLOAT field in the first SELECT statement in order to avoid conversion to VARCHAR.
    Be aware that NULL and 0.0 are not the same thus NULL+0.0 does not equal NULL.
    In fact NULL cannot equal to any number or character value at all.
    BTW: you may want to use UNION ALL to avoid the search and removal of duplicates - looks like your datasets won't contain duplicates anyhow...
    Regards,
    Lars

  • Creating table with null and not null values.

    I have to create a table with 5 Null nd 5 Not Null fields.My questionis which fields are place first?Not or Not Null and why???

    What you mean is: the person who asked you the question thought the order of columns was important, and wanted to see if you agreed. Or maybe they were just asking the question to see whether you thought it was important (as a test of your understanding of the database).
    When I started out in Oracle I was told that it was good practice to have the mandatory columns first and then the optional columns. But if you do some research you find this: the impact of column ordering on space management is: empty nullable columns at the end of the table take up zero bytes whereas empty nullable columns at the middle of the table take up one byte each. I think if that saving really is important to you you need to spring for an additional hard drive.
    Besides, even if you do organise your columns as you suggest, what happens when you add an eleventh NOT NULL column to your table? It gets tacked on to the end of your table. Your whole neat organisation is blown.
    What does still matter is the positioning of large VARCHAR2 columns: they should be the last columns on your table in case they create chaining. Then any query that doesn't need the large columns can be satisfied without reading the chained block, something that can't be guaranteed if you've got columns after a VARCHAR2(4000) column. This doesn't apply to CLOBs, etc. which are stored separately anyway.
    Cheers, APC

  • ON-ERROR trigger fires with Error_Type null and Error_Code 0

    We've recently seen our 6i Forms application throwing some odd errors, not least of which is when an alert popped up with just "-0:" displayed.
    This seems to come from the ON-ERROR trigger.
    DECLARE
       lv_errcod  NUMBER       := ERROR_CODE;
       lv_errtyp  VARCHAR2(3)  := ERROR_TYPE;
       lv_errtxt  VARCHAR2(80) := ERROR_TEXT;
       lv_dbmserr NUMBER       := DBMS_ERROR_CODE;
       lv_albut   NUMBER;
    BEGIN
      IF (lv_errcod = 40508) THEN
          -- Failure on insert
        IF lv_dbmserr = -1031 THEN
               -- Insufficient Privileges
          Display_Alert( 'You do not have permission to create new records here.');
          Raise Form_Trigger_Failure;
        ELSE
          Display_Alert( 'Unable to create record.');
          Raise Form_Trigger_Failure;
        END IF;     
      ELSIF (lv_errcod = 40510) THEN
          -- Failure on delete
        IF lv_dbmserr = -1031 THEN
               -- Insufficient Privileges
          Display_Alert( 'You do not have permission to delete records here.');
          Raise Form_Trigger_Failure;
        ELSIF lv_dbmserr = -2292 THEN
               -- Integrity Constraint violated
          Display_Alert( 'Cannot delete this record - Data exists on other tables that uses this value.');
          Raise Form_Trigger_Failure;
        ELSE
          Display_Alert( 'Unable to delete record.');
          Raise Form_Trigger_Failure;
        END IF;     
       ELSIF (lv_errcod = 40200) THEN   
          message('This field is protected against update');
      ELSE
        Display_Alert(lv_errtyp||'-'||to_char(lv_errcod)||': '||lv_errtxt);
        RAISE Form_Trigger_Failure;
      END IF;
    END;At least there's nowhere else that could be doing it. It seems that error_type and error_text are null and error_code is 0
    It's as if the ON-ERROR trigger has fired but there isn't an error. Anyone ever experienced this? It's been ported to a VM environment but ran perfectly fine for 6 months and has only started doing this in the last few days.
    It's also occasionally saying that queries return no results when the users KNOW there are records, and if they log out completely and log back in the records are returned, which is doing nothing for their confidence in the application.
    It's entirely possible that one of the teams responsible for various parts of the VM environment or network, or even the DBAs, has done something that caused it but we're unlikely to get them to admit it without knowing what it could be. I would expect a dropped connection or network issue to give an appropriate error, not freak out.
    Edited by: Dave Hemming on Jul 22, 2010 9:48 AM
    Edited by: Dave Hemming on Jul 22, 2010 9:49 AM

    Bit of a breakthrough - we had it again and it appears to then be followed - depending on which form they're in - by an ORA-02396 and an error that built-in DBMS_ERROR_CODE has failed. We are now suspecting that it's down to the Idle Time for the profile - the users session has been dropped but the form hasn't realised it's not connected. It looks like the users idle time has been amended from UNLIMITED to 90 in the last few days.
    Nobody thought it important to tell us, mind...
    Edited by: Dave Hemming on Jul 22, 2010 1:15 PM

  • I just replaced my mac pro with an iMac and i can't get it to work with my epson stylus 3800 printer?

    i just replaced my mac pro with an iMac and i can't get it to work with my epson stylus 3800 printer? i have downloaded the 3800 software three times and the imac keeps telling me there is no software to run the printer? Any help here?

    Care to share which OS you are using?

Maybe you are looking for