January 9th, 2006, 01:48 PM
Query help (Resolved)
I have a table that has about 70,000 records that i need to create smaller tables from. The table names need to be the distinct value one of the columns.
So column ID has about 50 different distinct values and I need those distinct values to be the name of each of the 50 new tables that contain all the information associated with that ID....first name, last name, street, etc.
Does anyone know of a simple way to create all 50 tables with the ID names and all the information associated with the ID rather than creating and running 50 different queries like this
CREATE TABLE #temp
February 6th, 2006, 11:02 PM
use a normal programming language to do the dynamic scripting, or use exec w/ a variable, in a loop.