Help with a query using ISNULL and RTRIM in the same select statement

What I'm trying to accomplish is to blend the following two statements together:
ISNULL (EMail_Address, '') As Matrix_Member_Email
 AND
RTRIM (EMail_Address) as Matrix_Member_EMail
So that if the email address is NULL, it gets changed to blank and I still need to RTRIM the other entries and use the column header of Matrix_Member_Email.
I've tried:
ISNULL ((EMail_Address, '') (RTRIM (EMail_Address)) as Matrix_Member_EMail
Any help would be greatly appreciated.
Thank you,

I'm sorry.  Here is the query:
--Declare @EMail_Address nvarchar(100) = null
Select SVAssociationID.R_ShortValue as MATRIX_AssociationID, Matrix_Modified_DT as Matrix_LastModified
  ,RTRIM (MLS_ID) As Matrix_MLS_ID
  , ISNULL(EMail_Address, '') AS MATRIX_member_Email
  ,RTRIM (EMail_Address) as Matrix_Member_EMail
  --,RTRIM( LTRIM(  ISNULL (@EMail_Address, '') ) ) as Matrix_Member_EMail 
  ,Last_Name AS MATRIX_LastName, Nickname AS MATRIX_NickName
  FROM    dbo.Agent_Roster_VIEW a
        LEFT JOIN dbo.select_values_VIEW SV ON a.Status_SEARCH = SV.ID
        LEFT JOIN dbo.select_values_VIEW BillType ON a.Bill_Type_Code_SEARCH = BillType.ID
  LEFT JOIN dbo.select_values_VIEW SVAssociationID ON A.Primary_Association_SEARCH = SVAssociationID.ID
WHERE   Status_SEARCH IN (66,68) 
    Order by MLS_ID
Results:
MATRIX_AssociationID
Matrix_LastModified
Matrix_MLS_ID
MATRIX_member_Email
Matrix_Member_EMail
MATRIX_LastName
MATRIX_NickName
STC
09/02/14
CCWILLI
[email protected]
[email protected]
Williams                      
Christine   
STC
09/12/14
CCWORSL
[email protected]
[email protected]
Worsley                       
Charlie
STC
09/02/14
CCYROBIN
NULL
Robinson       
ECBR
09/02/14
CDABLACK
[email protected]
[email protected]
Black                         
Dale        
STC
09/02/14
CDABRADY
[email protected]
[email protected]
Brady                         
David       
Thank you,

Similar Messages

  • I cannot use data and voice at the same time.

    I cannot use data and voice at the same time.
    I am on Wifi (connected) and at the same time I am on a voice call. when I switch to my RSS feed reader it does not sync it comes out with a message cannot connect to internet, I thought it is a problem with the feed reader application, IE 10 behaves the same I cannot browse when I am on a voice call.
    This is a very basic issue, am I missing something? Please help.
    My Model is lumia 820 with the latest portico update.
    TIA
    Sandeep

    I am aware that packet data via EDGE and voice cannot happen at the same time, surprisingly when I am on voice call I cannot connect to internet via Wifi too

  • Replace a 2003 (not R2) File Server with a 2012R2 files server and preferably keep the same machine name and IP when finished

    I am wanting to replace a 2003 (not R2) File Server with a 2012R2 file server and preferably keep the same machine name and IP when finished.  For the moment I just need some "high level" guidance, little details can be worked out once I know
    which direction I will go.  I was considering that DFS might be a way to help get through the process although when finished the 2012R2 Files server will be by itself with no other file server planned at this time.  DFS can stay installed for maybe
    future purposes but clearly I wouldn't need the DFS Replication with only one machine.
    Here's a few details of the environment....
    1.  DC's are 2012R2 but it is still 2003 DFL because the old 2003 DCs are still present.  But likely they will be gone and the DFL elevated before I start on the File Server project
    2. Nearly all machines in the facility have a shortcut on the "All Users" Desktop that points to the existing old File Server.  Editing or replacing that shortcut would be a major pain,...hence why I want to keep the same machine name at least,
    and maybe the same IP if not too much trouble.  This way the existing shortcut would continue to work with the new 2012R2 File Server.  The UNC path represented in that shortcut is also configured into one or more of our major business applications,
    futher emphasizing the need to keep the UNC path the same throughout the process.
    3. The facility runs 24/7/365 but is "light" on weekends.  The political environment is such that there is little to no tolerance for any down time at all.
    4. Would DFS (based from the 2012R2 machine) be a good tool to get where I need to go?
    Thanks for any suggestions.
    Phillip Windell

    Hi Sharon,
    I've done some more reading and have a few new ideas to run past you....
    Yes regular DFS wouldn't help and the Namespace would still be different than how it was with just the old server. However I was thinking DFS Replication could replace the purpose of RoboCopy and it would keep the two locations "in sync" until I was ready
    to flip over to the new server.  DFS Rep can exist independently of a DFS Namespace, so a Namespace is not even needed. It needs a minimum of 2003R2 for the "later & better" DFS Rep but I believe 2003 can do an "in place" upgrade to 2003R2, so I would upgrade
    the old server to 2003R2 first.  As long as the DFS Rep on 2012R2 and 2003R2 will properly interact I think that will work.
    Thanks for the reg info on the Shares.  I'm debating if editing that would reg file would really be much better than manually creating the Shares on the new server while the DFS Replication was doing its job.  I'll probably export that Key as a
    safety move whether I use it or not.
    Once the DFS Rep is fully in sync and the Shares are in place on the new server, I figure I would then:
    1. Remove the DFS Replication Object (optionally remove DFS Services completely)
    2. Rename the old File Server to something else and set it to DHCP
    3. Rename the new File Server to the name I want to use and give it the IP the old server had.
    How does that sound?
    Phillip Windell

  • My Ipad mini does not see my printer. my wife's ipad2 does. We both use IOS8 and upgraded at the same time. How can I remedy this?

    My Ipad mini does not see my printer. my wife's ipad2 does. We both use IOS8 and upgraded at the same time. How can I remedy this?

    OK great info!
    I found 2 possible ethernet to USB adapters:
    By "Plugable":  USB 2.0 to ethernet LAN wired network adapter - seems this will work, but I'll contact Plugable.
    2. Apple USB Ethernet Adapter
    Easily connect your MacBook Air computer to an Ethernet network with the Apple USB Ethernet Adapter. Small and light, it connects to the USB 2.0 port of your MacBook Air and provides an RJ-45 connector that supports 10/100BASE-T performance.  BUT NOT SURE IF THIS WILL WORK ON ANYTHING BUT a MacBook Air…
    One person commented: 
    This little gem used to be the device of choice for adding a second Ethernet interface to a Mac Mini Server and I'd been using one that way for about a year. After doing a software update to 10.6.6 it stopped working. Forewarned is forearmed – it appears that Apple is finally enforcing the MacBook Air system requirement.
    Thanks for any additional comments.
    Best regards,
    Steve Schulte
    Sunday 6 January 2013

  • Use AO and AI in the same program

    Hello,
    I like write a program to use AO and AI in the same program.
    In this program write a timer a voltage to a AO port and after then it should read a voltage.
    I know how I write voltage to a AO port and read a voltage on a AI port, but not in a the same program.
    The read- and the write-Task, should work as soon as possible (<=1ms). 
    (My timer have 100us ticks) 
    what should I inilize for the PCI6229 card, to use AO and AI and in which order?
    Can I have a example or pseudocode?
    Best regards
    Heiko Mayer 

    Hi Heiko-
    There is very little overlap between the AO and AI examples, so you should be able to piece the code together pretty easily.  I would offer these suggestions:
    1.  These lines should only be executed once, and they should be done before any AI or AO specific initialization is done:
    configureTimebase (board);
    pllReset (board);
    analogTriggerReset (board); 2.  It does not matter which order you perform the AI or AO initialization, but I would recommend waiting to unground the AO reference (by   board->AO_Calibration.writeAO_RefGround (kFalse) until all of the AI and AO init is done.  This will help to avoid any glitching on the AO lines.  The only steps that should be saved until after ungrounding the reference are the Start operations for AI and AO (depending on the AO mode you use, there may not be a specific Start operation to call.  Consult the MHDDK examples for more info about the required steps).
    Hopefully this helps-
    Tom W
    National Instruments

  • I purchased 2 ipad mini's at Xmas, I then sync'd them with itunes on my pc, and put basically the same apps on each of them. Both are 16gb units. One of them is full ( with over 9gb of "other" memory) the ipad still has 10gb left.What could be causing thi

    I purchased 2 ipad mini's at Xmas, I then sync'd them with itunes on my pc, and put basically the same apps on each of them. Both are 16gb units. One of them is full ( with over 9gb of "other" memory) the ipad still has 10gb left.What could be causing this "other" storage

    How much space is used by your Other? You may be able to reduce.
    How Do I Get Rid Of The “Other” Data Stored On My iPad Or iPhone?
    http://tinyurl.com/85w6xwn
    How to Remove “Other” Data from iPhone, iPad and iPod Touch
    http://www.igeeksblog.com/how-to-remove-other-data-from-iphone/
    With an iOS device, the “Other” space in iTunes is used to store things like documents, settings, caches, and a few other important items. If you sync lots of documents to apps like GoodReader, DropCopy, or anything else that reads external files, your storage use can skyrocket. With iOS 5/6/7, you can see exactly which applications are taking up the most space. Just head to Settings > General > Usage, and tap the button labeled Show All Apps. The storage section will show you the app and how much storage space it is taking up. Tap on the app name to get a description of the additional storage space being used by the app’s documents and data. You can remove the storage-hogging application and all of its data directly from this screen, or manually remove the data by opening the app. Some applications, especially those designed by Apple, will allow you to remove stored data by swiping from left to right on the item to reveal a Delete button.
    What is “Other” and What Can I Do About It?
    https://discussions.apple.com/docs/DOC-5142
    iPhone or iPad Ran Out of Storage Space? Here’s How to Make Space Available Quickly
    http://osxdaily.com/2012/06/02/iphone-ipad-ran-out-of-available-storage-space-ho w-to-fix-quick/
    6 Tips to Free Up Tons of Storage Space on iPad, iPhone, and iPod Touch
    http://osxdaily.com/2012/04/24/6-tips-free-up-storage-space-ipad-iphone-ipod-tou ch/
    Also,
    How to Clear Message/iMessage Cache on iPhone & iPad And Reclaim Lots of Free Space
    http://www.igeeksblog.com/how-to-clear-message-imessage-cache-on-iphone-ipad/
     Cheers, Tom

  • Can we use exceptions and conditions at the same time?

    can we use exceptions and conditions at the same time? Are there any dependencies between exceptions an conditions?

    Exceptions are used when there are some mistakes , or exceeds the supposed values, we can highligt that in different colours for enabling the validator to notice easily. In this we are giving conditions for considering the value as exceptions. suppose, if the values is out of the range -1 to +1 then exception.
    But conditions can be considered as the restrictions given in measure level also. So please elaborate what you meant by conditions

  • My SB Audigy 2 card can't use headset and musicamplifier at the same time

    Hi, i just bought a SB Audigy 2 [D400] and i have downloaded drivers and programs. I run Windows XP SP2.
    The soundcard works fine but it is very very annoying that i physically have to change the jack in the green=line out jack from headset to musicamplifier when i want to use my musicamplifier and change back the jack in the green=line out from musicamplifier to headset when i just want to use the headset/headphones .
    In the shop they told my that i can connect both amplifier and headset at the same time and then with creative software control whether there is sound in the headset or in the amplifier. But i can't simple get it work.
    I tried to use the green to the amplifier and the headset/speakers in the black (line out 2) and then with creative speaker settings softeware choose headphones but still the ampliefier receive the sound and no sound in the headphones. Why? In fact no matter what configuration i try the headphones doesn't work.
    But if i change the jacks so headset is in the green line out then only headset is working and the amplifier doesn't work no matter i put it in sort=line out 2 jack or orange=line out 3 jack.
    Can somebody here tell me if it is possible or not to connect both headset and external amplifier and control by software which to play? and how?
    please help, thx.
    Michael

    If you can have an ASIO compatible music playing system, then it might be possible to have system like you wish when using Creative Audigy 2 card. Since ASIO bypasses Windows Audio System, you can use both 'drivers' (ASIO - WDM/MME/DS) side by side.
    Say you want to play a game (using headset /w mic) and someone other like to listen music at the same time. With ASIO capable system you can output your music for example to "center L/R (stereo) channels" and same time output sounds from other source (using MME/DS/WDM drivers) to normal output channel (Front L/R). Only thing is, you need to set your speakersystem to 4 or 6 (depending which other channel you're using) (and for better 'balance' to adjust "angle" on THX console. You get the THX console by installing Audigy 2 Zs software).
    Try for example http://img332.imageshack.us/img332/463/djs9mo.jpg[/img] width="406" alt="Image Hosted by ImageShack.us" >
    Another option:
    Say you want to play music through external amplifier and play game online with your headset + microphone (eg. others but you listen the music, you play games)
    --> try free http://img332.imageshack.us/img332/4589/tbp7rz.jpg[/img] width="406" alt="Image Hosted by ImageShack.us" >
    If you use ASIO on BeatPort Player you can select L/R individually from the list(s). Same rules as described earlier.
    = You can play from 2 different sources simultaoneusly (ASIO + WDM/MME/DS) to two different outputs without disturbance. The other (WDM/MME/DS) source is set 'automatically' output to (Audigy) "green" port, and the other (ASIO) to "black" or "orange" port (as set).
    .jtpMessage Edited by jutapa on 09-5-2005 05:30 AM

  • Can WRT54G use WPA and WEP at the same time?

    I used to have a smc 802.11b wireless router and a dlink 802.11b wireless print server.
    In order to have WPA and a firewall, I replaced the wireless router with a linksys WRT54G.
    Then I realize the dlink print server, even though it has the "g" keyword in the model name, does not do WPA (DP-G321).
    Do I have to buy a 802.11g wireless print server? Or is there another solution?
    I don't supposed the linksys router can do both WPA and WEP at the same time?
    Connecting the print server to the router with a cable is not feasible. They are on different floors.

    both of your devices are has a wireless b technology settings, just set a wep encryption on your network rather than wpa because some wireless b devices don;t work with wpa. with regards to your query if wep and wpa can be used at the same time, the answer is no.

  • How to use ActionListener and ItemListener in the same class

    Why can't I use both ActionListener and ItemListener in the same Class?
    I want to use a drop down list and an entry box on the same form.
    How? I'm having trouble compling......
    Thanks!
    CODE:
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Disp extends Applet implements ActionListener, ItemListener
    { TextField entry=new TextField(7);
    Button Enter=new Button("Enter");
    public void init()
    add(entry);
    add(Enter);
    entry.addActionListener(this);
    entry.requestFocus();
    Enter.addActionListener(this);
    public void actionPerformed(ActionEvent thisEvent)
    String answer=entry.getText();

    Simply get your Applet to implement both ActionListener and ItemListener.
    public class MyApplet extends Applet implements ActionListener, ItemListener
      public void init()
        itemWidget.addItemListener(this):
        actionWidget.addActionListener(this);
      public void actionPerformed(ActionEvent e)
        System.out.println("ACTION PERFORMED!");
      public void itemStateChanged(ItemEvent e)
        System.out.println("ITEM STATE CHANGED!");
    }Hope this helps.

  • Using LIKE and IN at the same time

    Is it possible to use both LIKE and IN at the same time such as:
    select first_name from emp where user_id LIKE IN('1%','2%')
    Thanks in advance
    --Joshua                                                                                                                                                                                                                                                                                                                                   

    Or consider the IN - parameters as a string. Then you can do the following:
    SQL> SELECT ename
      FROM emp
    WHERE EXISTS (
              SELECT NULL
                FROM (SELECT RTRIM (SUBSTR (nums,
                                            INSTR (nums, ',', 1, iter.pos) + 1,
                                              INSTR (nums, ',', 1, iter.pos + 1)
                                            - INSTR (nums, ',', 1, iter.pos)
                                   ) nums
                        FROM (SELECT ',' || 'SCO,BLA,CLA' || ',' nums
                                FROM DUAL) csv,
                             (SELECT ROWNUM pos
                                FROM all_objects
                               WHERE ROWNUM < 50) iter
                       WHERE iter.pos <=
                                  (  (  LENGTH (csv.nums)
                                      - LENGTH (REPLACE (csv.nums, ','))
                                   / LENGTH (',')
                                - 1)
               WHERE ename LIKE '%' || nums || '%')
    ENAME    
    BLAKE    
    CLARK    
    SCOTT    
    3 rows selected.

  • Ipod nano (5th generation) - want to use headphones and charge at the same time

    I have an ipod nano (5th generation).  Do I need a special set of headphones to use the headphone jack and charge the ipod at the same time?

    The iPod nanos have a 30 pin dock connector and a headphone jack. When you charge the iPod you use the dock connector therefore you can use and charge at the same time. You cannot use and charge the iPod shuffle at the same time. You might have the two mixed up.

  • I have an iPad 2 (wifi 3G). Is it correct to use wifi and 3G at the same time ? Or one at time depending on connectivity? Thanks.

    I have an iPad 2 (Wifi + 3G). Is it correct to use the Wifi and 3G at the same time, or one at a time, depending on connectivity? Thanks in advance.

    Your iPad will use wifi first if available. If wifi is not available, it will use 3G.
     Cheers, Tom

  • Using lag and rank in the same query

    Hi
    I am trying to find out the difference in time between peoples memberships and also the order that these memberships are taken out in. So far I have added in a rank statement to work out the order the memberships were created in, but now want to look at the difference between the dates returned. The SQL I used is:
    SELECT owner_party_id,
    mem_number,
    support_id,
    mem_start_date,
    RANK() OVER (PARTITION BY owner_party_id ORDER BY mem_start_date ASC) MEMBERSHIP_SEQUENCE
    FROM membership_all
    WHERE version_type = 'CUR'
    AND owner_party_id IN ('65051', '65051', '65348', '65348', '65607', '65607', '65607')
    to get:
    "OWNER_PARTY_ID"|"MEM_NUMBER"|"SUPPORT_ID"|"MEM_START_DATE"|"MEMBERSHIP_SEQUENCE"
    65051|318874751|8014747|01-MAR-10|1
    65051|412311060|21502883|15-AUG-12|2
    65348|308672459|3526913|01-MAY-10|1
    65348|409951130|20950524|18-JUN-12|2
    65607|315830192|7510133|17-MAY-10|1
    65607|406448110|20024246|16-MAR-12|2
    65607|409738130|20903556|14-JUN-12|3
    Now I would like to calculate the difference between the start dates of each of the owner_party_id groups, so to get something like this:
    OWNER_PARTY_ID|MEM_NUMBER     |SUPPORT_ID|MEM_START_DATE     |MEMBERSHIP_SEQUENCE|Diff
    65051|318874751|8014747|01-Mar-10|1|     
    65051|412311060|21502883|15-Aug-12|2|898
    65348|308672459|3526913|01-May-10|1     
    65348|409951130|20950524|18-Jun-12|2|779
    65607|315830192|7510133|17-May-10|1     
    65607|406448110|20024246|16-Mar-12|2|669
    65607|409738130|20903556|14-Jun-12|3|90
    I think that I need to use the Lag function in, but I am not too sure if it can be linkited to look at the data within a grouping of owner party id, as it would make no sense to calculate the difference in dates for two different owner party ids.
    Any advice much appreciated.
    Thanks
    Edited by: 992871 on 09-Mar-2013 23:34

    Couple notes:
    1. You wrote you want to get order that these memberships are taken out in, however, both your and Etbin's queries calculate order within each owner_party_id and not across all members. If you want to get rank and difference in time regardless of member's owner_party_id remove PARTITION BY caluse.
    2. You might want to use DENSE_RANK and not RANK depending how you want to display rank. If two people joined at the same time and were second in rank, analytic RANK will be:
    RANK
    1
    2
    2
    4
    5
    .while DENSE_RANK:
    DENSE_RANK
    1
    2
    2
    3
    4
    .SY.

  • Using EE and XE in the same application?

    After reading the license, it doesn't appear that there is any stipulation against using XE databases alongside an EE database within the same application.
    I have a business app which runs with a centralized database, but clients in many geographically dispersed locations. The idea has been bumped around lately of trying to cache data locally to speed things up. The approach is not so much replication, but of acquiring modification priveleges from the central database, making a copy of the relevant data to a local one, and working with it there for a time. Modifications are then copied back into the central database. This scheme would be aimed at improving response times, and also helping increase the scalability of the overall application. (And yes, our applicaiton adheres strongly to the principle of locality.)
    Thus far, we acquired licenses to BerkeleyDB in order to implement these local data repositories. Oracle XE seems like a more effective route because it presents the immediate benefit that the application would not need to have it's OCI code changed..
    Given that XE supports replication as a client, I hope that this sort of thing has already crossed the minds of Oracle and that it is an acceptable use of XE?

    I am not from Oracle but I cannot see anything in your use case that would violate the license agreement. The usage of XE is free for any purpose and you are allowed to use database links, export / import and even create materialized views from another oracle database directly.
    Regards,
    ~Dietmar.

Maybe you are looking for

  • Unable to capture DV to FCE, apple support told me a PC is the way forward!

    Hi there I recently bought an apple imac with a view to editing DV footage taken previously. I had captured some of these tapes on to a PC before buying an imac. These files I was able to edit on FCE and imovie (once I had transferred them from the p

  • UNABLE TO EXECUTE THE CMDSQL SCRIPT IN A STORE PROCEDURE.

    I am trying to call a .sql file from sql cmd mode. The requirement is to pass the .sql file as parameter value to the cmd script which I have able to achieve,here is the code which is working fine . declare @x sysname set @x = 'C:\Users\testuser\Desk

  • Button not working in Movie Clip

    I'm building a small 'table builder' app for a client. This is my first major project in flash and I've encountered something I cannot figure out for the life of me. In the .fla below there's a movie clip 'scroller' it has buttons in it which load .p

  • Recording to laptop from Panasonic HVX through Premiere Elements 8

    I'm going to be using a Panasonic HVX200 and tethering it to my PC laptop  (It runs vista, has a 300 G hardrive and 3 Gig of RAM) via firewire.  I have Adobe Premiere Elements 8 and want to record using it so I can get HD footage (720p) rather than h

  • Setting up a mail list

    I want to set up a mailing list for my website but I dont want everyone seeing the list of email addresses. Is there a way I can hide the cc list?