String Return

  • Hi,

    This is for SSRS 2005. How would I return a string value after 6 characters. For example, if I have ABCDEFGHIJK then return GHIJK.

  • Take a look at the SUBSTRING function:

    http://msdn.microsoft.com/en-us/library/ms187748.aspx

    _________________________________
    seth delconte
    http://sqlkeys.com

  • This works well too ...

    select STUFF(Column1, 1, 6, '') as ModifiedValue

    from Table1

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • I don't think the substring function is recognized by SSRS 2005. I get Unrecognized identifier error message.

  • In SSRS, the function is called MID(), but it does the same thing. There is also a RIGHT() and LEFT() function that do approximately the same thing. You probably want to do:

    RIGHT(Fields!String.Value, LEN(Fields!String.Value)-6)

  • jvanderberg (8/2/2010)


    In SSRS, the function is called MID(), but it does the same thing. There is also a RIGHT() and LEFT() function that do approximately the same thing. You probably want to do:

    RIGHT(Fields!String.Value, LEN(Fields!String.Value)-6)

    Just to elaborate on Old Hands post, the syntax is MID(string,start position,no of characters from start position going towards the right)

  • Hi,

    We can use report funtion to achive this

    String= ABCDEFGHIJ

    =Left(Feilds!Name.Value ,6)

    OP=EFGHIJ

    Thanks,

    Veeren.

    Thanks & Regards,
    Veeren.
    Ignore this if you feel i am Wrong. 😉

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply