Case when the field IS NULL then... end

Hello world

(a) If a field is null, display a message.

(b) the field shows beak null. application for admin to make outer joins between the tables.

(c) I have 9 rows, 3 have NULL values,
So, I want to show a literal message on 3 rows.

problem is that the message shows on all the 9 lines.


now:
====
I could have adopted an approach very unorthodox at this request, please bear with me.
I work for a college and am interested in students who did not encourage the "" in the last six months
for this semester, beak. they repeat the year.

200830 M1 generally promote to 200920 M2 (m1 attribute replaced by m2)

M1 - 1 year 200830 = winter
M2 - 2nd year 200920 = fall (200910 is special and not interested by this semester for this request)


I want to run a query to search for the students who did not encourage.

hand the sql would be:

SELECT st1.id
st1.name
sa1.academic_period
sa1.student_attribute
sa2.academic_period
sa2.student_attribute
Student st1
INNER JOIN student_attribute sa1
ON st1.person_uid = sa1.person_uid
AND sa1.academic_period = '200830'
AND sa1.student_attribute = 'M1 '.
LEFT JOIN student_attribute sa2
ON st1.person_uid = sa2.person_uid
AND sa2.academic_period = '200920'
AND sa2.student_attribute = 'M2 '.
where st1.academic_period = '200830'
and sa2.student_attribute is null
ORDER BY st1.name;


===========

taking the hardcoded values and putting a LEFT JOIN simplified in a display/custom folder
and then by creating the conditions in discoverer, essentially behaved as an EQUI-join and do not show the
null lines

=============

I compare a "slice" of data "another" data 200920/m2 200830/m1

so I begged the admin as an experiment to "clone" the desired table as 2 views and external to join them
Discover the left join to student attribute #1 to
attribute of student views #2


and using the technique to deceive the discoverer of a LEFT JOIN in: student_attribute is null or student_attribute is null

I got what I wanted - pupils with NULL values in attribut2, beak. they did not encourage

==============

so now I wanted to create a new discoverer in copying the above query query and adding new 'logic ':

In this new queyr am interested if the student extensible query determined #1
have been coded by the staff in order to take into account that they repeat:
M1 200830 as:
M1 200920 (their bump up current semester with the same code attribute)

so I thought... hmmmmm... I also have the ordinary table: attribute of the student
now watch a 3rd data slice: 200920 m1


Discover the left join to student attribute #1 to
attribute of student views #2

left to join University
attribute of student views #1

I access the beak ordinary table this pre-established join :

University to join
student table attribute

====================
so my 2nd query uses:
-Discover the condition attribute #1 student: 200830/m1
-Discover the condition attribute #2 students: 200920/m2
-University studies
-condition of table student attribute: 200920 / * m1 *.


and to maintain the table: attribute of student for M1 200920
to see if records created the current semester for Extensible students staff


This query has worked, got the 9 lines, of which 3 had to be coded to 200920/m1
For lines 3 nulls, want to create a calc that would show this literal:

"needs 200920 m1 folder.

the problem is the literal is printing even on rows that have a value in the fields from the table, it's the calc:


BOX WHEN (period DMC_Student_Att2.Academic IS NULL) THEN

"NEEDS" | "'-> ' |: Parm_AcademicPeriod_Current |" " ' || : Parm_StudentAttribute_Prev

END


Any advice that might work with this unorthodox approach would be greatly appreciated,
Advice to the other approaches would be also appreciated, tx, sandra

Hi, Sandra
When you work with outer joins, with that I conclude with a double whammy an OR statement allows me to make some incredible manipulations.

For example, if you have a folder that the master joined the detail folder B with an outer join on B you get records from one if they exist in B or no - no?

It doesn't have to be the case, you're just limit your way of thinking. It must get off the beaten and tell ourselves, if I could force discoverer to create a subquery with the NULL filter outside, I could find these B that don't have any corresponding entry in B, or I could find who had only the entries in the two.

