Find values for all variables

Hello

The Sub data, I want to find records where status = 1 and the values for all the questionnarie ($quest1 to Quest5) is other than 1, i.e. the value must be null, 0 or a negative integer

Thanks in advance

with t as

(

Select 101 as the nest, 1 as the status, "Cookie" as a term, 1 as $quest1, Quest2 0, 0 Quest3, 0 Quest4, 0 as Quest5 from dual union

Select 102, 1, "Chips", 0, 0, 0, 0, 0 double Union

Select 102, 1, "Chips", 0, 0, 0, 0, 1 double Union

Select 102, 1, 'milk', 0, 0, 0, 0, null Union double

Select 103, 0, 'mixture', 0, 0, 0, 0, 0 double Union

Select 103, 1, 'sugar', 0, 0, 1, 1, 1 Union double

Select 104, 1, 'sugar', null, null, 0, 0, 0 double Union

Select 105, 1, 'the', 1, 1, 0, 0, -1 Union double

Select 106, 0, 'milk', 1, 1, 0, 0, -1 double Union

Select 106, 1, 'milk', -1, -1, 0, 0, -1 Union double

Select 106, 1, 'milk', 0, 0, 0, 0, 0 of the double

)

Select * from t

When status = 1

Output

NESTSTATUSTERM$QUEST1QUEST2QUEST3QUEST4QUEST5
1021Chips00000
1021Milk0000
1041sugar000
1061Milk-1-100-1
1061Milk00000

Select *.

t

When status = 1

and nvl ($quest1, 0)<= 0="">

and nvl (quest2, 0)<=>

and nvl (quest3, 0)<=>

and nvl (quest4, 0)<=>

and nvl (quest5, 0)<=>

Tags: Database

