Hi,
I tried to use the right function as, "Select right(UserName) as UN from
Table1" and it returned "blank".
It works well with Left. Im puzzled. :)
ThanksRIGHT(value, numberofchars)
select right(username, 6) from ...
Seems like a reference to Books Online would have done this for you much
more efficiently than a forum post. :-)
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"fiaola" <fiaola@.mail.com> wrote in message
news:O9fJ6tLVIHA.5448@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I tried to use the right function as, "Select right(UserName) as UN from
> Table1" and it returned "blank".
> It works well with Left. Im puzzled. :)
> Thanks
>|||Thanks for the reply. I did that, but it returned blank values. If i tried
the LEFT function, it works well.
My field is a character, and I could not figure out why it does not pickup
the parameters requested.
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message
news:13ogib06s428b79@.corp.supernews.com...
> RIGHT(value, numberofchars)
> select right(username, 6) from ...
> Seems like a reference to Books Online would have done this for you much
> more efficiently than a forum post. :-)
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
> "fiaola" <fiaola@.mail.com> wrote in message
> news:O9fJ6tLVIHA.5448@.TK2MSFTNGP04.phx.gbl...
>> Hi,
>> I tried to use the right function as, "Select right(UserName) as UN from
>> Table1" and it returned "blank".
>> It works well with Left. Im puzzled. :)
>> Thanks
>|||"fiaola" <fiaola@.mail.com> wrote in message
news:uIiqWJuVIHA.1184@.TK2MSFTNGP04.phx.gbl...
> Thanks for the reply. I did that, but it returned blank values. If i
> tried the LEFT function, it works well.
> My field is a character, and I could not figure out why it does not pickup
> the parameters requested.
>
What is the username you're using?
Perhaps the 6 right most characters are blank?
Can you post the actual code.
Thanks.
> "TheSQLGuru" <kgboles@.earthlink.net> wrote in message
> news:13ogib06s428b79@.corp.supernews.com...
>> RIGHT(value, numberofchars)
>> select right(username, 6) from ...
>> Seems like a reference to Books Online would have done this for you much
>> more efficiently than a forum post. :-)
>> --
>> Kevin G. Boles
>> Indicium Resources, Inc.
>> SQL Server MVP
>> kgboles a earthlink dt net
>>
>> "fiaola" <fiaola@.mail.com> wrote in message
>> news:O9fJ6tLVIHA.5448@.TK2MSFTNGP04.phx.gbl...
>> Hi,
>> I tried to use the right function as, "Select right(UserName) as UN from
>> Table1" and it returned "blank".
>> It works well with Left. Im puzzled. :)
>> Thanks
>>
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment