double code

Posted on 2012-08-22
Last Modified: 2012-09-06
I have record coming as below in as below
"123", "T120 20" TFT Monitors" ,"KBC"
"234"," My name is sam","ABC"

i want to double code to be doubled something like below See double quote after "20":

"123", "T120 20"" TFT Monitors" ,"KBC"
"234"," My name is sam","ABC"

Question by:sam2929
    LVL 37

    Accepted Solution

    What do you mean by record coming in?
    Have you tried
    Select replace(your_column, '"', '""')
    From ...

    Expert Comment

    If the first part of line tells something about the next part then use regular expresions.
    EG if 123 always means a product and 234 means an name. The just copy the name line as is like in Your example and use re's to find point of separation and then add the ". An easier to understand but slower way is to char run the line and then add the " when at the seperation point.

    If this is not usefull to You i would guess that people in here would like a little more info on You problem :-) eg give a bit larger examble

    LVL 26

    Expert Comment

    Is this a specific record? Or is it an example of records that have just a single unmatched double-quote in the 2nd field? Is it always the 2nd field?


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
    Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now