Similar Questions

  • BlackBerry Z10 well defined, I can't get the phone to ring and vibrate as the default value for all calls. I can put individual contacts, but I want to ring and vibrate for all.

    Although the value, I can not phone ring and vibrate as the default value for all calls. I can put individual to vibrate and ring contacts and it works but I want as the default for all incoming calls. Any help would be appreciated, thanks

    Sorry, I found the answer in the manual

    "Change your ringtone, sounds or alerts.

    GoTo settings\notifications to the bottom of the screen select application\phone

    You can activate vibrate out there, put the ringer default etc.

  • Range of values for substitution variables

    Hello

    Can assign us range of values for substitution variables...

    CurrActuals: Jan: Mar
    CurrFcst: Mar: Dec


    When I set up and use the void daataforms var aboive... his throw error... How can I set vales for variable sub range.

    Jan: Mar will not work in Web Forms. I have not tried 11.1.2.2 but older versions, it will not be

  • error message "Please provide a value for all required fields.

    I try to install enterprise converter on my virtualcenter server.  I use the latest version (2.5u3), and when I get to the part where I provide identification information, I get the error message "Please provide a value for all required fields.  It is, I have - all fields are filled with the correct values.  I tried 2 different accounts - time local administrator and another account, that I've created specifically for vmware and they both fail with this error message.

    Someone has ideas of what's going on here?

    Elf

    The account used for the converter must be able to log on as a service.  This can be set in the local security on the VC server policy.

    geob

  • How to value for the variable user massively

    Hello world

    Is it possible to massively value variable user, for example the currentVersion value variable user as 'Work' for all users instead of setting a preference?

    Thank you very much
    Van Huy.

    It kind of defeats the object if you want to set a user variable in the world and perhaps a substitution variable can be a better option.
    In any case, one option is to export the LCM user preferences, update the output and then import them into.
    If you want to take the risk of piracy tables then look at HSP_USER_VARIABLE_VALUE, HSP_USER_VARIABLE and HSP_OBJECT

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to have a prompt for all variables in the startup script?

    I was given a script to run that repeated a couple of specific column values many times in queries in the script. I noticed the ability to set variables in scripts, then in the copy of my script, I changed the value repeated a reference variable (starting with '&') and then I executed the script. What I discovered is that the execution of the script appears to present the prompt for the value of the variable EVERY TIME the done variable references, instead of only once at the beginning of the script. What can be possibly right? Is it possible to have this script the only guest (or two, perhaps, for two variables) at the beginning of the script and just have it use this value in the many places in the script need?

    Yeeees well. In the above example would be: Cancel the definition of entry
    BUT, assuming you're sqldev (not), and that you run as a script (F5), you don't need to the above calls, and you will be prompted for the value of each race.
    If you run instructions in sqldev (F9), usually, it makes more sense to use bind variables (*: * instead of * & *).

    Have fun
    K.

  • Problem of null values for the Variable

    I work with APEX 4.0.  I have a menu page that has a list item widget types to select.  I then a navigation list that calls a report page and sets a widget-type element with the value of the widget on the page called - type element.

    Problem is that type widget on the page called article does not meet.  The report depends directly on this issue being filled.  The url indicates the element in the form of Pxxx_WIDGET_TYPE, but the value for parameter & Pxxx_WIDGET_TYPE. is set to null.  I am also an element of Pxxx_CALLED_FROM filling, which fill, and the url shows the value of & APP_PAGE_ID.

    What's wrong?  How to fill the element of widget_type?

    How do you define value for Pxxx_WIDGET_TYPE? And is there a value in the session state for this item?

    Kind regards

    Vincent

  • I am defining a recordset and he asked me a test value for the variable in form, anyone can tell me what variables would look like?

    variable.jpg

    In your illustration, he indicates that there should be a form variable which passes the value to the query. For example, if there is an input field

    Then, when the form is submitted, it will pass the value to the query.

    When you test the query in Dreamweaver, this value is unknown, where the question. Simply a response with a value and everything's fine.

  • How the value for several variables using a single guest

    Is there a way to put more than one variable with a single guest?
    for example, the value @CurrentYear and @PasteYear using just a single guest for @CurrentYear.

    A clue?

    Thank you

    Luke

    Using variables to repository you can set like this.
    Check this link http://gerardnico.com/wiki/dat/obiee/set_variable

    If brand pls help

  • SQL query to a / columns of values for all the rows that are returned by default

    Hello everyone.
    I was looking for help to make an SQL query that can be achieved if all goes well-

    I want that all the rank values in a particular column of a set of rows returned by default for a specified string. For example, consider the SQL below:

    Select date, start_time, building and room
    of star.events

    Consider this example output of the query above-

    Start_time date room
    2009-07-01 9: 00 AB 99
    2009-02-03 7:11 ED
    2009-01-03 8:23 FF
    2009-03-04 4 am SD 29

    How can I change my statement default SQL column space to say ' 57 "regardless of what the actual database values are showing this instead?

    Start_time date room
    01/07/2009 9:57 AB
    2009-02-03 7:57 ED
    03/01/2009 8:57 FF
    2009-03-04 4 am JJ 57

    Any direction/suggestions would be much appreciated.
    Thank you!

    Hello

    SELECT DATE,
           start_time,
           building,
           57 as room
    FROM   star.events;
    

    Kind regards

  • Have a shared computer and need to find subfolders for all users.

    I have a folder is located and told to right click on the 'My Computer' icon then choose Explore.

    Click the plus sign next to "My Computer" and then click the plus sign next to "drive C".

    Go to "Documents and Settings" user select

    Go to the "Local Settings"

    Problem is... I don't have a "My Computer" icon, so no other steps can be followed.

    Simply open computer option. Then look at the small arrow marks. The + sign in the older operating systems, is replaced by the arrow highlighted in yellow below:

  • most long time value of service for all registered databases in Oracle enterprise manager

    Hello

    We use the grid control Oracle enterprise manager 11g in our environment.

    I want to capture the long service time values for all the databases that are stored in the grid control.

    Is there any query to get the values of the database of the grid control.

    Please help me.

    Thank you

    Is not a 11g to test, but try mark for the target_name + target_type = "oracle_database' of mgmt$ metric_daily or mgmt$ metric_details, and do a like on metric_column looking for this particular measure... Once you have found the metric_name + metric_column, you can shoot for all the DB.

  • resolveNode returns a null value when a variable is used.

    LiveCycle Designer ES2, latest version

    Hello

    The following Javascript code, in the click event of a button, returns a null value for the variable opaque. When I manually enter the expected value the script works perfectly.

    I tried various modifications of the resolveNode line such as var opaque = xfa.resolveNode (qPage); , but without success.

    Also studied all the documents reference Adobe that I could find on the scripts and resolveNode. Any suggestions?

    var qPage = (Cell12.rawValue + "AnchorField");
    App.Alert (qPage);
    Opaque var = xfa.resolveNode ("' $... qPage '");
    App.Alert (opaque);
    var nPage = xfa.layout.absPage (opaque);
    App.Alert (nPage);
    xfa.host.currentPage = nPage;

    Thank you

    Ron

    I tried your sample and it seems to work very well... but I'm not sure 100% that you are trying to do... .going to your initial question on the passage of a variable in the resolveNode resolveNode expects a string, so you must use the following syntax to create the string:

    xfa.resolveNode ("$.." + qPage)

    Note that the variable is outside the quotes as such the string $... is added to the content of qPage. This wil work if qPage is a string as well.

    In your example you have defined qPage as an XFA object so that the syntax above will not work. If you intend to use the same way, you would use qPage.name so that the name of the field will be returned (this is a string) and it will be added to your expression of $ to make the $... ProductAnchorField

    Thus, the expression would be:

    xfa.resolveNode ("$.." + qPage.name)

    Make sense?

    Paul

  • Definition of user profiles by default for all Windows 7 users?

    How can I configure Firefox to have the same default values for all users, the same homepage specifically, among other things?

    Thank you!

    Hi LarryMal, probably the best way to pre-set parameters is with the way that is described in http://kb.mozillazine.org/Locking_preferences
    for the homepage especially, see also https://mike.kaply.com/2012/08/29/setting-the-default-firefox-homepage-with-autoconfig/

  • Getting the values for the attributes of the user in IOM

    Hello

    I have it here is the snippet of code that retrieves the values for all the attributes user OIM 11g. But this code returns the exception of null pointer for attributes with null values. I also put if condition to check for null pointer exception, but always the null value is thrown in the newspapers whenever this code snippet is executed in the event handler.

    Any thoughts?

    private Map getUser(String userKey) {
      Map users = new HashMap();
      User user = null;
      UserManager userManager = (UserManager) Platform
      .getService(UserManager.class);
      try {
      user = userManager.getDetails(userKey, null, false);
      logger.log(ODLLevel.FINE, "User: {0}",new Object[] { user });
    
      } catch (NoSuchUserException e) {
      logger.log(ODLLevel.ERROR, e.getMessage(), e);
      } catch (UserLookupException e) {
      logger.log(ODLLevel.ERROR, e.getMessage(), e);
      }
      Set AttrNames = user.getAttributeNames();
      logger.log(ODLLevel.FINE, "User Attributes: {0}",new Object[] { AttrNames });
    
      Iterator itr = AttrNames.iterator();
      while (itr.hasNext()) {
      try {
      String AttrNAme = itr.next().toString();
      logger.log(ODLLevel.FINE,"Current Attribute is : {0}::",new Object[]{AttrNAme});
      if( user.getAttribute(AttrNAme).toString()!=null && user.getAttribute(AttrNAme).toString().length()!=0){
      String AttrValue = user.getAttribute(AttrNAme).toString();
      logger.log(ODLLevel.FINE,"Attribute: {0} and Value: {1}",new Object[]{AttrNAme,AttrValue});
      users.put(AttrNAme, AttrValue);
      }
      } catch (Exception e) {
      logger.log(ODLLevel.ERROR, e.getMessage(), e);
      }
      }
      return users;
      }
    

    TIA

    A call to ToString on null will give you the exception. You should check that the value is not null before calling toString() on it.

    In addition, you must perform an additional control on the user object that you receive after your try catch block. If the user object is null, then there is no need to run code on the user object.

Maybe you are looking for