New line for Text in a row

Hi Guys 
i have a Row Data with below Text in Sqlserver 2008 
Email:[email protected] University,Bachelors,1986---University of Virginia School of Law,Doctor of Jurisprudence,1991---French,Working---Italan,Fluenty---Phone:zzz zzz zzzz
out put required as new column 
Email:[email protected]
Wesleyan University,Bachelors,1986
University of Virginia School of Law,Doctor of Jurisprudence,1991
French,Working
Italan,Fluenty
Phone:zzz zzz zzzz
Regards
Bhasker 
hi

Hello,
You can also use a UDF to split the text with string and return a table.
--create UDF splitstring()
CREATE FUNCTION dbo.splitstring ( @stringToSplit VARCHAR(MAX),@delimiter nvarchar(10))
RETURNS
@returnList TABLE ([Name] [nvarchar] (500))
AS
BEGIN
DECLARE @name NVARCHAR(255)
DECLARE @pos INT
WHILE CHARINDEX(@delimiter, @stringToSplit)>0
BEGIN
SELECT @pos = CHARINDEX(@delimiter, @stringToSplit)
SELECT @name = SUBSTRING(@stringToSplit, 1, @pos-1)
INSERT INTO @returnList
SELECT @name
SELECT @stringToSplit = SUBSTRING(@stringToSplit, @pos+len(@delimiter), LEN(@stringToSplit)-@pos)
END
INSERT INTO @returnList
SELECT @stringToSplit
RETURN
END
declare @string varchar(MAX)='Email:[email protected] University,Bachelors,1986---University of Virginia School of Law,Doctor of Jurisprudence,1991---French,Working---Italan,Fluenty---Phone:zzz zzz zzzz'
select * from splitstring(@string,'---')
--drop UDF
drop function splitstring
Reference:http://stackoverflow.com/questions/10914576/tsql-split-string
Regards,
Fanny Liu
If you have any feedback on our support, please click here. 
Fanny Liu
TechNet Community Support

