Mssql operator question

What does this mean in mssql?
if isnull(@branch,0) <> 0

The BOL (Books On Line) are very helpful for answering
questions about MS SQL functions.
http://msdn.microsoft.com/en-us/library/aa933210(SQL.80).aspx

Similar Messages

  • Save As operation Question

    Scenario - I have a web application that generates Excel documents that can be downloaded or opened directly. The web pages are a mixture of both ASP.NET and Classic ASP so the Excel file is actually generated as an HTML table. When a Save or Save As operation
    is done when the .xls file is downloaded a specified file name passed from the web page is used in the save operation. When you open the Excel file after saving Excel displays "The file you are trying to open "filename.xls" is in a different
    format than specified by the file extension...Do you want to open the file now?" informing me that the file is not a true xls file. When you continue with the opening the file it opens normally with no issues.
    Question or Possible issue: Taking one of these files after it has been saved to a location on the computer outside of the download folder, and perform a Save As operation to change the format to a true .xls file the theExisting File Name is not displayed in
    the File Name field. The Save as type defaults to Web Page which is understandable due to how the file is generated.
    I've tried this with actual Excel spreadsheets and the File Name field on the Save As operation is populated with the current name of the file and keeps it even if you change the Save as type.
    Main Question: Is there a setting somewhere in Excel to prevent the loss of the File Name?

    Hi,
    According to your description, the "The file you are trying to open "filename.xls" alert is from a feature called Extension Hardening, and you can find more information about it here. 
    http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx
    As you said and tested, Excel will retain the current file name in file name field when we save/save as the file. It's a default behavior. I suppose that the issue may be caused by the Excel that generated by web application.
    I recommend we try the 3 workarounds:
    1. Modify the ASP.NET program and make the file change to new excel format when generated
    Please see the thread:
    http://stackoverflow.com/questions/940045/how-to-suppress-the-file-corrupt-warning-at-excel-download
    2. Use "Office Migration Planning Manager" to convert the XLS to XLSX format.
    The toolkit also contains the Office File Converter (OFC), which enables bulk document conversions from binary to OpenXML formats. 
    Overview on Technet
    Download Link
    3. Use a macro to convert batch of XLS file to XLSX file and retain the file name.
    Sample code:
    Sub ProcessFiles()
    Dim Filename, Pathname, saveFileName As String
    Dim wb As Workbook
    Pathname = "C:\Users\myfolder1\Desktop\myfolder\Macro\"
    Filename = Dir(Pathname & "*.xls")
    Do While Filename <> ""
    Set wb = Workbooks.Open(Pathname & Filename)
    saveFilename = Replace(Filename, ".xlsx", ".xls")
    wb.SaveAs Filename:=Pathname & saveFilename, _
    FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
    ReadOnlyRecommended:=False, CreateBackup:=False
    wb.Close SaveChanges:=False
    Filename = Dir()
    Loop
    End Sub
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • The Shift operator Question

    Dear sir/madam
    I having question for the shift operator.
    What different between >>> and >> ?
    I have refer to sun tutorial, it state >>> is unsign, what does it mean?
    and last is
    if integer is 13
    what anwer for 13>>8
    is it move for 8 right by position? pls told me in detail
    is it answer same with the 13>>>8 ?
    Thanks for ur solutions

    You can play with the following for a while.
    final public class BinaryViewer{
      final static char[] coeffs = new char[]{(char)0x30,(char)0x31};
    public static String toBinary(int n) {
      char[] binary = new char[32];
      for(int j=0;j<binary.length;j++) binary[j]=(char)0x30;
      int charPointer = binary.length -1;
      if(n==0) return "0";
      while (n!=0){
          binary[charPointer--] = coeffs[n&1];
          n >>>= 1;
    return new String(binary);
    public static void print(int n){
        System.out.print(BinaryViewer.toBinary(n));
        System.out.print("   ");
        System.out.println(String.valueOf(n));
    public static void main(String[] args) throws Exception{
       int n=Integer.MIN_VALUE;//Integer.parseInt(args[0]);
       int m=Integer.MAX_VALUE;//Integer.parseInt(args[1]);
       BinaryViewer.print(n);
       BinaryViewer.print(n>>8);
       BinaryViewer.print(n>>>8);
       System.out.println();
       BinaryViewer.print(m);
       BinaryViewer.print(m>>8);
       BinaryViewer.print(m>>>8);
      System.out.println();
        n=1024;
        m=-1024;
       BinaryViewer.print(n);
       BinaryViewer.print(n>>8);
       BinaryViewer.print(n>>>8);
       System.out.println();
       BinaryViewer.print(m);
       BinaryViewer.print(m>>8);
       BinaryViewer.print(m>>>8);
      System.out.println();
       n=2048;
       m=-2048;
       BinaryViewer.print(n);
       BinaryViewer.print(n>>8);
       BinaryViewer.print(n>>>8);
       System.out.println();
       BinaryViewer.print(m);
       BinaryViewer.print(m>>8);
       BinaryViewer.print(m>>>8);
      System.out.println();
    }

  • Range Operator Question

    Hello all,
    I asked a question yesterday under the title of "Range
    Operator for first 2 letters of item" which was answered promptly and was much appreciated. I have since encountered another problem and would like another example if possible.
    How would I search for all folders under C:\ that start with "Commercial_Global_Trading" through the end of all folders that start with "C"? Can I use a Range Operator for this as well?
    Hopefully it makes sense what I'm asking!
    Thanks!

    Yes it is a bit confusing. Maybe an answer from my previous post will help clear up what I'm asking:
    Using range operators, we can get folders that start with A, B, and C by saying:
    get-childitem 'C:\Folder\[a-c]*'
    We can also get folders that start with Aa, Ab, and Ac by saying:
    get-childitem 'C:\Folder\A[a-c]*'
    What I'm wondering is, is there a way to get all folders in a range, beginning with a specific
    word and then continue through the rest of the range? For example:
    The folder C:\Folder contains the following 6 folders:
    Account
    Commercial
    Commodity
    Commodity_Product
    Conduct
    Finance
    How would I use range operators in get-childitem to return the folders that start with Commodity, and then continue on through the rest of the C's? So the output would be the folders Commodity, Commodity_Product, and Conduct. The folder "Commercial" would
    be excluded from the output. Is this possible using Range Operators and Get-ChildItem?

  • Conditional operator question?

    Hello,
    Quick question, are we not allowed to use the conditional operator this way... see code below:
    char volatile ProgString_[] = "\
    {Fan code} \
    12 <Limit11> [C1_ACM2]_[B1] _AND_ \
    bla bla \
    unsigned char UPC_SYSZ_EndOfTable(unsigned long i){ // Find the double '*' in string
    char volatile *u;
    u = &ProgString_[i];
    if(!(strncmp("*", u, 1))){
    i++;
    u = &ProgString_[i];
    if(!(strncmp("*", u, 1))){
    return TRUE;
    else {
    return FALSE;
    else
    return FALSE;
    void UPC_SYSZ_Parse(){
    unsigned char volatile iOCntr = 0;
    unsigned long volatile i;
    for(i=0; i<200; i++){
    (UPC_SYSZ_EndOfTable(i))?(break):(continue); //<<<<< Invalid expression ??
    I would of used the following compact line:
    (UPC_SYSZ_EndOfTable(i))?(break):(continue);    //<<<<< Invalid expression ??
    to periodically test the end of the string by fetching the "EndOfTable() function and evaluating if the double star is detected.
    If detected, I would break out of the for loop, if not then I would continue.
    Is it possible to do it this way?
    thanks for all help!
    r

    Think of it along the lines of each of the operands of the ternary operator must produce a value (which of course break and continue being statements cannot do).
    Based on your brief example here is what I would do
    for(i=0; i<200; i++){
    if (UPC_SYSZ_EndOfTable(i)) break;
    // doesn't make any sense to put more code down here anyway, so no real point to continue}

  • CWMS 1.5 Operational Questions

    Hello All:
    I am looking for some help with my new CWMS 1.5 system.  I have several problems listed below.  If the features aren't in the current release, I am interested if they might be planned for an upcoming release.
    1.  How do you delete a user or a mis-typed email address?
    2.  How do you delete the branding logo?  We uploaded a logo but can't find a way to set it back to default.
    3.  How do you restrict some people to WebEx with desktop sharing and others to just personal audio conference calls?  Looking for some sort of class of service capability.  Might want to also allow Mobile and other features by class as well. 
    4.  How do you generate a report of the Userids, pins, and host/moderator numbers assigned? 
    5.  How do you turn off email notifications?  We want to load a large list of users but when we do it sends everyone an email.  We are trying to stage the system and get ready for testing.
    6.  Is there a way to allow someone from our Service Desk to act as an operator on a call that would be able to mute a line?  Looking for some sort of BigBrother capability.  Should have full access to someones account and all active conference calls.
    7.  Is there a way to get a report of what numbers were dialed?  Looking to determine number of internal versus external callers.
    8.  Why is public access required for IOS functionality?  The IPAD or IPHONE can be on the company local network or connected with a VPN connection.  We don't have IRP installed but IOS should still work.

    Hello David,
    Let me answer some of your questions:
    1. You cannot delete a user profile. If you mis-typed an e-mail address, all you can do is DEACTIVATE the profile. The behavior is the same as in WebEx SaaS.
    2. At this time there is no supported way to delete the company logo using GUI. I am sure there is a way to remove it via CLI, but you would need TAC assistance for this.
    3. At this time, it is not possible to differentiate privilege levels on per user bases. Any changes to capabilities is done on per system basis.
    4. All the available reports are found in the Reports section. There is no such a report that you are looking for. Only available reports that come within Customize Your Report are:
    UserLicenseUtilizationReportForThisMonth.csv
    UserLicenseUtilizationReportForLastMonth.csv
    SystemDowntimeReport.csv
    NetworkBandwidthUtilizationReport.csv
    MeetingReport.csv
    FraudAttemptsReport.csv
    5. At this time, if you are importing users via CSV file, only if you mark the user as INACTIVE during the import (in a csv file under column ACTIVE you mark N for the user profile) the system won't send an e-mail. Once you mark the user as ACTIVE, the system will e-mail the end user.
    6. At this time, only host of the meeting can perform those actions within the WebEx Meeting Room.
    7. There is no such a report in CWMS.
    8. I cannot provide you an answer for this question as this is rooted in product design. Mobile devices require IRP server to be able to join meetings on CWMS.
    I hope any of these answers will help.
    -Dejan

  • WLS 11g License File Operational Question

    Hello,
    I understand there is no license file anymore with WLS11g download, however of course you need a license for usage of WLS11 in production.
    So I understand it is more a legal issue that you have to buy a license.
    My question is, what do you get if you buy a license for WLS?
    - A file that is technically not used?
    - A letter stating you have bought a license that can be used for a particular CPU?
    I wonder if you still get a file (which does not affect the functionality of WLS) do I have to take care to place in the right location for legal lissues?
    I am thinking of operational guidelines in bigger/big environments.
    - Is there a technical way to check/gurantee in large environmnet by talking to the WLS instances and retrieve the current licensing?
    I guess no one wants to risk running unlicensed instances.
    thanks for your input to this untypical question,
    B.

    If you contact support, there has been discussions going on of making available some type of auditing software to cover the cases that you mention for organizations that want to monitor their compliance and deployments on their own. I'm not sure the status of that effort.
    The license file is no longer even present in 11g at all.

  • LIKE OPERATOR QUESTION

    Hi All,
    Quite simply I don't really understand two things.
    1) How is the LIKE operator is working to return both columns.
    2) When to use the LIKE operator and when to use the relation operator.
    Thanks.
    (CODE)
    SELECT *
    FROM ( SELECT TO_DATE ('01/01/2009 12:01:01', 'DD/MM/YYYY HH24:MI:SS') aa,
    TO_DATE ('1-Jan-2009') bb FROM DUAL
    WHERE aa LIKE bb
    --returns both columns
    SELECT *
    FROM ( SELECT TO_DATE ('01/01/2009 12:01:01', 'DD/MM/YYYY HH24:MI:SS') aa,
    TO_DATE ('1-Jan-2009') bb FROM DUAL
    WHERE aa = bb
    --returns nothing
    (/CODE)

    Hi,
    DaveyB wrote:
    Hi All,
    Quite simply I don't really understand two things.
    1) How is the LIKE operator is working to return both columns.The WHERE clause (whether it contains LIKE or anything else) will only control the number of rows: every row will have the same numberr of columns.
    2) When to use the LIKE operator and when to use the relation operator.Use LIKE when you want to use "wildcards" (% or _).
    Use other operators (like =) when you don't have wildcards.
    (CODE)
    SELECT *
    FROM ( SELECT TO_DATE ('01/01/2009 12:01:01', 'DD/MM/YYYY HH24:MI:SS') aa,
    TO_DATE ('1-Jan-2009') bb FROM DUAL
    WHERE aa LIKE bb
    --returns both columns
    SELECT *
    FROM ( SELECT TO_DATE ('01/01/2009 12:01:01', 'DD/MM/YYYY HH24:MI:SS') aa,
    TO_DATE ('1-Jan-2009') bb FROM DUAL
    WHERE aa = bb
    --returns nothing
    (/CODE)It's great that you're trying to format your code! I wish everyione did that.
    Use square brackets (&#091; and &#093;) if you want to use &#091;CODE&#093; and &#091;/CODE&#093; tags.
    LIKE operates on strings. Don't use a DATE where a string is required. Do some experiments like the ones you tried just using strings, if you want to see how LIKE behaves.

  • Quick if operator question

    If a and b contain a number each, what should
    if(a>0&&b6=0)be?

    = --> assignment operator
    example:
    a = 0;
    a = a + 1
    // a now equals 1; it doesn't solve the algebraic equation or anything
    == --> comparison operator, returns boolean value
    example:
    if(a == 0)
    // do something
    Now you can correct it.
    theAmerican

  • Math Addition Operator Question

    Hi there,
    I'm trying to write a very simple math equation:
    var gal_width = 100;
    var m_box_pos = 2000;
    var total = (gal_width+m_box_pos);
    When I display this in a text element, the numbers are shown together rather than being added together
    (eg: 1002000)
    I get the feeling Edge is interpreting the + as a string operator rather than a math operator.
    Replacing the + with a - (as a test), the 2 numbers are being subtracted.
    Multiplying the numbers with the * operator also works as it should.
    I've tried many configerations, escaping the operator with no luck.
    Any ideas of how to get addition to work?
    Thanks

    Hi 29sketc.
    console.log( sym.$("text_111").text());
    // logs : 111
    console.log(typeof sym.$("text_111").text());
    // logs : string
    var number_222 = 222;
    console.log(typeof number_222);
    // logs : number
    console.log( sym.$("text_111").text() +number_222);
    // logs : 111222
    text() has produced a String so + is interpreted here as string concatenation.
    var number_111 = 111;
    console.log(typeof number_111);
    // logs : number
    console.log(number_111 +number_222);
    // logs : 333
    When you have two Number variables + is interpreted  as addition.
    Gil

  • Post Increment Operator Question

    I had written a small program to test the working of Post increment operator.
    public static void main(String[] args)
         int a = 4;
         a = a++;
         System.out.println ( a );
    I expected the output to be '5', but the output given is '4'.
    Can anyone tell me to how this works in Java ?

    There is a big difference between a++ and ++a.
    a++ means increment a AFTER you have performed the line.
    ++a mean increment a BEFORE you perform the line.
    class Test
    public static void main(String[] args)
    int a = 4;
    a = ++a; //returns a = 5
    // a = a++; //returns a = 4
    //a++; //returns a = 5
    //++a; //returns a = 5
    System.out.println ( a );
    }

  • Ternary Operator Question (with regex).

    Hi, I was learning regex in java and wrote a program which tests a string to see if it is an email address.
    import javax.swing.*;
    public class IsEmailAddress
         public static void main(String[] args)
              String address = JOptionPane.showInputDialog("Enter an email address");
              if(address.matches("[a-zA-Z0-9\\.]+@\\w+\\.{1}\\w+"))
                   JOptionPane.showMessageDialog(null, "It is an email address");
              else
                   JOptionPane.showMessageDialog(null, "It is not an email address");
    }The above program works correctly. But then I decided to try and make the program only one line inside the main:
    import javax.swing.*;
    public class IsEmailAddress
         public static void main(String[] args)
              JOptionPane.showInputDialog("Enter an email address").matches("[a-zA-Z0-9\\.]+@\\w+\\.{1}\\w+") ? JOptionPane.showMessageDialog(null, "It is an email address") : JOptionPane.showMessageDialog(null, "It is not an email address");
    }I get the compilation error not a statement, what am I doing wrong? Is this even possible?
    Thanks for any help

    I would never use a piece of code like that as part of a bigger program, I wanted to see if it was possible and maybe to learn something about the ternary operator.
    Keeping in mind what you said about the ternary operator having to return something, I was able to make it work:
    import javax.swing.*;
    public class IsEmailAddress
         public static void main(String[] args)
              int a = JOptionPane.showInputDialog("Enter an email address").matches("[a-zA-Z0-9\\.]+@\\w+\\.{1}\\w+") ? JOptionPane.showOptionDialog(null, "It is an email address","Is it an email Adress?",JOptionPane.CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE,null,null,null) : JOptionPane.showOptionDialog(null, "It is not an email address","Is it an email Adress?",JOptionPane.CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE,null,null,null);
    }I chose showOptionDialog because it returns a static int.
    Thank you for your help!!!

  • *****Assignment Operator Question - String Operations*****

    There's a lot of code here, but my question pertains to the italicized portion. I am assigning one StringObject to another. But when the assignment is tested with a System.out.println in the TestStringObject class, it doesn't look like the assignment has occurred properly. Even thought the string is reversed with the myObj.reverse() method, when the object is printed to the screen, it does not appear to be reversed. Is there really a problem with the way the assignment is occurring or am I misunderstanding the way assignment occurs in Java. By the way, the TestStringObject class must stay as is, but the StringObject code can be modified. Thanks!
    class TestStringObject{
       public static void main(String [] args){
          StringObject myObj, yourObj;
          myObj = new StringObject("Hello-World!!! Java/is/awesome.");
          yourObj = new StringObject("a man a plan a canal panama");
          myObj.stripCharacters("-!/.");
          myObj.displayStringObject();
          System.out.println();
          myObj.reverse();
          myObj.displayStringObject();
          System.out.println();
          yourObj.stripCharacters(" ");
          System.out.print("yourObj = ");
          yourObj.displayStringObject();
          System.out.println();
    myObj = new StringObject(yourObj.getStore());
    myObj.reverse();
    System.out.print("myObj = ");
    myObj.displayStringObject();
    System.out.println();
    if(myObj.equals(yourObj))
    System.out.println("they are equal");
    else
    System.out.println("they are not equal");
    import java.lang.String.*;
    class StringObject{
       private String store;
       private int storeLength;
       public StringObject(String s){
       //Creates a new StringObject by saving the string s in
       //the instance variable store and its length in
       //the instance variable storeLength.
       store = new String(s);
       storeLength = store.length();
       public void displayStringObject(){
       //Display the instance variable store.
       System.out.println(store);
       public void reverse(){
       //Updates store to hold the reverse of its contents.
       String reverseString = new String();
       char reverseLetter;
       for (int z = storeLength - 1; z > -1; --z){
           reverseLetter = store.charAt(z);
           reverseString = reverseString + reverseLetter;
       store = reverseString;
       public void stripCharacters(String stg){
       //Update store to hold its contents after each of the
       //characters in stg has been removed.
       int tempLength = stg.length();
       char newChar;
       for (int i = 0; i < tempLength; i++){
           newChar = stg.charAt(i);
           stripACharacter(newChar);
           storeLength = store.length();
       public boolean equals(StringObject sObj){ 
       //Determines if the store in sObj is identical to
       //the store in the receiver without regard to case.
       String newStore = sObj.store;
       if (newStore.equalsIgnoreCase(store))
          return true;
       else
          return false;  
       public String getStore(){
       //Return the store to the caller.
       return store;
       private void stripACharacter(char ch){
       //Update store to contain its contents after every occurrence
       //of character ch has been removed.
       String testString = new String();
       char letter;
       for (int x = 0; x < storeLength; x++){
           letter = store.charAt(x);
           if (letter != ch){
              testString = testString + letter;
       store = testString;
    The Output:
    D:\CMU>java TestStringObject
    HelloWorld Javaisawesome
    emosewasiavaJ dlroWolleH
    yourObj = amanaplanacanalpanama
    myObj = amanaplanacanalpanama
    they are equal

    It looks to me like your output is correct. What were you expecting when you compared a palindrome to its reverse?
    I changed it to something that is not the same in both directions and got this output, which is also correct:HelloWorld Javaisawesome
    emosewasiavaJ dlroWolleH
    yourObj = abcdefg
    myObj = gfedcba
    they are not equal

  • New operator question

    Consider the following class :
    class A {
    int x,y;
    public void display() {
    System.out.println("x=" + x);
    When you say:
    A a = new A();
    Memory is allocated for x,y & the reference is stored in a(object).
    I have two questions regarding this
    1)
    When i say,
    a.x = 10. Is this equivalent to
    *( reference address stored in a + 0) = 10
    a.y=20
    *(reference address stored in a + 1) = 20
    2) How is memory allocated for member functions ?
    TIA,
    Olabora.

    the code for a particular class needs only exist at one location in memory, regardless of the number of instances. So it probably exists in some class data structure within the class loader.

  • Bitwise operator question...

    Hi,all.
    I have been using Java for around 1 year, but still not very comfortable with bitwise problems. I wish some one can give me a thorough explanation for these. Better yet, if you know how to use bitwise operator to solove the real programming problem, please post here too. I am doing some testing now. I will post some coding example later here, so you may help me on these coding too.
    Everyone have a great sunday night.

    Integers are represented by 32-bit values. You can have either 'signed' or 'unsigned' integer ranges.
    signed int 32000 to - 32000
    unsigned int 0 to 65000
    (note, these are approximations)
    For signed interpretations, the last digit on the left hand side represents wether or not the value is negative (called the most significant bit, msb).
    1000 0000
    The '1' is the msb
    Steps to convert -14 to its binary representation (using 2s complement as explained by above post):
    1. write the binary representation of '1' (ignore negative for now)
    2. invert the values
    3. add 1
    1) 0000 1110
    2) 1111 0001
    3) 1111 0010
    As you can see, the msb is a '1', so therefore it represents a negative value
    Note: In binary addition,
    1 + 1 = 0 carry 1
    1 + 0 = 1
    0 + 0 = 0
    As for other applications of this, I find myself using bitwise calculations in graphical work.
    As stated above (I love to reiterate others words, cause it's fun!!), Assembler language programming is a fantastic way to become an expert in the art of bitwise manipulation (if you have the patience).

Maybe you are looking for