Welcome to SPN

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

Sign Up Now!

Use of left in a query

Discussion in 'Information Technology' started by JOM, Nov 18, 2005.

Tags:
  1. JOM

    JOM
    Expand Collapse
    Guest

    If I want to use left e.g., left(len([AssignNo]),4) for Assignment# 123456
    would get 1234 what if the user entered 123 it returns a null so how so take
    care of that?
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News How The Left & Indian Nationalists Distorted The History Of Sikh Gadhar Movement - Breaking News Sep 21, 2016
    SciTech Voyager 1 has left the solar system — almost Breaking News Mar 23, 2013
    General Right to Left all shades participated in March for Punjabi language Hard Talk Feb 25, 2013
    Heritage Priceless Belongings of Guru Gobind Singh Left to Decay in Neglected Forts History of Sikhism Feb 17, 2013
    Opinion Poll Pact: Left Wants 30 Seats From Ppp Punjab, Punjabi, Punjabiyat Aug 31, 2011

  3. Al Camp

    Al Camp
    Expand Collapse
    Guest

    JOM,
    IF(Len(AssignNo) < 4, [AssignNo], Left([AssignNo], 4))
    --
    hth
    Al Camp
    Candia Computer Consulting - Candia NH
    http://home.comcast.net/~cccsolutions

    "JOM" <JOM@discussions.microsoft.com> wrote in message
    news:9D28BC01-84A5-4582-B44C-E20DEDE078CE@microsoft.com...
    > If I want to use left e.g., left(len([AssignNo]),4) for Assignment# 123456
    > would get 1234 what if the user entered 123 it returns a null so how so
    > take
    > care of that?
     
  4. Ofer

    Ofer
    Expand Collapse
    Guest

    If you use left 4 on 123 it should return 123

    The problem is with the left that you gave us
    left(len([AssignNo]),4)

    Should be without the len

    left([AssignNo],4)
    --
    I hope that helped
    Good Luck


    "JOM" wrote:

    > If I want to use left e.g., left(len([AssignNo]),4) for Assignment# 123456
    > would get 1234 what if the user entered 123 it returns a null so how so take
    > care of that?
     

Share This Page