Let's say there's a STUDENTID b, using a normal like condition: B.STUDENTID IS NULL will not work because of the outer join. But if you create a Boolean condition, like this:

B.STUDENTID IS NULL or B.STUDENTID IS NULL you will see amazing results.

This tip can help.

In which your question, taking the knowledge above, I was wondering what would happen if you did:

BOX WHEN (period DMC_Student_Att2.Academic IS NULL) OR (period DMC_Student_Att2.Academic IS NULL) THEN

"NEEDS" | "'--> ' |: Parm_AcademicPeriod_Current |" " ' || : Parm_StudentAttribute_Prev

I am not sure it will work. If it isn't then you need create 2 worksheets, one containing the students who made the promotion and the other for those who do not. You need the conditions to make this work, one like this:

* (Period of DMC_Student_Att2.Academic IS NOT NULL) OR (DMC_Student_Att2.Academic period IS NOT NULL) *.

and other like this: * (DMC_Student_Att2.Academic period IS NULL) OR (DMC_Student_Att2.Academic period IS NULL) *.

Best wishes
Michael

Tags: Business Intelligence

Similar Questions

  • I have a 6 and when I said an iMessage that he will tell me when the person read it then it will say delivered once again so I don't know when it was read

    I have a 6 more and when I send an iMessage he tells me when the person read it then it will say delivered once again so I don't know when it was read

    I have exactly the same problem since I updated to 9.3, the 9.3.1 update didn't fix either. Apple support think it could be a software problem or operations and I have tried literally everything! Have you found a solution for this yet?

  • PDF forms have problems displaying text and only appears when the field is selected

    Hello

    I created pdf forms to be distributed to the clients of the company. But we have some people complain about the visibility of the text. When they work as a team, the pdf they receive from a third party often appears limes or no text, the text is only visible when the field is selected. I need to find a solution for this, because our company's products are based on this form.

    If there is any information addition that I must add to understand what is happening and how to fix it, I'll be happy to write it.

    In society, we all have mac and forms where innitially created in Adobe acrobat 9 pro, but we now have Adobe acropabt pro XI.

    Users of Mac and Windows systems.

    Thank you

    This is usually caused by the form is filled out and saved by a Mac user who uses the preview application to view the PDF file. More information is here: http://kb2.adobe.com/community/publishing/885/cpsid_88564.html

    It's a good idea to inform your users that Adobe Reader (or Acrobat) should be used to work with Forms.

  • Getting the value null inserted in the back end when the field is turned off

    Hi gurus,

    I have a TOTAL field that is the sum of the other two fields in a form. I have disabled because do not have the user enter the value. The TOTAL field is the poster of the sum of the values in the front end, but in the back-end, the value is null. Please help me solve this problem. Thanks in advance.

    Have you tried to make the point read-only? Set the read-only item and try. You can do the unalterable element by two methods,

    (1) amend section-> go to read only tab-> read-only Condition Type: always

    (2) create a dynamic Action-> event: loading the Page-> Action: run the JavaScript Code-> Code:

    $('#P1_TEST').attr ('readOnly', true);

    $('#P1_TEST').css ('background-color', '#CDCDCD');

    Tom wrote:

    set the item read-only instead (not editable by the user but will present)

    Set the element value using the da no need to activate the item before submitting because the element is not disabled. Make the point read-only so that it will submit the value to the session and point cannot be changed always.

    Thank you

    Lacombe

  • Insert a NULL value when the field is empty

    Oracle 11 g 2

    Hi all

    This is probably a very simple question.

    Here's what's happening.

    I have a table:
    SQL> select * from mytable;
    
        MYCODE MYNAME          MYSAL
    ---------- ---------- ----------
          3456 Chris            8000
          9878 Bill
          6574 John             6500
    And I am running the following query:
    SQL> select 'insert into emp (empno, ename, sal) values (' ||mycode||', '||''''||myname||''''||', '||mysal||');'
    from mytable;
    gives me the following output:
    insert into emp (empno, ename, sal) values (3456, 'Chris', 8000);
    insert into emp (empno, ename, sal) values (9878, 'Bill', );
    insert into emp (empno, ename, sal) values (6574, 'John', 6500);
    If you notice, the second row has a sal as empty field. I want that he be null for what I can run this query to INSERT specific without having to manually enter the word "NULL" inside

    I think I need some kind of clause if-then here.

    If sal is NULL
    then the value NULL?

    Hello

    JrOraDBA wrote:
    ...
    If you notice, the second row has a sal as empty field. I want that he be null for what I can run this query to INSERT specific without having to manually enter the word "NULL" inside

    I think I need some kind of clause if-then here.

    Exactly!

    This condition IF-THEN-ELSE happening so often that they have designed a function for this.
    Instead of my_sal, use this expression:

    NVL ( TO_CHAR (mysal)
        , 'NULL'
        )
    

    It is:

    select 'insert into emp (empno, ename, sal) values ('      || mycode
                                                          ||    ', ''' || myname || ''''
                                 ||       ', '      || NVL ( TO_CHAR (mysal)
                                                         , 'NULL'
                                            )
                                 ||   ');'
    from   mytable
    
  • Management when the percentage getting null values

    Hi all

    I'm writing a query that gives me the account, the total number of transactions, the total number of transactions that are being matched (from the same table) and finally a percentage.

    After the documentation and brushing my knowledge of sql, this is the query.

    Select A.ACCOUNT_ID,A.TOTAL_TXN,B.TOTAL_MATCHED,(B.TOTAL_MATCHED/A.TOTAL_TXN) * 100 AS PERCENTAGE

    FROM (select account_id, count (*) bdr_transaction TOTAL_TXN

    where

    value_date = January 9, 15 '

    Account_id group) has

    LEFT JOIN

    (select account_id, count (*) bdr_transaction TOTAL_MATCHED where)

    value_date = January 9, 15 ' and

    type in (1,2)

    Account_id group) B

    ON A.ACCOUNT_ID = B.ACCOUNT_ID;

    This query gives me almost the expected output (if it takes too much time), but when the result of the B.TOTAL_MATCHED column is null the percentage is also set to null.

    Is there a way or a workaround to handle this?

    There might be another way more quick/clean, to do so.

    Thank you

    TK

    Select ACCOUNT_ID, TOTAL_TXN, TOTAL_MATCHED, (TOTAL_MATCHED / TOTAL_TXN) * 100 AS PERCENTAGE

    de)

    Select ACCOUNT_ID, count (case when type (1, 2) then 1 end) TOTAL_MATCHED, count (*) TOTAL_TXN

    of BDR_TRANSACTION

    where VALUE_DATE = January 9, 15 '

    ACCOUNT_ID group

    )

  • Show LOV only when the field is empty

    Hi all
    My surroundings:
    Oracle 10g on Windows
    Forms [32 bit] Version 9.0.4.1.0 (Production)
    Oracle Database 10 g Enterprise Edition Release 10.2.0.5.0 - 64 bit Production
    With partitioning, OLAP, Data Mining and Real Application Testing options
    Oracle Toolkit Version 9.0.4.1.0 (Production)
    PL/SQL Version 9.0.1.5.1 (Production)

    My problem:
    I have a field in a block, which is text_item and is linked to an element of LOV. I want the LOV appears automatically, whenever I tab in there, only when the element is EMPTY (for example when I try to insert in the block). When, upon request, it should show only the value in the field, and user can choose to activate the LOV, by pressing F9, if she wants to. It now displays automatically each time text agenda is a debate (works very well when the user is inserted, but annoying when she questioned the shape and trying to tab thru.) Every time she focuses on the field, LOV is popping up!)

    The current setting for the property on the element of text field: Type: text element
    The list of values: MY_LOV_NAME
    Validation of list: Yes

    Properties on MY_LOV_NAME
    Auto display: Yes

    Any suggestions? Or trigger level I can use, and if so, what build_in can use?
    New forms and will greatly appreciate advice from pros!

    Thank you
    Libran_girl

    It's very simple,

    IN once - new - item - Instance

    DECLARE
    V_LOV BOOLEAN;
    BEGIN
    IF: NOM_ELEMENT IS NULL
    THEN
    V_LOV = SHOW_LOV (LOV_NAME);
    END IF;
    END;

    Try it, you will get your result, if it doesn't work, try: block_name.item_name

    Abbas

  • Box appears not to if the field is null

    I'm running Reports Developer 10.1.2.3 locally. Then I forms and reports Services on the application server 10.1.2.3. When I run the report locally by the developer reports if data of a field is the text box appears in any case, but when I save the report on the application server and re - compile there and then run only the fields that have data appear with the box around them.

    I saw another post and the fix was to make sure that all the fields had 'fixed' horizontal elasticity. I have both vertical and horizontal elasticity fixed value.

    Any help is appreciated!
    Cathy

    Published by: cmcantie on February 12, 2010 12:18

    Hello

    This is a known bug: lines of the grid in NULL values are not displayed in the output PDF after 10.1.2.3 valuation (Doc ID 601432.1)

    A unique group of patches exists and is available on "My Oracle Support" (6848416).

    Concerning

  • Move the cursor when the field is full?

    If I have a comb of 3 characters for the area code, how can I get the cursor automatically advances to the next field after the user types the third number? (LC ES2 9.0) Thank you!        ~ Carol

    On the change event of the area code field, you can use the JavaScript like this:

    var tempStr = xfa.event.newText
    If (tempStr.length == 3) {}
    xfa.host.setFocus ("TextField2")
    }

    The variable wil tempStr contain the entry selected by the user. Assuming that are code is 3 characters, and then when they get into 3 tanks the the update will change the field named in the setFocus command (in my case TextField2).

    Paul

  • Detect when the field gets the visibility on the screen

    Hi gurus

    I extended a BitmapField that when it is displayed on the screen is running a Thread internally in order to upload an image from a web server and then display it on the BitmapField. During the download of the Thread, it shows a dummy Bitmap.

    I am now the list 15 images on a screen in a VerticalFieldManager, and as soon as the application starts, 15 thread starts to download each image.

    When I run the application on the Simulator, with WiFi, all the images always get downloaded without problem all the time but when I run it on the device, sometimes the images are downloaded and sometimes some of them are not downloaded due to a "General socket error" (it is said the message of the Exception).

    This behavior is kind of random, I wonder that it is a restriction on the number of requests that a device can perform the carrier (by BIS) at the same time or something like that. Sometimes 15 images are always downloaded without problem.

    Now, the important thing, to circumvent the problem, what I'm trying to do is:

    Even if I add 15 images on the screen, only 3 images are visible at the same time (on the Curve 8520 in which I am testing now) so I'll try to find a way that only these 3 images run the download thread and when the user makes a scrolling to the bottom of the screen, the fields earning "visibility" on the screen start to run in their own thread too but didn't find a way to detect if a field of on the screen, and not only in the manager gains visibility of

    I try with:

    protected void onVisibilityChange(boolean visible)
    

    But as soon as the Manager is loaded on the screen, all fields run this even if events are now actually visible on the screen (they are in the lower part of the Manager)

    Is it possible to know when a field get visible only on the actual device screen and not on the virtual screen?

    Thank you!

    This might not work on all devices, but the first invocation of painting of the field is a good indicator.

    In my experience, the interface user of BlackBerry is very economical - everything that is not on the screen isn't painted. well, something that used to be on the screen and got a scroll being on could still be there in an internal buffer, so his painting could not called at all when it scrolls- but the first seems to be a pretty reliable indication.

  • Format custom text field only when the field is filled

    I have created a form that I need to have the format of a text field "model:"& value of text field, then when it is empty so it is just empty.»

    I put event.value = "template:" + event.value; "." in the format custom properties of the text field it set to format correctly, but if it had not entered in this field he said always model: so what should I do for it to be only occur when there is something entered in the field.

    Change to:

    If (event.value) event.value = "template:"+ event.value; ".

  • Calculated hidden field when the field is empty

    It is actually similar to a discussion a few months ago. Our forms are designed to be completed online, printed and sent by electronic mail, by fax or snail - mail. Many times the customer will simply print the form and complete it by hand. When I create forms with calculations, the ' $' or '0.00' appear; This makes it difficult for a person filling out the form by hand to work around these symbols/numbers. A few months ago I had a similar situation involving the percentages and the gurus on this forum (thanks, gurus!) has helped me with the following code and it worked perfectly to hide the fields calculated, unless something has been entered in the fields to calculate.

    A field with a format of 'None' user custom validation script:

    if(Event.Value == 0) {}
    Event.Value = ""; Set null field;
    AFNumber_Format (0, 0, 0, "", "", true); Set number format 0 decimals, not currency.
    } else {}
    Event.Value = event.value; keep the value;
    AFPercent_Format (2, 0, 0); Set the percentage, 2 decimal format.
    }

    This time, the problem involves single numbers (not percent, no change). I used the same logic and fields actually hide/as I want, but the numbers should be formatted with a comma between thousands and decimal with two digits after. I can't understand this! Can someone please offer some advice? Thanks in advance for your help.

    Make sure you use the correct quotation marks. Use quotation marks or single quotation marks, and not 4 single quotes.

    if(Event.Value == 0) {}

    Event.value = "; Set the field null (2 single quotes).

    Supress Zero

  • Hide the subform if the field is null

    I have this script on a text field change event:

    If ((this.rawValue! = "null") |) (this.rawValue! = ""))
    {
    checkBoxThree.presence = "visible";
    }

    on the other
    {
    checkboxThree.presence = 'hidden ';
    }

    It displays correctly the checkBoxThree subform when the data entered in the text field.

    However, if the user goes back and removes the text, I want the subform to become hidden and is not. How can I change the script to achieve this?

    Thank you

    MDawn

    Hello

    try this script:

    checkBoxThree.presence = xfa.event.fullText.length == 0 ? "visible" : "hidden";
    
  • Delete a production space of report oracle regarding if the value of the field is null

    Hello
    I am facing problem formatting in oracle report. I actually develop report payslip to HR Dept., in which win various and deduction heads are displayed.
    now, if any head is null for an employee in particular should not be visible to the employee only and field label is also must be hiding with space to be
    deleted dynamically.
    How can I do this...
    I am using conditional formatting, but its only hide the field does not remove white space
    Please give me some input

    Thks and greetings
    Shailesh

    Just give the all fields are vertical elasticity is 'VARIABLE' and write the format trigger or apply the conditional formating.then it will work
    If one of the field if you give the property to vertical elasticity is fixed then it won't work.
    response

  • Cell borders disappear when the value is null

    I'm now a PL/SQL report. When the value of a column is null, the cell borders disappear. I would have preferred that they do not disappear.

    Any suggestions?

Maybe you are looking for

  • My volume sliders have disappeared. How to make a comeback?

    I'm new kind of logic, although I did a lot with Garageband. In one of the tracks that I'm getting, the volume slider control is not visible. I don't know why and I can not understand how to fix it. Help! Thank you

  • A 2nd generation of death motorcycle g after upgrade to android 6

    my phone finished 1 month warranty back I got the new update of motorola... Start the upgrade then finish asking to reboot I rebooted my phone and I got error and I restarted my phone with a blank black screen...! I guarantee that they said that you

  • Problem printing - print spooler does not

    original title: printing problem My Printer Spooler isn't working and send a message 1075 error dependent clients are not available.

  • Module security content to ASA - SSM - CSC

    Hello Is it possible with this module to filter some users filtered (as restricting facebook.com) and other unfiltered? I mean if the user based on filtering is possible? THX

  • OS reinstall on all full of SDS

    Hey guys,. I bought in July 2012 the new L521X, today I decided that I wanted to install Windows 8 so I read the Guide for reinstalling Windows [03/03/2013]. But now, I have a few questions. I formatted the parts that were possible to format because