I have my output in text file which contains 500+ Procedure, Select and Where statements. When I copy this data in excel the output goes to Column A, so I could read column A line by line but I need to separate the text in different sheets.
I want to separate all three statements in different sheets (i.e. - all 'Procedures' in Sheet2, 'Select' statements in Sheet3 and 'Where' in Sheet4).
Excerpts of my data:
PROCEDURE[dbo].[GetSettleData] @AttemptId BIGINT
AS
BEGIN
SELECT Gross AS Amount
,CASE WHEN CustomerID = 0 THEN NULL
WHEN CustomerID = 1 THEN -1
WHEN CustomerID = 2 THEN -2
ELSE CustomerID
END AS CustomerID
,CAST(SubT AS TINYINT) AS SubT
FROM Customer.Table
WHERE AttemptId = @AttemptId;
PROCEDURE [dbo].[GetTransactionRevenueBilling]
@storeId BIGINT
,@endDate DATETIME
,@temporaryIDNumber VARCHAR(50)
AS
BEGIN
BEGIN TRY
I want to separate all three statements in different sheets (i.e. - all 'Procedures' in Sheet2, 'Select' statements in Sheet3 and 'Where' in Sheet4).
Excerpts of my data:
PROCEDURE[dbo].[GetSettleData] @AttemptId BIGINT
AS
BEGIN
SELECT Gross AS Amount
,CASE WHEN CustomerID = 0 THEN NULL
WHEN CustomerID = 1 THEN -1
WHEN CustomerID = 2 THEN -2
ELSE CustomerID
END AS CustomerID
,CAST(SubT AS TINYINT) AS SubT
FROM Customer.Table
WHERE AttemptId = @AttemptId;
PROCEDURE [dbo].[GetTransactionRevenueBilling]
@storeId BIGINT
,@endDate DATETIME
,@temporaryIDNumber VARCHAR(50)
AS
BEGIN
BEGIN TRY