generating a "sample" database from SQL server?
Posted on 2013-01-20
I hope someone may be able to help me with this. I have a large database in SQL server with a dozen or more tables, and I want to create a small subset of that database such that -
(1) it contains only a subset of the tables, not all tables in the original SQL database;
(2) it contains only a random sample of the records, with the criteria that I'd specify (e.g. taskId = 1235 or taskId = 1354 or ...); and
(3) for tables that do not contain taskId as a field, it should be able to pull the records related to the taskId's that I specified (i.e. a 'join' operation).
Will this be possible, by any chance? If you can provide some pseudo codes (or sample SQL scripts), I'd really appreciate it.
Thank you very much!