10.07.2015 Views

Tun SQL – Data Access - Esker

Tun SQL – Data Access - Esker

Tun SQL – Data Access - Esker

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating tables from an existing pair of C-ISAM filesTo create a table in a database for which the C-ISAM .dat and .idx filepair already exists, enter the following statement in the lower pane(Input window) which has the database name as its title:define table tablename file is filename (field1type1, field2 type2,..., primary key(field1)));This statement creates a table with the name "tablename" from theexisting files filename.dat and filename.idx.Important note:Before using the table (for example, before you use select statements onthe table), you must copy the files specified by the file is keywords intothe database directory.The define statement, however, can be executed even if the files haven'tyet been copied to this directory. It's even recommended not to copythe files until you execute the create index statement, if you want tocreate an index for the table." Creating an indexTo create an index for one through eight columns in a table, enter thefollowing statement in the lower pane (Input window), which has thedatabase name as a title:create unique index indexname on tablename (field1,field3);This statement creates the index "indexname" for columns field1 andfield3 in the table "tablename"." C StructuresEach statement passed to sqltools is translated into C code for the C-ISAM file system. To view the corresponding C structure for a table,choose Catalog#GetCStruct.3 - 42 <strong>Data</strong> <strong>Access</strong> !

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!