Options

Foreign keys from another database?

Is it possible to select foreign key values from tables in another database? Something to customize with a select? Because we have many datatables shifted into a main database.

Thanks for help,

Michael Kriegner

Comments

  • Options
    I have sent you a PM asking for further information on your exact requirements.
  • Options
    SQL Data Generator is quite a powerful tool out of the box and even more so with the embedded IronRuby generator.

    (see: http://www.simple-talk.com/content/arti ... rticle=697)
  • Options
    I have the same requirement to Select foreign key values from tables in another database? Is there a way?
  • Options
    I would like to second the original posters request about making this tool "multi-database" aware. Our primary business system is made up of 10 databases total, one stores client info, 3 store financial records from three different entities that operate under the umbrella of our company and another stores standard reference information. I attempted to generate some test data. We use triggers to enforce foreign key relationships across database boundaries (we use declarative foreign key constraints when the tables are both in the same database). I was unable to use this tool because of this aspect of our architecture.
  • Options
    You can do this with a little leg work. If a foreign key constraint has been defined on the column, SDG does not allow selection of a different generator. In this case, you would need to drop the constraint before loading the schema into SDG. You could create an "after" script to recreate the constraint within SDG.

    Once the constraint is removed (or if it wasn't there in the first place) then you are free to use the "SQL Statement" generator to connect to any database and get any values you want for population.
Sign In or Register to comment.