Loading ...
Sorry, an error occurred while loading the content.

Re: SQL SUBSTRING function:

Expand Messages
  • Varra Reddy
    Hi,   I need and output like this:   My Phone Number is ( 714) 123-1234.   if I use substring function and the output of my phone numbers   is 1231234 ( i
    Message 1 of 6 , Jul 6, 2009
    • 0 Attachment
      Hi,
       
      I need and output like this:
       
      My Phone Number is ( 714) 123-1234.
       
      if I use substring function and the output of my phone numbers   is 1231234 ( i mean last 7 numbers only NO - (DASH)
      can anybody do this...
       
      Srinivas....




      [Non-text portions of this message have been removed]
    • sunil john
      Dear Srinivas, U can use combination of substring and replace function, below is an eg: declare @a varchar(200) set @a= ( 714) 123-1234 select @a,
      Message 2 of 6 , Jul 6, 2009
      • 0 Attachment
        Dear Srinivas,

        U can use combination of substring and replace function, below is an eg:

        declare @a varchar(200)
        set @a='( 714) 123-1234'
        select @a, replace(substring(@a,8,7),'-','') as ph

        Best Regards


        Sunil John




        ________________________________
        From: Varra Reddy <varra_s@...>
        To: sqlcon@yahoogroups.com
        Sent: Tuesday, July 7, 2009 7:56:54
        Subject: MUGH-SQLCON Re: SQL SUBSTRING function:





        Hi,

        I need and output like this:

        My Phone Number is ( 714) 123-1234.

        if I use substring function and the output of my phone numbers is 1231234 ( i mean last 7 numbers only NO - (DASH)
        can anybody do this...

        Srinivas....

        [Non-text portions of this message have been removed]





        Get your preferred Email name!
        Now you can @... and @....
        http://mail.promotions.yahoo.com/newdomains/aa/

        [Non-text portions of this message have been removed]
      • Varra Reddy
        Hi Sunil,   Thanks for your reply. Bu I need this format only (714) 123-1234 I need like 1231234 ( NO DASH)this only ... From: sunil john
        Message 3 of 6 , Jul 7, 2009
        • 0 Attachment
          Hi Sunil,
           
          Thanks for your reply.
          Bu I need this format only (714) 123-1234
          I need like 1231234 ( NO DASH)this only

          --- On Mon, 7/6/09, sunil john <suniljk7@...> wrote:


          From: sunil john <suniljk7@...>
          Subject: Re: MUGH-SQLCON Re: SQL SUBSTRING function:
          To: sqlcon@yahoogroups.com
          Date: Monday, July 6, 2009, 11:15 PM








          Dear Srinivas,

          U can use combination of substring and replace function, below is an eg:

          declare @a varchar(200)
          set @a='( 714) 123-1234'
          select @a, replace(substring( @a,8,7),' -','') as ph

          Best Regards

          Sunil John

          ____________ _________ _________ __
          From: Varra Reddy <varra_s@yahoo. com>
          To: sqlcon@yahoogroups. com
          Sent: Tuesday, July 7, 2009 7:56:54
          Subject: MUGH-SQLCON Re: SQL SUBSTRING function:

          Hi,

          I need and output like this:

          My Phone Number is ( 714) 123-1234.

          if I use substring function and the output of my phone numbers is 1231234 ( i mean last 7 numbers only NO - (DASH)
          can anybody do this...

          Srinivas....

          [Non-text portions of this message have been removed]

          Get your preferred Email name!
          Now you can @... and @rocketmail. com.
          http://mail. promotions. yahoo.com/ newdomains/ aa/

          [Non-text portions of this message have been removed]



















          [Non-text portions of this message have been removed]
        • Varra Reddy
          Hi All, I used different method to get the results.. here it is:   Declare @phone varchar(13) Set @Phone = (714)123-1234 select substring(@Phone,6,3) +
          Message 4 of 6 , Jul 7, 2009
          • 0 Attachment
            Hi All,
            I used different method to get the results..
            here it is:
             
            Declare @phone varchar(13)
            Set @Phone = '(714)123-1234'
            select substring(@Phone,6,3) + right(@Phone,4)
             
            thanks

            --- On Mon, 7/6/09, sunil john <suniljk7@...> wrote:


            From: sunil john <suniljk7@...>
            Subject: Re: MUGH-SQLCON Re: SQL SUBSTRING function:
            To: sqlcon@yahoogroups.com
            Date: Monday, July 6, 2009, 11:15 PM








            Dear Srinivas,

            U can use combination of substring and replace function, below is an eg:

            declare @a varchar(200)
            set @a='( 714) 123-1234'
            select @a, replace(substring( @a,8,7),' -','') as ph

            Best Regards

            Sunil John

            ____________ _________ _________ __
            From: Varra Reddy <varra_s@yahoo. com>
            To: sqlcon@yahoogroups. com
            Sent: Tuesday, July 7, 2009 7:56:54
            Subject: MUGH-SQLCON Re: SQL SUBSTRING function:

            Hi,

            I need and output like this:

            My Phone Number is ( 714) 123-1234.

            if I use substring function and the output of my phone numbers is 1231234 ( i mean last 7 numbers only NO - (DASH)
            can anybody do this...

            Srinivas....

            [Non-text portions of this message have been removed]

            Get your preferred Email name!
            Now you can @... and @rocketmail. com.
            http://mail. promotions. yahoo.com/ newdomains/ aa/

            [Non-text portions of this message have been removed]



















            [Non-text portions of this message have been removed]
          • sunil john
            what i did also will work! Best Regards Sunil John ________________________________ From: Varra Reddy To: sqlcon@yahoogroups.com Sent:
            Message 5 of 6 , Jul 7, 2009
            • 0 Attachment
              what i did also will work!

              Best Regards


              Sunil John




              ________________________________
              From: Varra Reddy <varra_s@...>
              To: sqlcon@yahoogroups.com
              Sent: Tuesday, July 7, 2009 17:51:26
              Subject: Re: MUGH-SQLCON Re: SQL SUBSTRING function:





              Hi All,
              I used different method to get the results..
              here it is:

              Declare @phone varchar(13)
              Set @Phone = '(714)123-1234'
              select substring(@Phone, 6,3) + right(@Phone, 4)

              thanks

              --- On Mon, 7/6/09, sunil john <suniljk7@yahoo. com> wrote:

              From: sunil john <suniljk7@yahoo. com>
              Subject: Re: MUGH-SQLCON Re: SQL SUBSTRING function:
              To: sqlcon@yahoogroups. com
              Date: Monday, July 6, 2009, 11:15 PM

              Dear Srinivas,

              U can use combination of substring and replace function, below is an eg:

              declare @a varchar(200)
              set @a='( 714) 123-1234'
              select @a, replace(substring( @a,8,7),' -','') as ph

              Best Regards

              Sunil John

              ____________ _________ _________ __
              From: Varra Reddy <varra_s@yahoo. com>
              To: sqlcon@yahoogroups. com
              Sent: Tuesday, July 7, 2009 7:56:54
              Subject: MUGH-SQLCON Re: SQL SUBSTRING function:

              Hi,

              I need and output like this:

              My Phone Number is ( 714) 123-1234.

              if I use substring function and the output of my phone numbers is 1231234 ( i mean last 7 numbers only NO - (DASH)
              can anybody do this...

              Srinivas....

              [Non-text portions of this message have been removed]

              Get your preferred Email name!
              Now you can @... and @rocketmail. com.
              http://mail. promotions. yahoo.com/ newdomains/ aa/

              [Non-text portions of this message have been removed]

              [Non-text portions of this message have been removed]





              New Email names for you!
              Get the Email name you've always wanted on the new @ymail and @rocketmail.
              Hurry before someone else does!
              http://mail.promotions.yahoo.com/newdomains/aa/

              [Non-text portions of this message have been removed]
            • Varra Reddy
              Hi Sunil,   Thank you!   Regards Srinivas ... From: sunil john Subject: Re: MUGH-SQLCON Re: SQL SUBSTRING function: To:
              Message 6 of 6 , Jul 7, 2009
              • 0 Attachment
                Hi Sunil,
                 
                Thank you!
                 
                Regards
                Srinivas

                --- On Tue, 7/7/09, sunil john <suniljk7@...> wrote:


                From: sunil john <suniljk7@...>
                Subject: Re: MUGH-SQLCON Re: SQL SUBSTRING function:
                To: sqlcon@yahoogroups.com
                Date: Tuesday, July 7, 2009, 8:31 AM








                what i did also will work!

                Best Regards

                Sunil John

                ____________ _________ _________ __
                From: Varra Reddy <varra_s@yahoo. com>
                To: sqlcon@yahoogroups. com
                Sent: Tuesday, July 7, 2009 17:51:26
                Subject: Re: MUGH-SQLCON Re: SQL SUBSTRING function:

                Hi All,
                I used different method to get the results..
                here it is:

                Declare @phone varchar(13)
                Set @Phone = '(714)123-1234'
                select substring(@Phone, 6,3) + right(@Phone, 4)

                thanks

                --- On Mon, 7/6/09, sunil john <suniljk7@yahoo. com> wrote:

                From: sunil john <suniljk7@yahoo. com>
                Subject: Re: MUGH-SQLCON Re: SQL SUBSTRING function:
                To: sqlcon@yahoogroups. com
                Date: Monday, July 6, 2009, 11:15 PM

                Dear Srinivas,

                U can use combination of substring and replace function, below is an eg:

                declare @a varchar(200)
                set @a='( 714) 123-1234'
                select @a, replace(substring( @a,8,7),' -','') as ph

                Best Regards

                Sunil John

                ____________ _________ _________ __
                From: Varra Reddy <varra_s@yahoo. com>
                To: sqlcon@yahoogroups. com
                Sent: Tuesday, July 7, 2009 7:56:54
                Subject: MUGH-SQLCON Re: SQL SUBSTRING function:

                Hi,

                I need and output like this:

                My Phone Number is ( 714) 123-1234.

                if I use substring function and the output of my phone numbers is 1231234 ( i mean last 7 numbers only NO - (DASH)
                can anybody do this...

                Srinivas....

                [Non-text portions of this message have been removed]

                Get your preferred Email name!
                Now you can @... and @rocketmail. com.
                http://mail. promotions. yahoo.com/ newdomains/ aa/

                [Non-text portions of this message have been removed]

                [Non-text portions of this message have been removed]

                New Email names for you!
                Get the Email name you've always wanted on the new @ymail and @rocketmail.
                Hurry before someone else does!
                http://mail. promotions. yahoo.com/ newdomains/ aa/

                [Non-text portions of this message have been removed]



















                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.