If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > A Matter of Style

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-12-02, 13:45
ExtraLean ExtraLean is offline
Registered User
 
Join Date: Nov 2002
Posts: 9
Cool A Matter of Style

When creating SQL scripts, what methods do you use when working with them?

More specifically:
How do you split the SQL across files? For example, do you put things relating to each table into separate files (table creation, indexes for the table, etc.), or do you group similar things into the same file (all indexes in one file, all table creation in another file, etc.)? Maybe you just have ONE BIG file that contains all the code?

Thanks for your input!
Reply With Quote
  #2 (permalink)  
Old 11-12-02, 16:55
alligatorsql.com alligatorsql.com is offline
Registered User
 
Join Date: Jul 2001
Location: Germany
Posts: 189
Splitting objects into separate files

Hello,

in our projects we split the intitscripts per object into separate file.

f.e. one for sequence
one for tables
and so on

and a upper script that connect to the database with thw correct user and calls the single files.

Hope that helps ?

Manfred Peter
(Alligator Company GmbH)
http://www.alligatorsql.com
Reply With Quote
  #3 (permalink)  
Old 11-12-02, 18:41
ExtraLean ExtraLean is offline
Registered User
 
Join Date: Nov 2002
Posts: 9
Re: Splitting objects into separate files

Quote:
Originally posted by alligatorsql.com
and a upper script that connect to the database with thw correct user and calls the single files.
Ahh... this sounds like a good solution! How exactly do you "call" the individual files? Could you post an example?

Thanks!
Reply With Quote
  #4 (permalink)  
Old 11-13-02, 04:12
alligatorsql.com alligatorsql.com is offline
Registered User
 
Join Date: Jul 2001
Location: Germany
Posts: 189
Small example

Hello,

here is a small example of a batch like we use it. Start the main.sql
in sqlplus. The other script will be called from the main.sql

Hope that help ?

Manfred Peter
(Alligator Company GmbH)
http://www.alligatorsql.com
Attached Files
File Type: zip batch.zip (1.1 KB, 64 views)
Reply With Quote
  #5 (permalink)  
Old 11-13-02, 20:18
ExtraLean ExtraLean is offline
Registered User
 
Join Date: Nov 2002
Posts: 9
Re: Small example

Quote:
Originally posted by alligatorsql.com
Hope that help ?
Thanks! I'll have a look... I appreciate you taking the time to post.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On