USE [BDS420]
GO

DELETE FROM BerichtElementen
DELETE FROM Elementen
DELETE FROM Waarden
DELETE FROM WaardenDomeinen
DELETE FROM Rubrieken
DELETE FROM Groepen
DELETE FROM Conformiteiten
DELETE FROM Cardinaliteit
DELETE FROM Berichten

/*** DO TABLE BERICHTEN ***/
BULK
INSERT Berichten
FROM 'Y:\Documents\Nictiz\AORTA\branches\Onderhoud_JGZ_v612\DECOR\jgz-csv-develop\CSV420\Berichten.csv'
WITH
(
	FIRSTROW = 2,
	FIELDTERMINATOR = '\t',
	ROWTERMINATOR = '\n',
	DATAFILETYPE = 'widechar',
	KEEPNULLS,
	TABLOCK
)
GO

/*** DO TABLE CARDINALITEIT ***/
BULK
INSERT Cardinaliteit
FROM 'Y:\Documents\Nictiz\AORTA\branches\Onderhoud_JGZ_v612\DECOR\jgz-csv-develop\CSV420\Cardinaliteit.csv'
WITH
(
	FIRSTROW = 2,
	FIELDTERMINATOR = '\t',
	ROWTERMINATOR = '\n',
	DATAFILETYPE = 'widechar',
	KEEPNULLS,
	TABLOCK
)
GO

/*** DO TABLE CONFORMITEITEN ***/
BULK
INSERT Conformiteiten
FROM 'Y:\Documents\Nictiz\AORTA\branches\Onderhoud_JGZ_v612\DECOR\jgz-csv-develop\CSV420\Conformiteiten.csv'
WITH
(
	FIRSTROW = 2,
	FIELDTERMINATOR = '\t',
	ROWTERMINATOR = '\n',
	DATAFILETYPE = 'widechar',
	KEEPNULLS,
	TABLOCK
)
GO

/*** DO TABLE GROEPEN ***/
BULK
INSERT Groepen
FROM 'Y:\Documents\Nictiz\AORTA\branches\Onderhoud_JGZ_v612\DECOR\jgz-csv-develop\CSV420\Groepen.csv'
WITH
(
	FIRSTROW = 2,
	FIELDTERMINATOR = '\t',
	ROWTERMINATOR = '\n',
	DATAFILETYPE = 'widechar',
	KEEPNULLS,
	TABLOCK
)
GO

/*** DO TABLE RUBRIEKEN ***/
BULK
INSERT Rubrieken
FROM 'Y:\Documents\Nictiz\AORTA\branches\Onderhoud_JGZ_v612\DECOR\jgz-csv-develop\CSV420\Rubrieken.csv'
WITH
(
	FIRSTROW = 2,
	FIELDTERMINATOR = '\t',
	ROWTERMINATOR = '\n',
	DATAFILETYPE = 'widechar',
	KEEPNULLS,
	TABLOCK
)
GO

/*** DO TABLE WAARDENDOMEINEN ***/
BULK
INSERT WaardenDomeinen
FROM 'Y:\Documents\Nictiz\AORTA\branches\Onderhoud_JGZ_v612\DECOR\jgz-csv-develop\CSV420\WaardenDomeinen.csv'
WITH
(
	FIRSTROW = 2,
	FIELDTERMINATOR = '\t',
	ROWTERMINATOR = '\n',
	DATAFILETYPE = 'widechar',
	KEEPNULLS,
	TABLOCK
)
GO

/*** DO TABLE WAARDEN ***/
BULK
INSERT Waarden
FROM 'Y:\Documents\Nictiz\AORTA\branches\Onderhoud_JGZ_v612\DECOR\jgz-csv-develop\CSV420\Waarden.csv'
WITH
(
	FIRSTROW = 2,
	FIELDTERMINATOR = '\t',
	ROWTERMINATOR = '\n',
	DATAFILETYPE = 'widechar',
	KEEPNULLS,
	TABLOCK
)
GO

/*** DO TABLE ELEMENTEN ***/
BULK
INSERT Elementen
FROM 'Y:\Documents\Nictiz\AORTA\branches\Onderhoud_JGZ_v612\DECOR\jgz-csv-develop\CSV420\Elementen.csv'
WITH
(
	FIRSTROW = 2,
	FIELDTERMINATOR = '\t',
	ROWTERMINATOR = '\n',
	DATAFILETYPE = 'widechar',
	KEEPNULLS,
	TABLOCK
)
GO

/*** DO TABLE BERICHTELEMENTEN ***/
BULK
INSERT BerichtElementen
FROM 'Y:\Documents\Nictiz\AORTA\branches\Onderhoud_JGZ_v612\DECOR\jgz-csv-develop\CSV420\BerichtElementen.csv'
WITH
(
	FIRSTROW = 2,
	FIELDTERMINATOR = '\t',
	ROWTERMINATOR = '\n',
	DATAFILETYPE = 'widechar',
	KEEPNULLS,
	TABLOCK
)
GO