Re: [GENERAL] Moving Specific Data Across Schemas Including FKs

2015-04-23 Thread Jim Nasby
On 4/23/15 1:08 PM, Raymond O'Donnell wrote: What I am trying to figure out is that if I also have other relations >that have foreign keys into the data I am moving, how would I also move >the data from those relations and maintain the FK integrity? I'd create the tables in the new schema withou

Re: [GENERAL] Moving Specific Data Across Schemas Including FKs

2015-04-23 Thread Raymond O'Donnell
On 23/04/2015 19:08, Raymond O'Donnell wrote: > On 23/04/2015 18:09, Cory Tucker wrote: >> I have the need to move a specific set of data from one schema to >> another. These schemas are on the same database instance and have all >> of the same relations defined. The SQL to copy data from one tab

Re: [GENERAL] Moving Specific Data Across Schemas Including FKs

2015-04-23 Thread Raymond O'Donnell
On 23/04/2015 18:09, Cory Tucker wrote: > I have the need to move a specific set of data from one schema to > another. These schemas are on the same database instance and have all > of the same relations defined. The SQL to copy data from one table is > relatively straightforward: > > INSERT INT

Re: [GENERAL] Moving Specific Data Across Schemas Including FKs

2015-04-23 Thread Cory Tucker
On Thu, Apr 23, 2015 at 10:27 AM Steve Atkins wrote: > > On Apr 23, 2015, at 10:09 AM, Cory Tucker wrote: > > > I have the need to move a specific set of data from one schema to > another. These schemas are on the same database instance and have all of > the same relations defined. The SQL to

Re: [GENERAL] Moving Specific Data Across Schemas Including FKs

2015-04-23 Thread Steve Atkins
On Apr 23, 2015, at 10:09 AM, Cory Tucker wrote: > I have the need to move a specific set of data from one schema to another. > These schemas are on the same database instance and have all of the same > relations defined. The SQL to copy data from one table is relatively > straightforward:

[GENERAL] Moving Specific Data Across Schemas Including FKs

2015-04-23 Thread Cory Tucker
I have the need to move a specific set of data from one schema to another. These schemas are on the same database instance and have all of the same relations defined. The SQL to copy data from one table is relatively straightforward: INSERT INTO schema_b.my_table SELECT * FROM schema_a.my_table W