Hi Guys,
Whats going to be the easiest way to migrate my data in the following situation:
Table A: ANIMAL
ANIMAL_ID (PK,IDENTITY)
CAT_NAME
DOG_NAME
BIRD_NAME
FISH_NAME
Table B: ANIMAL_NEW
ANIMAL_ID (PK,IDENTITY)
ANIMAL_TYPE(INT)
ANIMAL_NAME
I've changed the design, so instead of having 4 of the same table columns, I introduced an ANIMAL_TYPE
Column, which will be an enum {Cat=0, Dog=1, Bird=2, Fish=3}...
Whats the quickest way to migrate the data, taking into account that if CAT_NAME
or DOG_NAME
is empty, that no record should be created in the new table.
Thanks