how can we count the character of given string using convert function

  • I have a string like this.I want to count that how many character in the string.my string is‘abcdefghijklmnopqrstuvwxyz’

    Please let me know how many characters are these? Try to do it with the convert function.

    actually , i got the result using function like

    select len('abcdefghijklmnopqrstuvwxyz')

    anybody know how to solve using convert or cast function.

  • LEN is used for such a task, CAST and CONVERT are not. Is this a homework assignment?

    └> bt



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

  • Yes it is possible using the convert or cast function !!!

    may be you don't know that..

  • Sure, it may be possible, but why would you?

    What he's saying is the only reason he can think of to do that is because a teacher challenged you with it. If that's the case, we really shouldn't be helping. Use your imagination and come up with a solution - that's what your teacher expects!

    If this isn't a homework assignment, use LEN(). Anything else would be inefficient (and cryptic and unreadible).

  • jkp2311 (8/24/2010)


    Yes it is possible using the convert or cast function !!!

    may be you don't know that..

    Its possible to water your lawn with a shotglass.

    But if you have a sprinkler system installed, why would you?

Viewing 5 posts - 1 through 4 (of 4 total)

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