Hi I need to split a table consisting of different customers.
I want to execute a query that group the customers identity and then uses this query to create n tables with the customers name as table name and with the right data in it.
Table1
customer;food
Martin; apple
Dan;burger
Tino;banana
Dan; ketchup
Martin; strawberry
So I would want to identify how many customernames i have and group these in a query.
Then create a table with the tablename of the customer including the records belonging to that customer
And it would continue untill all customers has been split into separate tables.
Result!
MartinTbl
Martin;apple
Martin;strawber ry
DanTbl
Dan;ketchup
Dan;burger
....
I have tried to find a solution - and my main objective is to find a solution that creates these tables
I want to execute a query that group the customers identity and then uses this query to create n tables with the customers name as table name and with the right data in it.
Table1
customer;food
Martin; apple
Dan;burger
Tino;banana
Dan; ketchup
Martin; strawberry
So I would want to identify how many customernames i have and group these in a query.
Then create a table with the tablename of the customer including the records belonging to that customer
And it would continue untill all customers has been split into separate tables.
Result!
MartinTbl
Martin;apple
Martin;strawber ry
DanTbl
Dan;ketchup
Dan;burger
....
I have tried to find a solution - and my main objective is to find a solution that creates these tables
Comment