Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2002
    Posts
    9

    Cool Unanswered: 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!

  2. #2
    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

  3. #3
    Join Date
    Nov 2002
    Posts
    9

    Re: Splitting objects into separate files

    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!

  4. #4
    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 Attached Files

  5. #5
    Join Date
    Nov 2002
    Posts
    9

    Re: Small example

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •