Jump to content


How to extract data from field of value


  • Please log in to reply
1 reply to this topic

#1 arun_cdm

arun_cdm

    Member

  • Members
  • PipPip
  • 92 posts
  • Gender:Male
  • Location:India
  • Interests:i'm interested in networking.

Posted 25 November 2010 - 07:41 PM

Hi all,
In SQL, I want to split the value from a field.
eg: 12345615-11-2010101010

In above sample, i want to split the data into 2 parts.
i.e.: 12345615-11-2010101010 ----> Actual getting data

(123456)-(15-11-2010101010) --> To be splited
Part-1 & Part-2

The first & second part of data is not an exact size, i may vary.

How to split the data into two parts.

Note: am using SQL server 2005 std edition.
  • 0

#2 xpthinker

xpthinker

    VB6/VBScripting/.NET/C#/ASP.NET/SQL Expert

  • Technical Experts
  • PipPipPipPip
  • 841 posts
  • Gender:Male
  • Location:EMEA

Posted 28 February 2011 - 01:23 AM

Hi all,
In SQL, I want to split the value from a field.
eg: 12345615-11-2010101010

In above sample, i want to split the data into 2 parts.
i.e.: 12345615-11-2010101010 ----> Actual getting data

(123456)-(15-11-2010101010) --> To be splited
Part-1 & Part-2

The first & second part of data is not an exact size, i may vary.

How to split the data into two parts.

Note: am using SQL server 2005 std edition.


You need to create your own Scalar-valued function to be able to meet your requirements.
  • 0





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users