![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Split a file into multiple files | glamo_2312 | Shell Programming and Scripting | 3 | 09-15-2008 09:58 AM |
| Split file into multiple files depending upon first 4 digits | deepakgang | Shell Programming and Scripting | 4 | 04-09-2008 01:21 AM |
| Executing Multiple .SQL Files from Single Shell Script file | anushilrai | Shell Programming and Scripting | 3 | 04-07-2008 10:09 AM |
| Help Needed : Split one big file to multiple files | monicasgupta | Shell Programming and Scripting | 5 | 03-03-2008 07:09 PM |
| how to divide single large log file into multiple files. | kamleshm | Shell Programming and Scripting | 1 | 01-15-2008 07:33 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
split a single sql file into multiple files
Hi,I have a single sql file containing many create table ddl's.Example:
CREATE TABLE sec_afs ( rpt_per_typ_c char(1) NOT NULL, rpt_per_typ_t varchar(20) NULL, LOCK ALLPAGES go EXEC sp_primarykey 'sec_afs', rpt_per_typ_c go GRANT SELECT ON sec_afs TO developer_read_only go CREATE TABLE dbo.sec_iccc ( user_nt_id_c char(16) NOT NULL, unit_id_c char(4) NOT NULL ) LOCK ALLPAGES go GRANT SELECT ON sec_iccc TO developer_read_only go CREATE TABLE sac_recon( rec_number int NOT NULL, rec_grp_number int NOT NULL, ) go I want to split this file into separate files-one each for a table,i have a blank line before every "create table"statement.So may be I can create a new file once every "create table" is encountered.Please tell me how to do this in unix.-Thanks |
| Bookmarks |
| Tags |
| multiple files, split, unix |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|