Ryan,
You are saying: 'Instead I want to copy this list so that all I have to do is add single quotes around each record'.
It is not clear how your list is formated.
Let's assume you have the list like this (comma separated values)
N1, A
N1, B
N1, C
What you can do is:
- Copy/paste the list to SQL Server Management Studio
Run some replacements using regular expressions:
- hit Ctrl+H to open 'Find and Replace' dialog
- in Find Options select Use 'Regular expressions'
- Find what: [^] Replace with: [('] Hit 'Replace All'
Don't type square parenthesis in. I used them to make sure you could see the spaces!
- Find what: [$] Replace with: ['),] Hit 'Replace All'
- Find what: [, ] Replace with: [', '] Hit 'Replace All'
- Remove the last redundant comma
You will end up with the list like this:
('N1', 'A'),
('N1', 'B'),
('N1', 'C')
Then add insert statement at the top of the script :
insert into CT_ProductFaiures (Old_Modes, New_Modes)
values
So in the result you have this
insert into CT_ProductFaiures (Old_Modes, New_Modes)
values
('N1', 'A'),
('N1', 'B'),
('N1', 'C')
Hope that this is what you needed.
[Edited]
I'm sorry, didn't pay attention.
So list is formatted like this: A, B, C, D.
Then you just replace [,] with ['), ('N1', '] without any regular expressions.
Also, fix starting and ending value manually.