-3

I want add quotation before and after every single line of the query I am working on. I can do it manually by going through each line but it is about 950 lines long and it will take forever to add quotes. Is there any way around to add the quotation easily by using Notepad++ or other editor?

Example-

SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
INNER JOIN Orders
ON Customers.CustomerID=Orders.CustomerID
ORDER BY Customers.CustomerName;

I want:

"SELECT Customers.CustomerName, Orders.OrderID "&

"FROM Customers "&

"INNER JOIN Orders "&

"ON Customers.CustomerID=Orders.CustomerID "&

"ORDER BY Customers.CustomerName; "

I am using DB2 database and need to create an SSRS report.

Thanks

1 Answers1

0

You can do follow the following steps-

1)Put your code in Notepad++.

2)Go to left corner of first line

3)Press Shift+Alt and down-arrow till the end of line.(to the line you want " mark)

that will make your code like this

"SELECT Customers.CustomerName, Orders.OrderID "FROM Customers
"INNER JOIN Orders
"ON Customers.CustomerID=Orders.CustomerID
"ORDER BY Customers.CustomerName;

4) After that select end of fist line blank space to send line fist character that to " mark. 5)Press ctrl+F

6)Click on Replace tab

7)Put in Replace with section "&

which will result to look like such type of code

"SELECT Customers.CustomerName, Orders.OrderID"&

"FROM Customers "&

"INNER JOIN Orders "&

"ON Customers.CustomerID=Orders.CustomerID "&

"ORDER BY Customers.CustomerName; "&