/*
 SQL script that loads data for all six tables from their appropriate data files
 Note that the tables are loaded in the order they were created
  so that no foreign key constraint would be violated.
 Modify the data file path on the FROM clause lines with the coorect path (six instances)

 Prabu -- 11/19/03
*/

BULK INSERT company.dbo.[department]
   FROM 'H:\MS_SQL\DynamicSQL\company\data\department.dat'
   WITH 
      (
         FIELDTERMINATOR = '|',
         ROWTERMINATOR = ':\n'
      )

BULK INSERT company.dbo.[employee]
   FROM 'H:\MS_SQL\DynamicSQL\company\data\employee.dat'
   WITH 
      (
         FIELDTERMINATOR = '|',
         ROWTERMINATOR = ':\n'
      )

BULK INSERT company.dbo.[dept_locations]
   FROM 'H:\MS_SQL\DynamicSQL\company\data\dept_locations.dat'
   WITH 
      (
         FIELDTERMINATOR = '|',
         ROWTERMINATOR = ':\n'
      )

BULK INSERT company.dbo.[project]
   FROM 'H:\MS_SQL\DynamicSQL\company\data\project.dat'
   WITH 
      (
         FIELDTERMINATOR = '|',
         ROWTERMINATOR = ':\n'
      )

BULK INSERT company.dbo.[works_on]
   FROM 'H:\MS_SQL\DynamicSQL\company\data\works_on.dat'
   WITH 
      (
         FIELDTERMINATOR = '|',
         ROWTERMINATOR = ':\n'
      )

BULK INSERT company.dbo.[dependent]
   FROM 'H:\MS_SQL\DynamicSQL\company\data\dependent.dat'
   WITH 
      (
         FIELDTERMINATOR = '|',
         ROWTERMINATOR = ':\n'
      )
