[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

double code

Posted on 2012-08-22
3
Medium Priority
?
489 Views
Last Modified: 2012-09-06
Hi,
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"

Thanks,
0
Comment
Question by:sam2929
3 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 2000 total points
ID: 38319845
What do you mean by record coming in?
Have you tried
Select replace(your_column, '"', '""')
From ...
0
 

Expert Comment

by:lhademmor
ID: 38327351
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

Sincerely
  Klavs.
0
 
LVL 27

Expert Comment

by:tliotta
ID: 38333303
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?

Tom
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview
Suggested Courses
Course of the Month19 days, 11 hours left to enroll

872 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