Avatar of Alex Campbell
Alex Campbell
Flag for United States of America asked on

Need another file split into subfiles

This is along the same line as my last question:     2013-11-15 at 17:33:08 ID28295719

In this case, it is one file that is being split into about 380 files.

Each section to be copied out begins with /*Sec and ends with the line before the next /*Sec.

The file should be named Sec-01-01.sql, Sec-01-02.sql, etc.

/*Sec-01-01:Connecting to a Database*/

USE AdventureWorks2008R2;


/*Sec-01-02:Retrieving Specific Columns*/

SELECT  NationalIDNumber,
        LoginID,
        JobTitle
FROM    HumanResources.Employee;


/*Sec-01-03:Retrieving All Columns*/

SELECT  *
FROM    HumanResources.Employee;


/*Sec-01-04:Specifying Rows to Be Returned*/

SELECT  Title,
        FirstName,
        LastName
FROM    Person.Person
WHERE   Title = 'Ms.';

SELECT  Title, 
        FirstName, 
        LastName
FROM  Person.Person 
WHERE Title = 'Ms.' AND 
        LastName = 'Antrim';

Open in new window

Code-w-Sections.txt
Perl

Avatar of undefined
Last Comment
Alex Campbell

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
jb1dev

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Alex Campbell

ASKER
thanks, very good...again
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy