LOAD TABLE:

This SQL command is used to import data into a database table from an ascii-format file. The syntax for the command is

LOAD TABLE "creator"."table-name"

FROM 'file-name string'

FORMAT 'ascii' DELIMITED BY 'string'

 

The exact command I used in the project was

LOAD TABLE "DBA"."patient"

FROM 'F:\\kashef\\patient.txt'

FORMAT 'ascii' DELIMITED BY '~'

 

Additional Notes

  1. For the file-name string make sure you use double back slashes \\ instead of one \

  2. For the string after DELIMITED BY, you should include single quote ' around the character string

  3. The name of the table creator is optional

Back to the homepage