Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Simple Concatenation Query

Discussion in 'Information Technology' started by kayabob, Jul 28, 2006.

  1. kayabob

    kayabob
    Expand Collapse
    Guest

    I have a query to combine First Middle and Last name:
    FullName: Table!First+" "+Table!Middle+" "+Table!Last.

    This works if someone has all 3 (First, Middle and Last) names, BUT WONT
    display any name at all If someone doesnt have a middle initial. For these
    people, i would like it to show a First and Last name only.

    Thank you!
     
  2. Loading...

    Similar Threads Forum Date
    Grammer / Vyakarn Learn Simple & Easiest Gurbani Vyakaran/grammer From Prof. Maninderpal Singh Language, Arts & Culture Mar 9, 2015
    General Babaji Ranjit Singh Dhandrian Wale, Simple living high Thinking Hard Talk Sep 27, 2013
    Sikh Weddings Simple? No, they Are Indulged In Brahmanwad Questions and Answers Sep 15, 2012
    The One-Minute Mystic: Simple Things You Can Do to Stay Connected Spiritual Articles May 23, 2011
    Being a Simple Sikh (blog of a Prithihardkaur Sikh) Spiritual Articles Sep 13, 2010

  3. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    Guest

    Try this --

    FullName: .[First]+IIF(
    .[Middle] Is Null,"","
    "+
    .[Middle]) +" "+
    .[Last]


    "kayabob" wrote:

    > I have a query to combine First Middle and Last name:
    > FullName: Table!First+" "+Table!Middle+" "+Table!Last.
    >
    > This works if someone has all 3 (First, Middle and Last) names, BUT WONT
    > display any name at all If someone doesnt have a middle initial. For these
    > people, i would like it to show a First and Last name only.
    >
    > Thank you!
     
  4. kayabob

    kayabob
    Expand Collapse
    Guest

    Works perfectly. Thank you.

    "KARL DEWEY" wrote:

    > Try this --
    >
    > FullName: .[First]+IIF(
    .[Middle] Is Null,"","
    > "+
    .[Middle]) +" "+
    .[Last]
    >
    >
    > "kayabob" wrote:
    >
    > > I have a query to combine First Middle and Last name:
    > > FullName: Table!First+" "+Table!Middle+" "+Table!Last.
    > >
    > > This works if someone has all 3 (First, Middle and Last) names, BUT WONT
    > > display any name at all If someone doesnt have a middle initial. For these
    > > people, i would like it to show a First and Last name only.
    > >
    > > Thank you!
     
  5. Brian Bastl

    Brian Bastl
    Expand Collapse
    Guest

    You may also try the following, which (according to my tests) will keep the
    text left-aligned and properly spaced regardless of which field(s) may be
    empty.

    MoneyBags: Trim((PerFirst+" ") & ( PerMiddle + " ") & (PerLast))

    HTH,
    Brian

    "kayabob" <kayabob@discussions.microsoft.com> wrote in message
    news:E9A9E74B-69F3-48BB-9A77-B0A61CF4F1AF@microsoft.com...
    > Works perfectly. Thank you.
    >
    > "KARL DEWEY" wrote:
    >
    > > Try this --
    > >
    > > FullName: .[First]+IIF(
    .[Middle] Is Null,"","
    > > "+
    .[Middle]) +" "+
    .[Last]
    > >
    > >
    > > "kayabob" wrote:
    > >
    > > > I have a query to combine First Middle and Last name:
    > > > FullName: Table!First+" "+Table!Middle+" "+Table!Last.
    > > >
    > > > This works if someone has all 3 (First, Middle and Last) names, BUT

    WONT
    > > > display any name at all If someone doesnt have a middle initial. For

    these
    > > > people, i would like it to show a First and Last name only.
    > > >
    > > > Thank you!
     

Share This Page