Similar Messages

  • Set to new line for each label/text combination ?

    Dear All,
    Wish to enquire how to set to next line for each label/text combination in relation to the following code ? Please advise.
    import java.awt.*;
    public class ScanImageForm {
    public static void main(String args[]) {
         ScanImageForm scanImageForm = new ScanImageForm();
         scanImageForm.Display();
    public void Display() {
         Frame frame = new Frame();
         Panel panel = new Panel();
         frame.add(panel);
         Label labelVehNo = new Label("Vehicle No:");
         Label labelDateofLoss = new Label("Date of Loss:");
         Label labelImageType = new Label("Image Type:");
         Label labelImageDesc = new Label("Image Desc:");
         TextField textVehNo = new TextField();
         TextField textDateofLoss = new TextField();
         TextField textImageType = new TextField();
         TextField textImageDesc = new TextField();
         textVehNo.setColumns(10);          
         textDateofLoss.setColumns(10);
         textImageType.setColumns(10);
         textImageDesc.setColumns(30);
         panel.add(labelVehNo, BorderLayout.WEST);
         panel.add(textVehNo, BorderLayout.CENTER);
         panel.add(labelDateofLoss, BorderLayout.WEST);
         panel.add(textDateofLoss, BorderLayout.CENTER);
         panel.add(labelImageType, BorderLayout.WEST);
         panel.add(textImageType, BorderLayout.CENTER);
         panel.add(labelImageDesc, BorderLayout.WEST);
         panel.add(textImageDesc, BorderLayout.CENTER);
         frame.setSize(500, 500);
         frame.setVisible(true);

    if u want to set label and textfield side by side .
    then u have to set The layout is GridLayout().
    to ur example
    Panel p=new Panel(new GridaLayout(3,2))
    means three rows to columns.

  • Creating a new line for a row layout

    Hi
    i am building a web service based OA page...
    For this i have a created a VO with transient variables which holds the values from webservice.
    Now i have a row layout region where i key in some values which are required to call webservice..
    using this values webservice is called..and object is returned from webservice ,from which vo transient attributes get the values..
    now my requirement is i need to create one more line to key in more rows...at any point of time user can create a new row to query a different item ....or existing item..
    The queried results can be seen in the underlying table region which holds the VO attributes discussed above..
    Please help in this...how to achieve above mentioned functionality...
    If u need more clarifications please write to me...

    If you can provide a screenshot of your page then it will be helpful to understand the problem.
    Cheers
    Ganesh

  • New Line in Text File

    Hi -
    Im using the FileWriter and BufferedWriter classes to output text into a .txt file.
    The text I am writing is taken from another text file using the FileReader and BufferedReader classes.
    The text is reading from the file, and will also output to the new text file, however it won't insert a new line, it only inserts an 'unprintable' character i.e. an empty square
    My code is below - its only starting out so its farily simple at the moment, just reading from one file and outputting to another.
    Is there a way i can get the actual new line/carriage return inserted instead of the empty square. (im running Windows XP)
    Thanks in advance
    import java.io.*;
    public class Pad {
    private String inputPath;
    private String outputPath;
    /** Creates a new instance of Pad */
    public Pad() {
    inputPath = "C:\\OUTBOUND.TXT";
    outputPath = "C:\\04'06.txt";
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    System.out.println("PAD File");
    //Read PAD File
    Pad p = new Pad();
    p.readPADFile(p.inputPath, p.outputPath);
    public void readPADFile(String inputPath, String outputPath)
    inputPath = this.inputPath;
    outputPath = this.outputPath;
    //System.out.println(inputPath);
    int recordCount = 0;
    String record = null;
    try
    FileReader fr = new FileReader(inputPath);
    FileWriter fw = new FileWriter(outputPath);
    BufferedReader br = new BufferedReader(fr);
    BufferedWriter bw = new BufferedWriter(fw);
    record = new String();
    while((record = br.readLine())!=null)
    recordCount++;
    //System.out.println(recordCount + ": " + record);
    bw.write(record + "\n");
    bw.close();
    br.close();
    fw.close();
    fr.close();
    }catch(IOException e)
    System.out.println("IOException Error");
    e.printStackTrace();
    System.out.println(e.toString());
    }

    I assume by using the
    System.getProperty("line.separator") that this will
    work independent of platform.Yes. And using bw.println() instead of bw.print() will already do it for you. So all you need to change in your program are two letters.

  • ??command line for texting to phone number??

    Hi there are few commands on https://support.skype.com/en/faq/FA171/can-i-run-skype-for-windows-desktop-from-the-command-line
    but i am looking command for texting to phone number?

    Hi, Cigilgan, and welcome to the Community,
    Any new command lines would be introduced via an update to the FAQ article you cited.
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Add Empty New Line for ePub Using Adobe InDesign CS5.5

    Hello
    i am new to ePub, i did test ePub to see the possubilities and did great success.
    i am facing one issue i do not how to do that.
    i need to creat empty new line betwwn the title and the body text, i know the hardest way is to make one frame for title and other frame for body, this will take much time to complete the book.
    i tried to add empty lines using the Enter button on my Keyboard, but does not work.
    thanks in advance

    Do you know HTML and CSS? If not, you’re not likely to have much success with EPUB.
    If you do, you’ll need to crack open the epub and change the bottom margin for the title or the top margin for the text.
    Bob

  • HT5449 Cannot Dictate "New Line" for a return key stroke.

    When using dictation I can't get "New Line" to work. It simply types this phrase! The "New Paragraph" command works, but adds all these additional spaces into my text. Has anybody got ideas on how to resolve? Is there another way to dictate a "return key"?

    I understand.
    Perhaps Apple Support in Australia would be willing to answer that one for you.  Their phone number is:
    (61) 1-300-321-456
    Or I wonder if there is some term used in Australia that means "new line" that might work (such as "return").  "Return" does not generate a new line here.

  • Appending to new line in text file

    I am trying to append text to a new line to a file. I set the append parameter to true and I try to output the new line character after I write the string to the file. However it is still appending the next string to the end of the first rather than in the line below. My code is below. Can someone please help me?
    Thanks
    public static boolean WriteToFile(String nameOfFile,
    String contents)
    FileWriter myFileWriter = null;
    try
    System.out.println("Attempting to write text to = " + nameOfFile);
    myFileWriter = new FileWriter(nameOfFile,true);
    myFileWriter.write(contents);
    myFileWriter.write('\n');
    myFileWriter.close();
    return true;
    catch (Exception e)
    System.out.println("EXCEPTION thrown ");
    return false;
    }

    I am trying to append text to a new line to a file.
    I set the append parameter to true and I try to
    o output the new line character after I write the
    string to the file. However it is still appending the
    next string to the end of the first rather than in
    the line below. My code is below. Can someone please
    help me?
    Thanks
    public static boolean WriteToFile(String nameOfFile,
    String
    String
    String contents)
    FileWriter myFileWriter = null;
    try
    System.out.println("Attempting to write
    ting to write text to = " + nameOfFile);
    myFileWriter = new
    eWriter = new FileWriter(nameOfFile,true);
    myFileWriter.write('\n');
    myFileWriter.write(contents); myFileWriter.close();
    return true;
    catch (Exception e)
    System.out.println("EXCEPTION thrown ");
    return false;
    try the change what i have made in bold

  • JTextArea How do I add text on a new line from Text field

    I want to put each new input from the text field at the start of a new line and keep the previous entries at the start of their
    own line.
    I'm doing this but need help with the new line.
    jTextArea1.setLineWrap(true);
    jTextArea1.setWrapStyleWord(true);
    jTextArea1.setEditable(false);
    public void textProcess()
    System.out.println(sourceref1.getSourceText());
    jTextArea1.setText(jTextArea1.getText()+" "+source.getSourceText());
    The above just keeps adding on the new text until I reach the word wrap limit.
    Thanks

    Maybe you should use the escape character. Anyway, you can consider use append(text:String) instead of getText() everytime.
    Eg:
    jTextArea1.append("\n"+source.getSourceText());

  • No new editor for Text elements in Smart forms

    Hello all,
    I've a problem on SAP demo system (version 7.2). When I add new Text element on window then on tab General Attributes I'm only able to see ComboBoxes for "Text Type", "Start", button pencil (for going into fullscreen old editor) and button for checking object. The last thing is that I can also see here label "Use the fullscreen text editor". When I've checked on other systems I saw that instead of that label there is new editor here, and clicking on pencil button leads to new fullscreen editor.
    Does anybody know where I can enforce smartforms builder to use new editor?
    Best regards
    Marcin Cholewczuk

    Hello Marcin,
    Is the text edit portion showing as disabled?
    FYI i don't have MS Office installed on my frontend & in my case the text edit is disabled. Is this the case with you as well
    BR,
    Suhas

  • Create new group for texting

    i am trying to create a new permanent group for texting in the future. surely an iphone 4 will create  and save a specific group of certain people to send texts too later on.. please tell me how to create and SAVE new group?? its really important i figure this out and i appreciate your time and help. thank you

    The only way to create groups for messaging is by sending a message to everyone in the group, and as long as you never erase the messages from the chaat it will always appear in your conversations in the messages app. Unfortuneatly there is no way to organize contacts into groups in any iOS as of now. They will add many new group chat features in iOS8, but you will not be able to upgrade to it when it does come out because you are using an iPhone 4.

  • New line in text-files

    Hallo,
    this I have a problem with writing data in a text-file. How can tell LabVIEW (6.1) to begin a new line in the file?
    I already tried the [carriage return] -- constant, building arrays, building spreadsheat strings from array etc.. Everything wit no success.
    Can anybody of you help me?
    Thanks a lot, Arno

    Send an End of line character to the file. You can find an End of line constant in the string pallette.

  • I Just Added A New Line For My Sister, new # isnt there?

    Well, my family had added another line to our plan. We have ordered her phone already, and completed the whole transaction. Then I went to my verizon account, and I checked all our phone numbers, and the new line we added isn't there? Is the number supposed to show up later on? I have just ordered this morning.

    The same thing just recently happened to me on my account, I received the phone and everything but I couldn't activate it via online or by phone so had to call customer service, they activated right then. Just keep checking your order status online to make sure everything processed fine because it may just be activation issue they are having.

  • Add a new line for grouping similar rows

    As subject, possible to do this using SQL?
    For eg:
    KEY       Description
    1           John
    1           John Smith
    2           Peter
    2           Peter Pan
    to:
    KEY      Description
    1          John
    1          John Smith
    <newline>
    2          Peter
    2          Peter Pan

    With the model clause:
    SQL> with t as (
      2    select 1 KEY, 'John' Description from dual union
      3    select 1 , 'John Smith' from dual union
      4    select 3 , 'Agent' Description from dual union
      5    select 3 , 'Agent Smith' from dual union
      6    select 2 , 'Peter' from dual union
      7    select 2 , 'Peter Pan' from dual)
      8  -- end of sample data
      9  SELECT decode(m, 0, to_char(k), 1, '<newline>') as key, d as description
    10    FROM t
    11   MODEL PARTITION BY (key as k)
    12         DIMENSION BY (description as d)
    13         MEASURES (0 as m)
    14   RULES UPSERT
    15   (m[null] = 1)
    16  /
    KEY                                      DESCRIPTION
    1                                        John
    1                                        John Smith
    <newline>                               
    3                                        Agent
    3                                        Agent Smith
    <newline>                               
    2                                        Peter
    2                                        Peter Pan
    <newline>                               
    9 rows selected
    SQL> If you don't really care about the <newline> string and the key itself will do you can skip the decode and put an explicit ORDER BY as in:
    SELECT k as key, d as description
      FROM t
    MODEL PARTITION BY (key as k)
           DIMENSION BY (description as d)
           MEASURES (0 as m)
    RULES UPSERT
    (m[null] = 1)
    ORDER BY k, dI'm assuming your column description won't have nulls for your key values.

  • Our Ipad type line for text disappears after taking a photo to send and only after a restart

    Hello.  We have two Ipads and two Iphones. Our newest Ipad has an issue with I message. If we take a photo to send by text the type screen and line disappears. The only way to get it back is to shut the device and then the type line returns. We have turned the message off on on with the same result. Our Ipad 2 and both our 4s and 5 phones don't seem to have the issue. Any thoughts? We are also did the icloud update and no change happened. Is this a bug or are we missing something? Messaging works fine until we take a picture then the type bar and keyboard disappear. The taken photo goes to photos.. The only way to get messages to work is to shut off the device and then it works until we try to add another new picture. It seems to work if we use an existing photo from the library.

    This sounds like you may have the camera's "Image Review" option set to "hold".
    When you take a photo, two things normally happen.
    1)  The camera should write the image to your memory card.  You'll know when it's writing to your memeory card because there is a red LED ligth which is active when the camera is using the card.  When the light goes out, the camera is finished.
    2)  The camera can be set to do "Image Review".  By default, when you take an exposure, the camera will display the image on the rear screen for just a few seconds.  But this behavior can be customized.
    Your choices for image review are "Off", 2 seconds, 4 seconds, 8 seconds, or "Hold".  If Off is selected you wont get any image review.  If "Hold" is selected, the image you just took will appear on the rear LCD and will never go away until you manually clear it.  You can just do a half-press of the shutter button to clear it (it wont get in the way of you taking more shots... just ignore it.)
    You can find instructions on this on page 166 of your T3i Instruction Manual which describes how to change this setting.
    Tim Campbell
    5D II, 5D III, 60Da

Maybe you are looking for

  • Additional Fields for Report FBL1

    Dear All I need to add User Name field (USNAM) and few other fields to the layout for report FBL1(Vendor open line items). I have added the field USNAM under "Define Additional Fields for Line Item Display". But the field is still not showing up for

  • How can I copy SOME email folders from an old backup profile

    I have a folder created under one of my accounts named Archive. In it I had subfolders for previous years. I've discovered they are all missing! But I have a full profile backup from months ago, but these previous year folders would still have their

  • Oracle 8i Listener is stopping

    sir, I am working in windows XP with developer 6i and database 8i.My listener is stopping within a second after starting.Can you help me please

  • HT1391 i have a new computer, how do i find my itunes which were on my old computer?

    My old hard drived crashed. I have a new Windows 7. I installed iTunes again. How can I get my old library of songs bought thru iTunes?

  • My PDF bookmarks are displaying weirdly

    My PDF bookmarks are displaying weirdly: they are displaying in blank boxes (apart from the title), rather than as neat single line (or wrapped text) boxes. Also, the left-hand side of the Bookmark column is blank, the bookmark 'thumbnails' are way o