Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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?
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page