substring

  • Hi friends,

    Here is the table I'm doing the select on

    select name, pwd from test

    name(varchar) pwd(varchar)

    -----------------------------------

    Mary At connect

    select CAST(datalength(name) AS VARCHAR) + substring (pwd,3,6) from test;

    4 conne

    But I need the result to be '4 con' (length of test.name + 3rd to 6th character in test.pwd inluding the space)

    Please help...

    Thank you

  • Sorry got the answer. I need to use substring(expression,start value,length) Thanks

Viewing 2 posts - 1 through 1 (of 1 total)

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