Hex Artifact Content
Not logged in

Artifact 6301be65aadd141a627a41499f355e3f12e9d8fb:

Wiki page [Virtual Tables (misc)] by sandro 2018-08-22 08:55:52.
0000: 44 20 32 30 31 38 2d 30 38 2d 32 32 54 30 38 3a  D 2018-08-22T08:
0010: 35 35 3a 35 32 2e 32 37 36 0a 4c 20 56 69 72 74  55:52.276.L Virt
0020: 75 61 6c 5c 73 54 61 62 6c 65 73 5c 73 28 6d 69  ual\sTables\s(mi
0030: 73 63 29 0a 50 20 63 31 34 66 65 31 64 39 30 65  sc).P c14fe1d90e
0040: 33 32 33 38 65 36 36 64 38 63 35 65 31 62 31 36  3238e66d8c5e1b16
0050: 39 30 61 35 30 63 33 31 36 65 38 64 33 30 0a 55  90a50c316e8d30.U
0060: 20 73 61 6e 64 72 6f 0a 57 20 31 33 32 31 30 0a   sandro.W 13210.
0070: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f  <a href="https:/
0080: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74  /www.gaia-gis.it
0090: 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69  /fossil/libspati
00a0: 61 6c 69 74 65 2f 68 6f 6d 65 22 3e 62 61 63 6b  alite/home">back
00b0: 20 74 6f 20 6d 61 69 6e 20 70 61 67 65 3c 2f 61   to main page</a
00c0: 3e 0d 0a 3c 68 31 3e 56 69 72 74 75 61 6c 53 68  >..<h1>VirtualSh
00d0: 61 70 65 3c 2f 68 31 3e 0d 0a 54 68 65 20 3c 62  ape</h1>..The <b
00e0: 3e 56 69 72 74 75 61 6c 53 68 61 70 65 3c 2f 62  >VirtualShape</b
00f0: 3e 20 49 6e 74 65 72 66 61 63 65 20 61 6c 6c 6f  > Interface allo
0100: 77 73 20 74 6f 20 64 69 72 65 63 74 6c 79 20 61  ws to directly a
0110: 63 63 65 73 73 20 61 6e 20 65 78 74 65 72 6e 61  ccess an externa
0120: 6c 20 53 68 61 70 65 46 69 6c 65 20 62 79 20 75  l ShapeFile by u
0130: 73 69 6e 67 20 73 74 61 6e 64 61 72 64 20 53 70  sing standard Sp
0140: 61 74 69 61 6c 20 53 51 4c 20 71 75 65 72 69 65  atial SQL querie
0150: 73 2e 3c 62 72 3e 0d 0a 53 79 6e 74 61 78 20 66  s.<br>..Syntax f
0160: 6f 72 20 63 72 65 61 74 69 6e 67 20 61 20 56 69  or creating a Vi
0170: 72 74 75 61 6c 53 68 61 70 65 20 54 61 62 6c 65  rtualShape Table
0180: 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53  :..<verbatim>..S
0190: 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49 52  ELECT CREATE VIR
01a0: 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74 61  TUAL TABLE my_ta
01b0: 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75 61  ble USING Virtua
01c0: 6c 53 68 61 70 65 20 28 20 73 68 70 5f 70 61 74  lShape ( shp_pat
01d0: 68 20 2c 20 63 68 61 72 73 65 74 5f 65 6e 63 6f  h , charset_enco
01e0: 64 69 6e 67 20 2c 20 73 72 69 64 20 29 3b 0d 0a  ding , srid );..
01f0: 0d 0a 53 45 4c 45 43 54 20 43 52 45 41 54 45 20  ..SELECT CREATE 
0200: 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79  VIRTUAL TABLE my
0210: 5f 74 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72  _table USING Vir
0220: 74 75 61 6c 53 68 61 70 65 20 28 20 73 68 70 5f  tualShape ( shp_
0230: 70 61 74 68 20 2c 20 63 68 61 72 73 65 74 5f 65  path , charset_e
0240: 6e 63 6f 64 69 6e 67 20 2c 20 73 72 69 64 20 2c  ncoding , srid ,
0250: 20 74 65 78 74 5f 64 61 74 65 73 20 29 3b 0d 0a   text_dates );..
0260: 0d 0a 53 45 4c 45 43 54 20 43 52 45 41 54 45 20  ..SELECT CREATE 
0270: 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79  VIRTUAL TABLE my
0280: 5f 74 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72  _table USING Vir
0290: 74 75 61 6c 53 68 61 70 65 20 28 20 73 68 70 5f  tualShape ( shp_
02a0: 70 61 74 68 20 2c 20 63 68 61 72 73 65 74 5f 65  path , charset_e
02b0: 6e 63 6f 64 69 6e 67 20 2c 20 73 72 69 64 20 2c  ncoding , srid ,
02c0: 20 74 65 78 74 5f 64 61 74 65 73 20 2c 20 63 6f   text_dates , co
02d0: 6c 6e 61 6d 65 5f 63 61 73 65 20 29 3b 0d 0a 3c  lname_case );..<
02e0: 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 53 75 70 70  /verbatim>..Supp
02f0: 6f 72 74 65 64 20 61 72 67 75 6d 65 6e 74 73 20  orted arguments 
0300: 61 6e 64 20 74 68 65 69 72 20 69 6e 74 65 72 70  and their interp
0310: 72 65 74 61 74 69 6f 6e 3a 0d 0a 3c 75 6c 3e 0d  retation:..<ul>.
0320: 0a 3c 6c 69 3e 3c 62 3e 73 68 70 5f 70 61 74 68  .<li><b>shp_path
0330: 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6d 61 6e 64  </b> (<i><b>mand
0340: 61 74 6f 72 79 3c 2f 62 3e 3c 2f 69 3e 29 3a 20  atory</b></i>): 
0350: 74 68 65 20 72 65 6c 61 74 69 76 65 20 6f 72 20  the relative or 
0360: 61 62 73 6f 6c 75 74 65 20 70 61 74 68 6e 61 6d  absolute pathnam
0370: 65 20 6c 65 61 64 69 6e 67 20 74 6f 20 74 68 65  e leading to the
0380: 20 65 78 74 65 72 6e 61 6c 20 53 68 61 70 65 66   external Shapef
0390: 69 6c 65 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e  ile...<ul>..<li>
03a0: 3c 62 3e 4e 6f 74 65 3c 2f 62 3e 3a 20 61 6e 79  <b>Note</b>: any
03b0: 20 53 68 61 70 65 66 69 6c 65 20 72 65 71 75 69   Shapefile requi
03c0: 72 65 73 20 61 74 20 6c 65 61 73 74 20 74 68 72  res at least thr
03d0: 65 65 20 69 6e 64 69 76 69 64 75 61 6c 20 6d 65  ee individual me
03e0: 6d 62 65 72 73 20 73 68 61 72 69 6e 67 20 74 68  mbers sharing th
03f0: 65 20 73 61 6d 65 20 62 61 73 65 20 6e 61 6d 65  e same base name
0400: 20 62 75 74 20 77 69 74 68 20 64 69 66 66 65 72   but with differ
0410: 65 6e 74 20 73 75 66 66 69 78 65 73 20 28 3c 69  ent suffixes (<i
0420: 3e 2a 2e 73 68 70 3c 2f 69 3e 2c 20 3c 69 3e 2a  >*.shp</i>, <i>*
0430: 2e 73 68 78 3c 2f 69 3e 20 61 6e 64 20 3c 69 3e  .shx</i> and <i>
0440: 2a 2e 64 62 66 3c 2f 69 3e 29 2e 3c 62 72 3e 0d  *.dbf</i>).<br>.
0450: 0a 41 6c 6c 20 73 75 66 66 69 78 65 73 20 77 69  .All suffixes wi
0460: 6c 6c 20 62 65 20 61 75 74 6f 6d 61 74 69 63 61  ll be automatica
0470: 6c 6c 79 20 68 61 6e 64 6c 65 64 20 62 79 20 56  lly handled by V
0480: 69 72 74 75 61 6c 53 68 61 70 65 2c 20 61 6e 64  irtualShape, and
0490: 20 63 6f 6e 73 65 71 75 65 6e 74 6c 79 20 74 68   consequently th
04a0: 65 20 3c 62 3e 73 68 70 5f 70 61 74 68 3c 2f 62  e <b>shp_path</b
04b0: 3e 20 61 72 67 75 6d 65 6e 74 20 3c 62 3e 3c 75  > argument <b><u
04c0: 3e 3c 69 3e 6d 75 73 74 20 6e 6f 74 20 73 70 65  ><i>must not spe
04d0: 63 69 66 79 20 61 6e 79 20 70 72 65 66 69 78 3c  cify any prefix<
04e0: 2f 69 3e 3c 2f 75 3e 3c 2f 62 3e 2c 20 6a 75 73  /i></u></b>, jus
04f0: 74 20 74 68 65 20 62 61 72 65 20 62 61 73 65 20  t the bare base 
0500: 70 61 74 68 20 6d 75 73 74 20 62 65 20 70 61 73  path must be pas
0510: 73 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  sed.</li>..</ul>
0520: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 63 68  </li>..<li><b>ch
0530: 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67 3c 2f  arset_encoding</
0540: 62 3e 20 28 3c 69 3e 3c 62 3e 6d 61 6e 64 61 74  b> (<i><b>mandat
0550: 6f 72 79 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 63 61  ory</b></i>): ca
0560: 6e 6f 6e 69 63 61 6c 20 6e 61 6d 65 20 6f 66 20  nonical name of 
0570: 74 68 65 20 63 68 61 72 73 65 74 20 65 6e 63 6f  the charset enco
0580: 64 69 6e 67 20 61 64 6f 70 74 65 64 20 62 79 20  ding adopted by 
0590: 74 68 65 20 3c 62 3e 44 42 46 3c 2f 62 3e 20 6d  the <b>DBF</b> m
05a0: 65 6d 62 65 72 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c  ember...<ul>..<l
05b0: 69 3e 45 78 61 6d 70 6c 65 73 20 6f 66 20 76 61  i>Examples of va
05c0: 6c 69 64 20 6e 61 6d 65 73 20 61 72 65 3a 20 3c  lid names are: <
05d0: 62 3e 41 53 43 49 49 3c 2f 62 3e 2c 20 3c 62 3e  b>ASCII</b>, <b>
05e0: 55 54 46 2d 38 3c 2f 62 3e 2c 20 3c 62 3e 43 50  UTF-8</b>, <b>CP
05f0: 38 35 30 3c 2f 62 3e 2c 20 3c 62 3e 49 53 4f 2d  850</b>, <b>ISO-
0600: 38 38 34 39 2d 31 3c 2f 62 3e 3c 2f 6c 69 3e 0d  8849-1</b></li>.
0610: 0a 3c 6c 69 3e 59 6f 75 20 63 61 6e 20 63 68 65  .<li>You can che
0620: 63 6b 20 74 68 65 20 66 75 6c 6c 20 6c 69 73 74  ck the full list
0630: 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20 63 68   of supported ch
0640: 61 72 73 65 74 20 65 6e 63 6f 64 69 6e 67 73 20  arset encodings 
0650: 66 72 6f 6d 20 3c 61 20 68 72 65 66 3d 22 68 74  from <a href="ht
0660: 74 70 73 3a 2f 2f 77 77 77 2e 67 6e 75 2e 6f 72  tps://www.gnu.or
0670: 67 2f 73 6f 66 74 77 61 72 65 2f 6c 69 62 69 63  g/software/libic
0680: 6f 6e 76 2f 22 3e 68 65 72 65 3c 2f 61 3e 2e 3c  onv/">here</a>.<
0690: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e  /li>..</ul></li>
06a0: 0d 0a 3c 6c 69 3e 3c 62 3e 73 72 69 64 3c 2f 62  ..<li><b>srid</b
06b0: 3e 20 28 3c 69 3e 3c 62 3e 6d 61 6e 64 61 74 6f  > (<i><b>mandato
06c0: 72 79 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 74 68 65  ry</b></i>): the
06d0: 20 53 52 49 44 20 76 61 6c 75 65 20 6f 66 20 61   SRID value of a
06e0: 6c 6c 20 47 65 6f 6d 65 74 72 69 65 73 20 77 69  ll Geometries wi
06f0: 74 68 69 6e 20 74 68 65 20 53 68 61 70 65 66 69  thin the Shapefi
0700: 6c 65 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 45  le...<ul>..<li>E
0710: 78 61 6d 70 6c 65 73 20 6f 66 20 76 61 6c 69 64  xamples of valid
0720: 20 53 52 49 44 20 76 61 6c 75 65 73 20 61 72 65   SRID values are
0730: 3a 20 3c 62 3e 34 33 32 36 3c 2f 62 3e 2c 20 3c  : <b>4326</b>, <
0740: 62 3e 33 30 30 33 3c 2f 62 3e 2c 20 3c 62 3e 33  b>3003</b>, <b>3
0750: 32 36 33 32 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c  2632</b></li>..<
0760: 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c  /ul></li>..<li><
0770: 62 3e 74 65 78 74 5f 64 61 74 65 73 3c 2f 62 3e  b>text_dates</b>
0780: 20 28 3c 69 3e 3c 62 3e 6f 70 74 69 6f 6e 61 6c   (<i><b>optional
0790: 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 74 68 69 73 20  </b></i>): this 
07a0: 69 73 20 61 20 3c 62 3e 42 4f 4f 4c 45 41 4e 3c  is a <b>BOOLEAN<
07b0: 2f 62 3e 20 66 6c 61 67 3a 0d 0a 3c 75 6c 3e 0d  /b> flag:..<ul>.
07c0: 0a 3c 6c 69 3e 69 66 20 73 65 74 20 74 6f 20 3c  .<li>if set to <
07d0: 62 3e 30 3c 2f 62 3e 20 28 3c 62 3e 46 41 4c 53  b>0</b> (<b>FALS
07e0: 45 3c 2f 62 3e 29 20 61 6c 6c 20 66 69 65 6c 64  E</b>) all field
07f0: 73 20 6f 66 20 74 68 65 20 3c 62 3e 44 41 54 45  s of the <b>DATE
0800: 3c 2f 62 3e 20 74 79 70 65 20 77 69 6c 6c 20 62  </b> type will b
0810: 65 20 72 65 70 72 65 73 65 6e 74 65 64 20 61 73  e represented as
0820: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a   <a href="https:
0830: 2f 2f 77 77 77 2e 73 71 6c 69 74 65 2e 6f 72 67  //www.sqlite.org
0840: 2f 6c 61 6e 67 5f 64 61 74 65 66 75 6e 63 2e 68  /lang_datefunc.h
0850: 74 6d 6c 22 3e 6a 75 6c 69 61 6e 20 64 61 74 65  tml">julian date
0860: 73 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  s</a></li>..<li>
0870: 69 66 20 73 65 74 20 74 6f 20 61 6e 79 20 6f 74  if set to any ot
0880: 68 65 72 20 69 6e 74 65 67 65 72 20 76 61 6c 75  her integer valu
0890: 65 20 28 3c 62 3e 54 52 55 45 3c 2f 62 3e 29 20  e (<b>TRUE</b>) 
08a0: 61 6c 6c 20 66 69 65 6c 64 73 20 6f 66 20 74 68  all fields of th
08b0: 65 20 3c 62 3e 44 41 54 45 3c 2f 62 3e 20 74 79  e <b>DATE</b> ty
08c0: 70 65 20 77 69 6c 6c 20 62 65 20 72 65 70 72 65  pe will be repre
08d0: 73 65 6e 74 65 64 20 61 73 20 54 65 78 74 20 53  sented as Text S
08e0: 74 72 69 6e 67 73 20 61 73 20 65 2e 67 2e 20 3c  trings as e.g. <
08f0: 62 3e 32 30 31 38 2d 30 38 2d 32 31 3c 2f 62 3e  b>2018-08-21</b>
0900: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 66 20 6e 6f  </li>..<li>if no
0910: 74 20 65 78 70 6c 69 63 69 74 6c 79 20 73 70 65  t explicitly spe
0920: 63 69 66 69 65 64 2c 20 3c 62 3e 54 52 55 45 3c  cified, <b>TRUE<
0930: 2f 62 3e 20 77 69 6c 6c 20 61 6c 77 61 79 73 20  /b> will always 
0940: 62 65 20 61 73 73 75 6d 65 64 20 28 64 65 66 61  be assumed (defa
0950: 75 6c 74 20 73 65 74 74 69 6e 67 29 2e 3c 2f 6c  ult setting).</l
0960: 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a  i>..</ul></li>..
0970: 3c 6c 69 3e 3c 62 3e 63 6f 6c 6e 61 6d 65 5f 63  <li><b>colname_c
0980: 61 73 65 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6f  ase</b> (<i><b>o
0990: 70 74 69 6f 6e 61 6c 3c 2f 62 3e 3c 2f 69 3e 29  ptional</b></i>)
09a0: 3a 20 74 68 69 73 20 61 72 67 75 6d 65 6e 74 20  : this argument 
09b0: 73 70 65 63 69 66 69 65 73 20 69 66 20 61 6c 6c  specifies if all
09c0: 20 63 6f 6c 75 6d 6e 20 6e 61 6d 65 73 20 73 68   column names sh
09d0: 6f 75 6c 64 20 62 65 20 63 6f 6e 73 69 64 65 72  ould be consider
09e0: 65 64 20 75 70 70 65 72 63 61 73 65 20 6f 72 20  ed uppercase or 
09f0: 6c 6f 77 65 72 63 61 73 65 2e 3c 62 72 3e 0d 0a  lowercase.<br>..
0a00: 56 61 6c 69 64 20 73 65 74 74 69 6e 67 73 20 61  Valid settings a
0a10: 72 65 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c  re:..<ul>..<li><
0a20: 62 3e 75 70 70 65 72 63 61 73 65 3c 2f 62 3e 20  b>uppercase</b> 
0a30: 6f 72 20 3c 62 3e 75 70 70 65 72 3c 2f 62 3e 3a  or <b>upper</b>:
0a40: 20 61 6c 6c 20 63 6f 6c 75 6d 6e 20 6e 61 6d 65   all column name
0a50: 73 20 77 69 6c 6c 20 62 65 20 66 75 6c 6c 79 20  s will be fully 
0a60: 63 61 70 69 74 61 6c 69 7a 65 64 2e 3c 2f 6c 69  capitalized.</li
0a70: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 6c 6f 77 65 72 63  >..<li><b>lowerc
0a80: 61 73 65 3c 2f 62 3e 20 6f 72 20 3c 62 3e 6c 6f  ase</b> or <b>lo
0a90: 77 65 72 3c 2f 62 3e 3a 20 61 6c 6c 20 63 6f 6c  wer</b>: all col
0aa0: 75 6d 6e 20 6e 61 6d 65 73 20 77 69 6c 6c 20 62  umn names will b
0ab0: 65 20 66 75 6c 6c 20 6c 6f 77 65 72 63 61 73 65  e full lowercase
0ac0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 73  .</li>..<li><b>s
0ad0: 61 6d 65 63 61 73 65 3c 2f 62 3e 20 6f 72 20 3c  amecase</b> or <
0ae0: 62 3e 73 61 6d 65 3c 2f 62 3e 3a 20 61 6c 6c 20  b>same</b>: all 
0af0: 63 6f 6c 75 6d 6e 20 6e 61 6d 65 73 20 77 69 6c  column names wil
0b00: 6c 20 62 65 20 65 78 61 63 74 6c 79 20 70 72 65  l be exactly pre
0b10: 73 65 72 76 65 64 20 61 73 20 74 68 65 79 20 61  served as they a
0b20: 72 65 20 64 65 66 69 6e 65 64 20 69 6e 74 6f 20  re defined into 
0b30: 74 68 65 20 44 42 46 20 6d 65 6d 65 62 65 72 2e  the DBF memeber.
0b40: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 66 20 6e 6f  </li>..<li>if no
0b50: 74 20 73 70 65 63 69 66 69 65 64 2c 20 6f 72 20  t specified, or 
0b60: 69 66 20 61 6e 79 20 6f 74 68 65 72 20 64 65 66  if any other def
0b70: 69 6e 69 74 69 6f 6e 20 64 65 66 69 6e 69 74 69  inition definiti
0b80: 6f 6e 20 69 73 20 66 6f 75 6e 64 2c 20 3c 62 3e  on is found, <b>
0b90: 6c 6f 77 65 72 63 61 73 65 3c 2f 62 3e 20 77 69  lowercase</b> wi
0ba0: 6c 6c 20 61 6c 77 61 79 73 20 62 65 20 61 73 73  ll always be ass
0bb0: 75 6d 65 64 20 28 64 65 66 61 75 6c 74 20 73 65  umed (default se
0bc0: 74 74 69 6e 67 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f  tting).</li>..</
0bd0: 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c  ul></li>..</ul><
0be0: 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 62 67 63 6f  br>..<table bgco
0bf0: 6c 6f 72 3d 22 23 66 66 66 66 64 30 22 20 63 65  lor="#ffffd0" ce
0c00: 6c 6c 70 61 64 64 69 6e 67 3d 22 31 38 22 3e 3c  llpadding="18"><
0c10: 74 72 3e 3c 74 64 3e 0d 0a 3c 62 3e 4e 6f 74 65  tr><td>..<b>Note
0c20: 3c 2f 62 3e 3a 20 71 75 6f 74 69 6e 67 20 6f 72  </b>: quoting or
0c30: 20 6e 6f 74 20 61 6e 79 20 54 65 78 74 20 53 74   not any Text St
0c40: 72 69 6e 67 20 77 68 65 6e 20 69 74 20 61 70 70  ring when it app
0c50: 65 61 72 73 20 61 73 20 61 20 56 69 72 74 75 61  ears as a Virtua
0c60: 6c 20 54 61 62 6c 65 20 61 72 67 75 6d 65 6e 74  l Table argument
0c70: 20 68 61 73 20 61 62 73 6f 6c 75 74 65 6c 79 20   has absolutely 
0c80: 6e 6f 20 65 66 66 65 63 74 2e 0d 0a 3c 76 65 72  no effect...<ver
0c90: 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20 43  batim>..SELECT C
0ca0: 52 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41  REATE VIRTUAL TA
0cb0: 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49  BLE my_table USI
0cc0: 4e 47 20 56 69 72 74 75 61 6c 53 68 61 70 65 28  NG VirtualShape(
0cd0: 20 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79   /home/sandro/my
0ce0: 73 68 70 20 2c 20 43 50 31 32 35 32 20 2c 20 33  shp , CP1252 , 3
0cf0: 30 30 33 20 2c 20 31 20 2c 20 6c 6f 77 65 72 20  003 , 1 , lower 
0d00: 29 3b 0d 0a 6f 72 0d 0a 53 45 4c 45 43 54 20 43  );..or..SELECT C
0d10: 52 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41  REATE VIRTUAL TA
0d20: 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49  BLE my_table USI
0d30: 4e 47 20 56 69 72 74 75 61 6c 53 68 61 70 65 28  NG VirtualShape(
0d40: 20 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d   '/home/sandro/m
0d50: 79 73 68 70 27 20 2c 20 27 43 50 31 32 35 32 27  yshp' , 'CP1252'
0d60: 20 2c 20 33 30 30 33 20 2c 20 31 20 2c 20 27 6c   , 3003 , 1 , 'l
0d70: 6f 77 65 72 27 20 29 3b 0d 0a 3c 2f 76 65 72 62  ower' );..</verb
0d80: 61 74 69 6d 3e 0d 0a 42 6f 74 68 20 6e 6f 74 61  atim>..Both nota
0d90: 74 69 6f 6e 73 20 77 69 6c 6c 20 70 72 6f 64 75  tions will produ
0da0: 63 65 20 65 78 61 63 74 6c 79 20 74 68 65 20 73  ce exactly the s
0db0: 61 6d 65 20 69 64 65 6e 74 69 63 61 6c 20 72 65  ame identical re
0dc0: 73 75 6c 74 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72  sult...</td></tr
0dd0: 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e 0d  ></table>..<br>.
0de0: 0a 3c 74 61 62 6c 65 20 62 67 63 6f 6c 6f 72 3d  .<table bgcolor=
0df0: 22 23 64 30 66 66 64 30 22 20 63 65 6c 6c 70 61  "#d0ffd0" cellpa
0e00: 64 64 69 6e 67 3d 22 31 38 22 3e 3c 74 72 3e 3c  dding="18"><tr><
0e10: 74 64 3e 0d 0a 3c 68 33 3e 42 65 73 74 20 70 72  td>..<h3>Best pr
0e20: 61 63 74 69 63 65 73 20 61 6e 64 20 6b 6e 6f 77  actices and know
0e30: 6e 20 6c 69 6d 69 74 61 74 69 6f 6e 73 3c 2f 68  n limitations</h
0e40: 33 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 56 69  3>..<ul>..<li>Vi
0e50: 72 74 75 61 6c 20 54 61 62 6c 65 73 20 61 72 65  rtual Tables are
0e60: 20 6e 6f 74 20 72 65 61 6c 6c 79 20 67 65 6e 75   not really genu
0e70: 69 6e 65 20 44 61 74 61 62 61 73 65 20 54 61 62  ine Database Tab
0e80: 6c 65 73 2c 20 74 68 65 79 20 61 72 65 20 6a 75  les, they are ju
0e90: 73 74 20 70 72 65 74 65 6e 64 69 6e 67 20 74 6f  st pretending to
0ea0: 20 62 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 56   be.</li>..<li>V
0eb0: 69 72 74 75 61 6c 20 54 61 62 6c 65 73 20 68 61  irtual Tables ha
0ec0: 76 65 20 76 65 72 79 20 70 6f 6f 72 20 73 70 65  ve very poor spe
0ed0: 65 64 20 70 65 72 66 6f 72 6d 61 6e 63 65 73 20  ed performances 
0ee0: 77 68 65 6e 20 63 6f 6d 70 61 72 65 64 20 74 6f  when compared to
0ef0: 20 67 65 6e 75 69 6e 65 20 44 61 74 61 62 61 73   genuine Databas
0f00: 65 20 54 61 62 6c 65 73 2e 3c 2f 6c 69 3e 0d 0a  e Tables.</li>..
0f10: 3c 6c 69 3e 43 6f 6d 70 6c 65 78 20 53 51 4c 20  <li>Complex SQL 
0f20: 71 75 65 72 69 65 73 20 3c 62 3e 4a 4f 49 4e 3c  queries <b>JOIN<
0f30: 2f 62 3e 69 6e 67 20 73 65 76 65 72 61 6c 20 54  /b>ing several T
0f40: 61 62 6c 65 73 20 63 61 6e 20 6f 66 74 65 6e 20  ables can often 
0f50: 72 65 74 75 72 6e 20 6f 64 64 20 61 6e 64 20 6d  return odd and m
0f60: 69 73 6c 65 61 64 69 6e 67 20 72 65 73 75 6c 74  isleading result
0f70: 73 65 74 73 2c 20 69 66 20 6f 6e 65 20 6f 72 20  sets, if one or 
0f80: 6d 6f 72 65 20 6f 66 20 74 68 65 20 3c 62 3e 4a  more of the <b>J
0f90: 4f 49 4e 3c 2f 62 3e 65 64 20 54 61 62 6c 65 73  OIN</b>ed Tables
0fa0: 20 61 72 65 20 6f 66 20 74 68 65 20 56 69 72 74   are of the Virt
0fb0: 75 61 6c 20 74 79 70 65 2e 3c 2f 6c 69 3e 0d 0a  ual type.</li>..
0fc0: 3c 6c 69 3e 54 68 65 20 62 65 73 74 20 75 73 61  <li>The best usa
0fd0: 67 65 20 79 6f 75 20 63 61 6e 20 64 6f 20 6f 66  ge you can do of
0fe0: 20 61 20 56 69 72 74 75 61 6c 20 54 61 62 6c 65   a Virtual Table
0ff0: 20 69 73 20 74 6f 20 6a 75 73 74 20 73 75 70 70   is to just supp
1000: 6f 72 74 20 62 61 73 69 63 20 64 61 74 61 20 69  ort basic data i
1010: 6d 70 6f 72 74 20 70 72 6f 63 65 73 73 65 73 2c  mport processes,
1020: 20 6f 72 20 74 6f 20 71 75 69 63 6b 6c 79 20 67   or to quickly g
1030: 65 74 20 61 6e 20 6f 76 65 72 61 6c 6c 20 67 6c  et an overall gl
1040: 61 6e 63 65 20 61 74 20 61 20 66 75 6c 6c 20 64  ance at a full d
1050: 61 74 61 73 65 74 20 77 69 74 68 6f 75 74 20 6e  ataset without n
1060: 65 63 65 73 73 61 72 69 6c 79 20 69 6d 70 6f 72  ecessarily impor
1070: 74 69 6e 67 20 69 74 20 69 6e 74 6f 20 74 68 65  ting it into the
1080: 20 44 61 74 61 62 61 73 65 2e 3c 2f 6c 69 3e 0d   Database.</li>.
1090: 0a 3c 6c 69 3e 50 72 65 74 65 6e 64 69 6e 67 20  .<li>Pretending 
10a0: 74 6f 20 75 73 65 20 61 20 56 69 72 74 75 61 6c  to use a Virtual
10b0: 20 54 61 62 6c 65 20 61 73 20 61 20 66 75 6c 6c   Table as a full
10c0: 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 6f 66 20   replacement of 
10d0: 69 6d 70 6f 72 74 69 6e 67 20 61 6c 6c 20 64 61  importing all da
10e0: 74 61 20 77 69 74 68 69 6e 20 61 20 67 65 6e 75  ta within a genu
10f0: 69 6e 65 20 44 61 74 61 62 61 73 65 20 54 61 62  ine Database Tab
1100: 6c 65 20 69 73 20 73 74 72 6f 6e 67 6c 79 20 64  le is strongly d
1110: 69 73 63 6f 75 72 61 67 65 64 2c 20 61 6e 64 20  iscouraged, and 
1120: 6e 65 76 65 72 20 69 73 20 61 20 73 6d 61 72 74  never is a smart
1130: 20 69 64 65 61 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75   idea.</li>..</u
1140: 6c 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f  l>..</td></tr></
1150: 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 68  table>..<br>..<h
1160: 72 3e 0d 0a 3c 68 31 3e 56 69 72 74 75 61 6c 44  r>..<h1>VirtualD
1170: 42 46 3c 2f 68 31 3e 0d 0a 54 68 65 20 3c 62 3e  BF</h1>..The <b>
1180: 56 69 72 74 75 61 6c 44 42 46 3c 2f 62 3e 20 49  VirtualDBF</b> I
1190: 6e 74 65 72 66 61 63 65 20 61 6c 6c 6f 77 73 20  nterface allows 
11a0: 74 6f 20 64 69 72 65 63 74 6c 79 20 61 63 63 65  to directly acce
11b0: 73 73 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 44  ss an external D
11c0: 42 46 20 74 61 62 6c 65 20 62 79 20 75 73 69 6e  BF table by usin
11d0: 67 20 73 74 61 6e 64 61 72 64 20 53 70 61 74 69  g standard Spati
11e0: 61 6c 20 53 51 4c 20 71 75 65 72 69 65 73 2e 3c  al SQL queries.<
11f0: 62 72 3e 0d 0a 53 79 6e 74 61 78 20 66 6f 72 20  br>..Syntax for 
1200: 63 72 65 61 74 69 6e 67 20 61 20 56 69 72 74 75  creating a Virtu
1210: 61 6c 44 62 66 20 54 61 62 6c 65 3a 0d 0a 3c 76  alDbf Table:..<v
1220: 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54  erbatim>..SELECT
1230: 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c 20   CREATE VIRTUAL 
1240: 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55  TABLE my_table U
1250: 53 49 4e 47 20 56 69 72 74 75 61 6c 44 62 66 20  SING VirtualDbf 
1260: 28 20 64 62 66 5f 70 61 74 68 20 2c 20 63 68 61  ( dbf_path , cha
1270: 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67 20 29 3b  rset_encoding );
1280: 0d 0a 0d 0a 53 45 4c 45 43 54 20 43 52 45 41 54  ....SELECT CREAT
1290: 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20  E VIRTUAL TABLE 
12a0: 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e 47 20 56  my_table USING V
12b0: 69 72 74 75 61 6c 44 62 66 20 28 20 64 62 66 5f  irtualDbf ( dbf_
12c0: 70 61 74 68 20 2c 20 63 68 61 72 73 65 74 5f 65  path , charset_e
12d0: 6e 63 6f 64 69 6e 67 20 2c 20 74 65 78 74 5f 64  ncoding , text_d
12e0: 61 74 65 73 20 29 3b 0d 0a 0d 0a 53 45 4c 45 43  ates );....SELEC
12f0: 54 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c  T CREATE VIRTUAL
1300: 20 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20   TABLE my_table 
1310: 55 53 49 4e 47 20 56 69 72 74 75 61 6c 44 62 66  USING VirtualDbf
1320: 20 28 20 64 62 66 5f 70 61 74 68 20 2c 20 63 68   ( dbf_path , ch
1330: 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67 20 2c  arset_encoding ,
1340: 20 74 65 78 74 5f 64 61 74 65 73 20 2c 20 63 6f   text_dates , co
1350: 6c 6e 61 6d 65 5f 63 61 73 65 20 29 3b 0d 0a 3c  lname_case );..<
1360: 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 53 75 70 70  /verbatim>..Supp
1370: 6f 72 74 65 64 20 61 72 67 75 6d 65 6e 74 73 20  orted arguments 
1380: 61 6e 64 20 74 68 65 69 72 20 69 6e 74 65 72 70  and their interp
1390: 72 65 74 61 74 69 6f 6e 3a 0d 0a 3c 75 6c 3e 0d  retation:..<ul>.
13a0: 0a 3c 6c 69 3e 3c 62 3e 64 62 66 5f 70 61 74 68  .<li><b>dbf_path
13b0: 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6d 61 6e 64  </b> (<i><b>mand
13c0: 61 74 6f 72 79 3c 2f 62 3e 3c 2f 69 3e 29 3a 20  atory</b></i>): 
13d0: 74 68 65 20 72 65 6c 61 74 69 76 65 20 6f 72 20  the relative or 
13e0: 61 62 73 6f 6c 75 74 65 20 70 61 74 68 6e 61 6d  absolute pathnam
13f0: 65 20 6c 65 61 64 69 6e 67 20 74 6f 20 74 68 65  e leading to the
1400: 20 65 78 74 65 72 6e 61 6c 20 44 42 46 20 66 69   external DBF fi
1410: 6c 65 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c  le...<ul>..<li><
1420: 62 3e 4e 6f 74 65 3c 2f 62 3e 3a 20 74 68 65 20  b>Note</b>: the 
1430: 66 75 6c 6c 20 70 61 74 68 6e 61 6d 65 20 6d 75  full pathname mu
1440: 73 74 20 62 65 20 70 61 73 73 65 64 2c 20 69 6e  st be passed, in
1450: 63 6c 75 64 69 6e 67 20 74 68 65 20 66 69 6e 61  cluding the fina
1460: 6c 20 3c 69 3e 2a 2e 64 62 66 3c 2f 69 3e 20 73  l <i>*.dbf</i> s
1470: 75 66 66 69 78 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75  uffix.</li>..</u
1480: 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  l></li>..<li><b>
1490: 63 68 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67  charset_encoding
14a0: 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6d 61 6e 64  </b> (<i><b>mand
14b0: 61 74 6f 72 79 3c 2f 62 3e 3c 2f 69 3e 29 3a 20  atory</b></i>): 
14c0: 63 61 6e 6f 6e 69 63 61 6c 20 6e 61 6d 65 20 6f  canonical name o
14d0: 66 20 74 68 65 20 63 68 61 72 73 65 74 20 65 6e  f the charset en
14e0: 63 6f 64 69 6e 67 20 61 64 6f 70 74 65 64 20 62  coding adopted b
14f0: 79 20 74 68 65 20 3c 62 3e 44 42 46 3c 2f 62 3e  y the <b>DBF</b>
1500: 20 6d 65 6d 62 65 72 2e 0d 0a 3c 75 6c 3e 0d 0a   member...<ul>..
1510: 3c 6c 69 3e 45 78 61 6d 70 6c 65 73 20 6f 66 20  <li>Examples of 
1520: 76 61 6c 69 64 20 6e 61 6d 65 73 20 61 72 65 3a  valid names are:
1530: 20 3c 62 3e 41 53 43 49 49 3c 2f 62 3e 2c 20 3c   <b>ASCII</b>, <
1540: 62 3e 55 54 46 2d 38 3c 2f 62 3e 2c 20 3c 62 3e  b>UTF-8</b>, <b>
1550: 43 50 38 35 30 3c 2f 62 3e 2c 20 3c 62 3e 49 53  CP850</b>, <b>IS
1560: 4f 2d 38 38 34 39 2d 31 3c 2f 62 3e 3c 2f 6c 69  O-8849-1</b></li
1570: 3e 0d 0a 3c 6c 69 3e 59 6f 75 20 63 61 6e 20 63  >..<li>You can c
1580: 68 65 63 6b 20 74 68 65 20 66 75 6c 6c 20 6c 69  heck the full li
1590: 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20  st of supported 
15a0: 63 68 61 72 73 65 74 20 65 6e 63 6f 64 69 6e 67  charset encoding
15b0: 73 20 66 72 6f 6d 20 3c 61 20 68 72 65 66 3d 22  s from <a href="
15c0: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 6e 75 2e  https://www.gnu.
15d0: 6f 72 67 2f 73 6f 66 74 77 61 72 65 2f 6c 69 62  org/software/lib
15e0: 69 63 6f 6e 76 2f 22 3e 68 65 72 65 3c 2f 61 3e  iconv/">here</a>
15f0: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c  .</li>..</ul></l
1600: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74 65 78 74 5f  i>..<li><b>text_
1610: 64 61 74 65 73 3c 2f 62 3e 20 28 3c 69 3e 3c 62  dates</b> (<i><b
1620: 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 62 3e 3c 2f 69  >optional</b></i
1630: 3e 29 3a 20 74 68 69 73 20 69 73 20 61 20 3c 62  >): this is a <b
1640: 3e 42 4f 4f 4c 45 41 4e 3c 2f 62 3e 20 66 6c 61  >BOOLEAN</b> fla
1650: 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 66  g:..<ul>..<li>if
1660: 20 73 65 74 20 74 6f 20 3c 62 3e 30 3c 2f 62 3e   set to <b>0</b>
1670: 20 28 3c 62 3e 46 41 4c 53 45 3c 2f 62 3e 29 20   (<b>FALSE</b>) 
1680: 61 6c 6c 20 66 69 65 6c 64 73 20 6f 66 20 74 68  all fields of th
1690: 65 20 3c 62 3e 44 41 54 45 3c 2f 62 3e 20 74 79  e <b>DATE</b> ty
16a0: 70 65 20 77 69 6c 6c 20 62 65 20 72 65 70 72 65  pe will be repre
16b0: 73 65 6e 74 65 64 20 61 73 20 3c 61 20 68 72 65  sented as <a hre
16c0: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 73  f="https://www.s
16d0: 71 6c 69 74 65 2e 6f 72 67 2f 6c 61 6e 67 5f 64  qlite.org/lang_d
16e0: 61 74 65 66 75 6e 63 2e 68 74 6d 6c 22 3e 6a 75  atefunc.html">ju
16f0: 6c 69 61 6e 20 64 61 74 65 73 3c 2f 61 3e 3c 2f  lian dates</a></
1700: 6c 69 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65 74 20  li>..<li>if set 
1710: 74 6f 20 61 6e 79 20 6f 74 68 65 72 20 69 6e 74  to any other int
1720: 65 67 65 72 20 76 61 6c 75 65 20 28 3c 62 3e 54  eger value (<b>T
1730: 52 55 45 3c 2f 62 3e 29 20 61 6c 6c 20 66 69 65  RUE</b>) all fie
1740: 6c 64 73 20 6f 66 20 74 68 65 20 3c 62 3e 44 41  lds of the <b>DA
1750: 54 45 3c 2f 62 3e 20 74 79 70 65 20 77 69 6c 6c  TE</b> type will
1760: 20 62 65 20 72 65 70 72 65 73 65 6e 74 65 64 20   be represented 
1770: 61 73 20 54 65 78 74 20 53 74 72 69 6e 67 73 20  as Text Strings 
1780: 61 73 20 65 2e 67 2e 20 3c 62 3e 32 30 31 38 2d  as e.g. <b>2018-
1790: 30 38 2d 32 31 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a  08-21</b></li>..
17a0: 3c 6c 69 3e 69 66 20 6e 6f 74 20 65 78 70 6c 69  <li>if not expli
17b0: 63 69 74 6c 79 20 73 70 65 63 69 66 69 65 64 2c  citly specified,
17c0: 20 3c 62 3e 54 52 55 45 3c 2f 62 3e 20 77 69 6c   <b>TRUE</b> wil
17d0: 6c 20 61 6c 77 61 79 73 20 62 65 20 61 73 73 75  l always be assu
17e0: 6d 65 64 20 28 64 65 66 61 75 6c 74 20 73 65 74  med (default set
17f0: 74 69 6e 67 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75  ting).</li>..</u
1800: 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  l></li>..<li><b>
1810: 63 6f 6c 6e 61 6d 65 5f 63 61 73 65 3c 2f 62 3e  colname_case</b>
1820: 20 28 3c 69 3e 3c 62 3e 6f 70 74 69 6f 6e 61 6c   (<i><b>optional
1830: 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 74 68 69 73 20  </b></i>): this 
1840: 61 72 67 75 6d 65 6e 74 20 73 70 65 63 69 66 69  argument specifi
1850: 65 73 20 69 66 20 61 6c 6c 20 63 6f 6c 75 6d 6e  es if all column
1860: 20 6e 61 6d 65 73 20 73 68 6f 75 6c 64 20 62 65   names should be
1870: 20 63 6f 6e 73 69 64 65 72 65 64 20 75 70 70 65   considered uppe
1880: 72 63 61 73 65 20 6f 72 20 6c 6f 77 65 72 63 61  rcase or lowerca
1890: 73 65 2e 3c 62 72 3e 0d 0a 56 61 6c 69 64 20 73  se.<br>..Valid s
18a0: 65 74 74 69 6e 67 73 20 61 72 65 3a 0d 0a 3c 75  ettings are:..<u
18b0: 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 75 70 70 65 72  l>..<li><b>upper
18c0: 63 61 73 65 3c 2f 62 3e 20 6f 72 20 3c 62 3e 75  case</b> or <b>u
18d0: 70 70 65 72 3c 2f 62 3e 3a 20 61 6c 6c 20 63 6f  pper</b>: all co
18e0: 6c 75 6d 6e 20 6e 61 6d 65 73 20 77 69 6c 6c 20  lumn names will 
18f0: 62 65 20 66 75 6c 6c 79 20 63 61 70 69 74 61 6c  be fully capital
1900: 69 7a 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  ized.</li>..<li>
1910: 3c 62 3e 6c 6f 77 65 72 63 61 73 65 3c 2f 62 3e  <b>lowercase</b>
1920: 20 6f 72 20 3c 62 3e 6c 6f 77 65 72 3c 2f 62 3e   or <b>lower</b>
1930: 3a 20 61 6c 6c 20 63 6f 6c 75 6d 6e 20 6e 61 6d  : all column nam
1940: 65 73 20 77 69 6c 6c 20 62 65 20 66 75 6c 6c 20  es will be full 
1950: 6c 6f 77 65 72 63 61 73 65 2e 3c 2f 6c 69 3e 0d  lowercase.</li>.
1960: 0a 3c 6c 69 3e 3c 62 3e 73 61 6d 65 63 61 73 65  .<li><b>samecase
1970: 3c 2f 62 3e 20 6f 72 20 3c 62 3e 73 61 6d 65 3c  </b> or <b>same<
1980: 2f 62 3e 3a 20 61 6c 6c 20 63 6f 6c 75 6d 6e 20  /b>: all column 
1990: 6e 61 6d 65 73 20 77 69 6c 6c 20 62 65 20 65 78  names will be ex
19a0: 61 63 74 6c 79 20 70 72 65 73 65 72 76 65 64 20  actly preserved 
19b0: 61 73 20 74 68 65 79 20 61 72 65 20 64 65 66 69  as they are defi
19c0: 6e 65 64 20 69 6e 74 6f 20 74 68 65 20 44 42 46  ned into the DBF
19d0: 20 6d 65 6d 65 62 65 72 2e 3c 2f 6c 69 3e 0d 0a   memeber.</li>..
19e0: 3c 6c 69 3e 69 66 20 6e 6f 74 20 73 70 65 63 69  <li>if not speci
19f0: 66 69 65 64 2c 20 6f 72 20 69 66 20 61 6e 79 20  fied, or if any 
1a00: 6f 74 68 65 72 20 64 65 66 69 6e 69 74 69 6f 6e  other definition
1a10: 20 64 65 66 69 6e 69 74 69 6f 6e 20 69 73 20 66   definition is f
1a20: 6f 75 6e 64 2c 20 3c 62 3e 6c 6f 77 65 72 63 61  ound, <b>lowerca
1a30: 73 65 3c 2f 62 3e 20 77 69 6c 6c 20 61 6c 77 61  se</b> will alwa
1a40: 79 73 20 62 65 20 61 73 73 75 6d 65 64 20 28 64  ys be assumed (d
1a50: 65 66 61 75 6c 74 20 73 65 74 74 69 6e 67 29 2e  efault setting).
1a60: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69  </li>..</ul></li
1a70: 3e 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 74  >..</ul><br>..<t
1a80: 61 62 6c 65 20 62 67 63 6f 6c 6f 72 3d 22 23 66  able bgcolor="#f
1a90: 66 66 66 64 30 22 20 63 65 6c 6c 70 61 64 64 69  fffd0" cellpaddi
1aa0: 6e 67 3d 22 31 38 22 3e 3c 74 72 3e 3c 74 64 3e  ng="18"><tr><td>
1ab0: 0d 0a 3c 62 3e 4e 6f 74 65 3c 2f 62 3e 3a 20 71  ..<b>Note</b>: q
1ac0: 75 6f 74 69 6e 67 20 6f 72 20 6e 6f 74 20 61 6e  uoting or not an
1ad0: 79 20 54 65 78 74 20 53 74 72 69 6e 67 20 77 68  y Text String wh
1ae0: 65 6e 20 69 74 20 61 70 70 65 61 72 73 20 61 73  en it appears as
1af0: 20 61 20 56 69 72 74 75 61 6c 20 54 61 62 6c 65   a Virtual Table
1b00: 20 61 72 67 75 6d 65 6e 74 20 68 61 73 20 61 62   argument has ab
1b10: 73 6f 6c 75 74 65 6c 79 20 6e 6f 20 65 66 66 65  solutely no effe
1b20: 63 74 2e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d  ct...<verbatim>.
1b30: 0a 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56  .SELECT CREATE V
1b40: 49 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f  IRTUAL TABLE my_
1b50: 74 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74  table USING Virt
1b60: 75 61 6c 44 62 66 28 20 2f 68 6f 6d 65 2f 73 61  ualDbf( /home/sa
1b70: 6e 64 72 6f 2f 6d 79 73 68 70 20 2c 20 43 50 31  ndro/myshp , CP1
1b80: 32 35 32 20 2c 20 31 20 2c 20 6c 6f 77 65 72 20  252 , 1 , lower 
1b90: 29 3b 0d 0a 6f 72 0d 0a 53 45 4c 45 43 54 20 43  );..or..SELECT C
1ba0: 52 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41  REATE VIRTUAL TA
1bb0: 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49  BLE my_table USI
1bc0: 4e 47 20 56 69 72 74 75 61 6c 44 62 66 28 20 27  NG VirtualDbf( '
1bd0: 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79 73  /home/sandro/mys
1be0: 68 70 27 20 2c 20 27 43 50 31 32 35 32 27 20 2c  hp' , 'CP1252' ,
1bf0: 20 31 20 2c 20 27 6c 6f 77 65 72 27 20 29 3b 0d   1 , 'lower' );.
1c00: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 42 6f  .</verbatim>..Bo
1c10: 74 68 20 6e 6f 74 61 74 69 6f 6e 73 20 77 69 6c  th notations wil
1c20: 6c 20 70 72 6f 64 75 63 65 20 65 78 61 63 74 6c  l produce exactl
1c30: 79 20 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74  y the same ident
1c40: 69 63 61 6c 20 72 65 73 75 6c 74 2e 0d 0a 3c 2f  ical result...</
1c50: 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e  td></tr></table>
1c60: 0d 0a 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 62  ..<br>..<table b
1c70: 67 63 6f 6c 6f 72 3d 22 23 64 30 66 66 64 30 22  gcolor="#d0ffd0"
1c80: 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 31 38   cellpadding="18
1c90: 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e  "><tr><td>..<h3>
1ca0: 42 65 73 74 20 70 72 61 63 74 69 63 65 73 20 61  Best practices a
1cb0: 6e 64 20 6b 6e 6f 77 6e 20 6c 69 6d 69 74 61 74  nd known limitat
1cc0: 69 6f 6e 73 3c 2f 68 33 3e 0d 0a 3c 75 6c 3e 0d  ions</h3>..<ul>.
1cd0: 0a 3c 6c 69 3e 56 69 72 74 75 61 6c 20 54 61 62  .<li>Virtual Tab
1ce0: 6c 65 73 20 61 72 65 20 6e 6f 74 20 72 65 61 6c  les are not real
1cf0: 6c 79 20 67 65 6e 75 69 6e 65 20 44 61 74 61 62  ly genuine Datab
1d00: 61 73 65 20 54 61 62 6c 65 73 2c 20 74 68 65 79  ase Tables, they
1d10: 20 61 72 65 20 6a 75 73 74 20 70 72 65 74 65 6e   are just preten
1d20: 64 69 6e 67 20 74 6f 20 62 65 2e 3c 2f 6c 69 3e  ding to be.</li>
1d30: 0d 0a 3c 6c 69 3e 56 69 72 74 75 61 6c 20 54 61  ..<li>Virtual Ta
1d40: 62 6c 65 73 20 68 61 76 65 20 76 65 72 79 20 70  bles have very p
1d50: 6f 6f 72 20 73 70 65 65 64 20 70 65 72 66 6f 72  oor speed perfor
1d60: 6d 61 6e 63 65 73 20 77 68 65 6e 20 63 6f 6d 70  mances when comp
1d70: 61 72 65 64 20 74 6f 20 67 65 6e 75 69 6e 65 20  ared to genuine 
1d80: 44 61 74 61 62 61 73 65 20 54 61 62 6c 65 73 2e  Database Tables.
1d90: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 43 6f 6d 70 6c  </li>..<li>Compl
1da0: 65 78 20 53 51 4c 20 71 75 65 72 69 65 73 20 3c  ex SQL queries <
1db0: 62 3e 4a 4f 49 4e 3c 2f 62 3e 69 6e 67 20 73 65  b>JOIN</b>ing se
1dc0: 76 65 72 61 6c 20 54 61 62 6c 65 73 20 63 61 6e  veral Tables can
1dd0: 20 6f 66 74 65 6e 20 72 65 74 75 72 6e 20 6f 64   often return od
1de0: 64 20 61 6e 64 20 6d 69 73 6c 65 61 64 69 6e 67  d and misleading
1df0: 20 72 65 73 75 6c 74 73 65 74 73 2c 20 69 66 20   resultsets, if 
1e00: 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 6f 66 20 74  one or more of t
1e10: 68 65 20 3c 62 3e 4a 4f 49 4e 3c 2f 62 3e 65 64  he <b>JOIN</b>ed
1e20: 20 54 61 62 6c 65 73 20 61 72 65 20 6f 66 20 74   Tables are of t
1e30: 68 65 20 56 69 72 74 75 61 6c 20 74 79 70 65 2e  he Virtual type.
1e40: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 62  </li>..<li>The b
1e50: 65 73 74 20 75 73 61 67 65 20 79 6f 75 20 63 61  est usage you ca
1e60: 6e 20 64 6f 20 6f 66 20 61 20 56 69 72 74 75 61  n do of a Virtua
1e70: 6c 20 54 61 62 6c 65 20 69 73 20 74 6f 20 6a 75  l Table is to ju
1e80: 73 74 20 73 75 70 70 6f 72 74 20 62 61 73 69 63  st support basic
1e90: 20 64 61 74 61 20 69 6d 70 6f 72 74 20 70 72 6f   data import pro
1ea0: 63 65 73 73 65 73 2c 20 6f 72 20 74 6f 20 71 75  cesses, or to qu
1eb0: 69 63 6b 6c 79 20 67 65 74 20 61 6e 20 6f 76 65  ickly get an ove
1ec0: 72 61 6c 6c 20 67 6c 61 6e 63 65 20 61 74 20 61  rall glance at a
1ed0: 20 66 75 6c 6c 20 64 61 74 61 73 65 74 20 77 69   full dataset wi
1ee0: 74 68 6f 75 74 20 6e 65 63 65 73 73 61 72 69 6c  thout necessaril
1ef0: 79 20 69 6d 70 6f 72 74 69 6e 67 20 69 74 20 69  y importing it i
1f00: 6e 74 6f 20 74 68 65 20 44 61 74 61 62 61 73 65  nto the Database
1f10: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 72 65 74  .</li>..<li>Pret
1f20: 65 6e 64 69 6e 67 20 74 6f 20 75 73 65 20 61 20  ending to use a 
1f30: 56 69 72 74 75 61 6c 20 54 61 62 6c 65 20 61 73  Virtual Table as
1f40: 20 61 20 66 75 6c 6c 20 72 65 70 6c 61 63 65 6d   a full replacem
1f50: 65 6e 74 20 6f 66 20 69 6d 70 6f 72 74 69 6e 67  ent of importing
1f60: 20 61 6c 6c 20 64 61 74 61 20 77 69 74 68 69 6e   all data within
1f70: 20 61 20 67 65 6e 75 69 6e 65 20 44 61 74 61 62   a genuine Datab
1f80: 61 73 65 20 54 61 62 6c 65 20 69 73 20 73 74 72  ase Table is str
1f90: 6f 6e 67 6c 79 20 64 69 73 63 6f 75 72 61 67 65  ongly discourage
1fa0: 64 2c 20 61 6e 64 20 6e 65 76 65 72 20 69 73 20  d, and never is 
1fb0: 61 20 73 6d 61 72 74 20 69 64 65 61 2e 3c 2f 6c  a smart idea.</l
1fc0: 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e  i>..</ul>..</td>
1fd0: 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c  </tr></table>..<
1fe0: 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 31 3e 56  br>..<hr>..<h1>V
1ff0: 69 72 74 75 61 6c 54 65 78 74 3c 2f 68 31 3e 0d  irtualText</h1>.
2000: 0a 54 68 65 20 3c 62 3e 56 69 72 74 75 61 6c 54  .The <b>VirtualT
2010: 65 78 74 3c 2f 62 3e 20 49 6e 74 65 72 66 61 63  ext</b> Interfac
2020: 65 20 61 6c 6c 6f 77 73 20 74 6f 20 64 69 72 65  e allows to dire
2030: 63 74 6c 79 20 61 63 63 65 73 73 20 61 6e 20 65  ctly access an e
2040: 78 74 65 72 6e 61 6c 20 54 65 78 74 20 66 69 6c  xternal Text fil
2050: 65 20 62 79 20 75 73 69 6e 67 20 73 74 61 6e 64  e by using stand
2060: 61 72 64 20 53 70 61 74 69 61 6c 20 53 51 4c 20  ard Spatial SQL 
2070: 71 75 65 72 69 65 73 2e 3c 62 72 3e 0d 0a 54 68  queries.<br>..Th
2080: 65 20 54 65 78 74 20 46 69 6c 65 20 69 73 20 65  e Text File is e
2090: 78 70 65 63 74 65 64 20 74 6f 20 63 6f 6e 74 61  xpected to conta
20a0: 69 6e 20 61 20 70 72 6f 70 65 72 6c 79 20 66 6f  in a properly fo
20b0: 72 6d 61 74 74 65 64 20 54 61 62 6c 65 20 61 63  rmatted Table ac
20c0: 63 6f 72 64 69 6e 67 6c 79 20 74 6f 20 73 6f 6d  cordingly to som
20d0: 65 20 3c 62 3e 44 65 6c 69 6d 69 74 65 72 2d 53  e <b>Delimiter-S
20e0: 65 70 61 72 61 74 65 64 2d 56 61 6c 75 65 73 3c  eparated-Values<
20f0: 2f 62 3e 20 66 6f 72 6d 61 74 20 28 63 6f 6d 6d  /b> format (comm
2100: 61 20 73 65 70 61 72 61 74 65 64 20 76 61 6c 75  a separated valu
2110: 65 73 20 3c 69 3e 2a 2e 63 73 76 3c 2f 69 3e 2c  es <i>*.csv</i>,
2120: 20 74 61 62 20 73 65 70 61 72 61 74 65 64 20 76   tab separated v
2130: 61 6c 75 65 73 20 3c 69 3e 2a 2e 74 78 74 3c 2f  alues <i>*.txt</
2140: 69 3e 20 61 6e 64 20 61 6c 69 6b 65 29 2e 3c 62  i> and alike).<b
2150: 72 3e 0d 0a 53 79 6e 74 61 78 20 66 6f 72 20 63  r>..Syntax for c
2160: 72 65 61 74 69 6e 67 20 61 20 56 69 72 74 75 61  reating a Virtua
2170: 6c 54 65 78 74 20 54 61 62 6c 65 3a 0d 0a 3c 76  lText Table:..<v
2180: 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54  erbatim>..SELECT
2190: 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c 20   CREATE VIRTUAL 
21a0: 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55  TABLE my_table U
21b0: 53 49 4e 47 20 56 69 72 74 75 61 6c 54 65 78 74  SING VirtualText
21c0: 20 28 20 74 65 78 74 66 69 6c 65 5f 70 61 74 68   ( textfile_path
21d0: 20 2c 20 63 68 61 72 73 65 74 5f 65 6e 63 6f 64   , charset_encod
21e0: 69 6e 67 20 29 3b 0d 0a 0d 0a 53 45 4c 45 43 54  ing );....SELECT
21f0: 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c 20   CREATE VIRTUAL 
2200: 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55  TABLE my_table U
2210: 53 49 4e 47 20 56 69 72 74 75 61 6c 54 65 78 74  SING VirtualText
2220: 20 28 20 74 65 78 74 66 69 6c 65 5f 70 61 74 68   ( textfile_path
2230: 20 2c 20 63 68 61 72 73 65 74 5f 65 6e 63 6f 64   , charset_encod
2240: 69 6e 67 20 2c 20 66 69 72 73 74 5f 72 6f 77 5f  ing , first_row_
2250: 61 73 5f 74 69 74 6c 65 73 20 29 3b 0d 0a 0d 0a  as_titles );....
2260: 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49  SELECT CREATE VI
2270: 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74  RTUAL TABLE my_t
2280: 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75  able USING Virtu
2290: 61 6c 54 65 78 74 20 28 20 74 65 78 74 66 69 6c  alText ( textfil
22a0: 65 5f 70 61 74 68 20 2c 20 63 68 61 72 73 65 74  e_path , charset
22b0: 5f 65 6e 63 6f 64 69 6e 67 20 2c 20 66 69 72 73  _encoding , firs
22c0: 74 5f 72 6f 77 5f 61 73 5f 74 69 74 6c 65 73 20  t_row_as_titles 
22d0: 2c 20 64 65 63 69 6d 61 6c 5f 73 65 70 61 72 61  , decimal_separa
22e0: 74 6f 72 20 29 3b 0d 0a 0d 0a 53 45 4c 45 43 54  tor );....SELECT
22f0: 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c 20   CREATE VIRTUAL 
2300: 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55  TABLE my_table U
2310: 53 49 4e 47 20 56 69 72 74 75 61 6c 54 65 78 74  SING VirtualText
2320: 20 28 20 74 65 78 74 66 69 6c 65 5f 70 61 74 68   ( textfile_path
2330: 20 2c 20 63 68 61 72 73 65 74 5f 65 6e 63 6f 64   , charset_encod
2340: 69 6e 67 20 2c 20 66 69 72 73 74 5f 72 6f 77 5f  ing , first_row_
2350: 61 73 5f 74 69 74 6c 65 73 20 2c 20 64 65 63 69  as_titles , deci
2360: 6d 61 6c 5f 73 65 70 61 72 61 74 6f 72 20 2c 20  mal_separator , 
2370: 74 65 78 74 5f 73 65 70 61 72 61 74 6f 72 20 29  text_separator )
2380: 3b 0d 0a 0d 0a 53 45 4c 45 43 54 20 43 52 45 41  ;....SELECT CREA
2390: 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45  TE VIRTUAL TABLE
23a0: 20 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e 47 20   my_table USING 
23b0: 56 69 72 74 75 61 6c 54 65 78 74 20 28 20 74 65  VirtualText ( te
23c0: 78 74 66 69 6c 65 5f 70 61 74 68 20 2c 20 63 68  xtfile_path , ch
23d0: 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67 20 2c  arset_encoding ,
23e0: 20 66 69 72 73 74 5f 72 6f 77 5f 61 73 5f 74 69   first_row_as_ti
23f0: 74 6c 65 73 20 2c 20 64 65 63 69 6d 61 6c 5f 73  tles , decimal_s
2400: 65 70 61 72 61 74 6f 72 20 2c 20 74 65 78 74 5f  eparator , text_
2410: 73 65 70 61 72 61 74 6f 72 20 2c 20 66 69 65 6c  separator , fiel
2420: 64 5f 73 65 70 61 72 61 74 6f 72 20 29 3b 0d 0a  d_separator );..
2430: 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 53 75 70  </verbatim>..Sup
2440: 70 6f 72 74 65 64 20 61 72 67 75 6d 65 6e 74 73  ported arguments
2450: 20 61 6e 64 20 74 68 65 69 72 20 69 6e 74 65 72   and their inter
2460: 70 72 65 74 61 74 69 6f 6e 3a 0d 0a 3c 75 6c 3e  pretation:..<ul>
2470: 0d 0a 3c 6c 69 3e 3c 62 3e 74 65 78 74 66 69 6c  ..<li><b>textfil
2480: 65 5f 70 61 74 68 3c 2f 62 3e 20 28 3c 69 3e 3c  e_path</b> (<i><
2490: 62 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f 62 3e 3c  b>mandatory</b><
24a0: 2f 69 3e 29 3a 20 74 68 65 20 72 65 6c 61 74 69  /i>): the relati
24b0: 76 65 20 6f 72 20 61 62 73 6f 6c 75 74 65 20 70  ve or absolute p
24c0: 61 74 68 6e 61 6d 65 20 6c 65 61 64 69 6e 67 20  athname leading 
24d0: 74 6f 20 74 68 65 20 65 78 74 65 72 6e 61 6c 20  to the external 
24e0: 54 65 78 74 20 66 69 6c 65 2e 0d 0a 3c 75 6c 3e  Text file...<ul>
24f0: 0d 0a 3c 6c 69 3e 3c 62 3e 4e 6f 74 65 3c 2f 62  ..<li><b>Note</b
2500: 3e 3a 20 74 68 65 20 66 75 6c 6c 20 70 61 74 68  >: the full path
2510: 6e 61 6d 65 20 6d 75 73 74 20 62 65 20 70 61 73  name must be pas
2520: 73 65 64 2c 20 69 6e 63 6c 75 64 69 6e 67 20 61  sed, including a
2530: 6e 20 65 76 65 6e 74 75 61 6c 20 66 69 6e 61 6c  n eventual final
2540: 20 73 75 66 66 69 78 20 28 3c 69 3e 2a 2e 74 78   suffix (<i>*.tx
2550: 74 3c 2f 69 3e 2c 20 3c 69 3e 2a 2e 63 73 76 3c  t</i>, <i>*.csv<
2560: 2f 69 3e 20 61 6e 64 20 61 6c 69 6b 65 29 2e 3c  /i> and alike).<
2570: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e  /li>..</ul></li>
2580: 0d 0a 3c 6c 69 3e 3c 62 3e 63 68 61 72 73 65 74  ..<li><b>charset
2590: 5f 65 6e 63 6f 64 69 6e 67 3c 2f 62 3e 20 28 3c  _encoding</b> (<
25a0: 69 3e 3c 62 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f  i><b>mandatory</
25b0: 62 3e 3c 2f 69 3e 29 3a 20 63 61 6e 6f 6e 69 63  b></i>): canonic
25c0: 61 6c 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63  al name of the c
25d0: 68 61 72 73 65 74 20 65 6e 63 6f 64 69 6e 67 20  harset encoding 
25e0: 61 64 6f 70 74 65 64 20 62 79 20 74 68 65 20 54  adopted by the T
25f0: 65 78 74 20 66 69 6c 65 2e 0d 0a 3c 75 6c 3e 0d  ext file...<ul>.
2600: 0a 3c 6c 69 3e 45 78 61 6d 70 6c 65 73 20 6f 66  .<li>Examples of
2610: 20 76 61 6c 69 64 20 6e 61 6d 65 73 20 61 72 65   valid names are
2620: 3a 20 3c 62 3e 41 53 43 49 49 3c 2f 62 3e 2c 20  : <b>ASCII</b>, 
2630: 3c 62 3e 55 54 46 2d 38 3c 2f 62 3e 2c 20 3c 62  <b>UTF-8</b>, <b
2640: 3e 43 50 38 35 30 3c 2f 62 3e 2c 20 3c 62 3e 49  >CP850</b>, <b>I
2650: 53 4f 2d 38 38 34 39 2d 31 3c 2f 62 3e 3c 2f 6c  SO-8849-1</b></l
2660: 69 3e 0d 0a 3c 6c 69 3e 59 6f 75 20 63 61 6e 20  i>..<li>You can 
2670: 63 68 65 63 6b 20 74 68 65 20 66 75 6c 6c 20 6c  check the full l
2680: 69 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64  ist of supported
2690: 20 63 68 61 72 73 65 74 20 65 6e 63 6f 64 69 6e   charset encodin
26a0: 67 73 20 66 72 6f 6d 20 3c 61 20 68 72 65 66 3d  gs from <a href=
26b0: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 6e 75  "https://www.gnu
26c0: 2e 6f 72 67 2f 73 6f 66 74 77 61 72 65 2f 6c 69  .org/software/li
26d0: 62 69 63 6f 6e 76 2f 22 3e 68 65 72 65 3c 2f 61  biconv/">here</a
26e0: 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f  >.</li>..</ul></
26f0: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 66 69 72 73  li>..<li><b>firs
2700: 74 5f 72 6f 77 5f 61 73 5f 74 69 74 6c 65 73 3c  t_row_as_titles<
2710: 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6f 70 74 69 6f  /b> (<i><b>optio
2720: 6e 61 6c 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 74 68  nal</b></i>): th
2730: 69 73 20 69 73 20 61 20 3c 62 3e 42 4f 4f 4c 45  is is a <b>BOOLE
2740: 41 4e 3c 2f 62 3e 20 66 6c 61 67 3a 0d 0a 3c 75  AN</b> flag:..<u
2750: 6c 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65 74 20 74  l>..<li>if set t
2760: 6f 20 3c 62 3e 30 3c 2f 62 3e 20 28 3c 62 3e 46  o <b>0</b> (<b>F
2770: 41 4c 53 45 3c 2f 62 3e 29 20 61 6c 6c 20 63 6f  ALSE</b>) all co
2780: 6c 75 6d 6e 20 6e 61 6d 65 73 20 77 69 6c 6c 20  lumn names will 
2790: 62 65 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79  be automatically
27a0: 20 73 65 74 20 62 79 20 75 73 69 6e 67 20 61 20   set by using a 
27b0: 70 72 6f 67 72 65 73 73 69 76 65 20 73 65 71 75  progressive sequ
27c0: 65 6e 63 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  ence.</li>..<li>
27d0: 69 66 20 73 65 74 20 74 6f 20 61 6e 79 20 6f 74  if set to any ot
27e0: 68 65 72 20 69 6e 74 65 67 65 72 20 76 61 6c 75  her integer valu
27f0: 65 20 28 3c 62 3e 54 52 55 45 3c 2f 62 3e 29 20  e (<b>TRUE</b>) 
2800: 61 6c 6c 20 63 6f 6c 75 6d 6e 20 6e 61 6d 65 73  all column names
2810: 20 77 69 6c 6c 20 62 79 20 65 78 70 65 63 74 65   will by expecte
2820: 64 20 74 6f 20 62 65 20 64 65 66 69 6e 65 64 20  d to be defined 
2830: 69 6e 20 74 68 65 20 76 65 72 79 20 66 69 72 73  in the very firs
2840: 74 20 72 6f 77 20 6f 66 20 74 68 65 20 54 65 78  t row of the Tex
2850: 74 20 66 69 6c 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c  t file.</li>..<l
2860: 69 3e 69 66 20 6e 6f 74 20 65 78 70 6c 69 63 69  i>if not explici
2870: 74 6c 79 20 73 70 65 63 69 66 69 65 64 2c 20 3c  tly specified, <
2880: 62 3e 54 52 55 45 3c 2f 62 3e 20 77 69 6c 6c 20  b>TRUE</b> will 
2890: 61 6c 77 61 79 73 20 62 65 20 61 73 73 75 6d 65  always be assume
28a0: 64 20 28 64 65 66 61 75 6c 74 20 73 65 74 74 69  d (default setti
28b0: 6e 67 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  ng).</li>..</ul>
28c0: 3c 2f 6c 69 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 2f 75  </li>..<ul>..</u
28d0: 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  l></li>..<li><b>
28e0: 64 65 63 69 6d 61 6c 5f 73 65 70 61 72 61 74 6f  decimal_separato
28f0: 72 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6f 70 74  r</b> (<i><b>opt
2900: 69 6f 6e 61 6c 3c 2f 62 3e 3c 2f 69 3e 29 3a 20  ional</b></i>): 
2910: 74 68 65 20 63 68 61 72 61 63 74 65 72 20 61 63  the character ac
2920: 74 69 6e 67 20 61 73 20 61 20 73 65 70 61 72 61  ting as a separa
2930: 74 6f 72 20 62 65 74 77 65 65 6e 20 74 68 65 20  tor between the 
2940: 69 6e 74 65 67 65 72 20 61 6e 64 20 64 65 63 69  integer and deci
2950: 6d 61 6c 20 70 61 72 74 73 20 6f 66 20 61 20 6e  mal parts of a n
2960: 75 6d 62 65 72 2e 3c 62 72 3e 0d 0a 56 61 6c 69  umber.<br>..Vali
2970: 64 20 76 61 6c 75 65 73 20 61 72 65 20 61 6e 79  d values are any
2980: 20 70 72 69 6e 74 61 62 6c 65 20 63 68 61 72 61   printable chara
2990: 63 74 65 72 20 6f 72 20 74 68 65 20 73 70 65 63  cter or the spec
29a0: 69 61 6c 20 6d 6e 65 6d 6f 6e 69 63 20 6e 6f 74  ial mnemonic not
29b0: 61 74 69 6f 6e 73 20 3c 62 3e 50 4f 49 4e 54 3c  ations <b>POINT<
29c0: 2f 62 3e 20 6f 72 20 3c 62 3e 43 4f 4d 4d 41 3c  /b> or <b>COMMA<
29d0: 2f 62 3e 2e 3c 62 72 3e 0d 0a 49 66 20 6e 6f 74  /b>.<br>..If not
29e0: 20 65 78 70 6c 69 63 69 74 6c 79 20 73 70 65 63   explicitly spec
29f0: 69 66 69 65 64 20 3c 62 3e 50 4f 49 4e 54 3c 2f  ified <b>POINT</
2a00: 62 3e 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 62  b> will always b
2a10: 65 20 61 73 73 75 6d 65 64 20 28 64 65 66 61 75  e assumed (defau
2a20: 6c 74 20 73 65 74 74 69 6e 67 29 3c 2f 6c 69 3e  lt setting)</li>
2a30: 0d 0a 3c 6c 69 3e 3c 62 3e 74 65 78 74 5f 73 65  ..<li><b>text_se
2a40: 70 61 72 61 74 6f 72 3c 2f 62 3e 20 28 3c 69 3e  parator</b> (<i>
2a50: 3c 62 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 62 3e 3c  <b>optional</b><
2a60: 2f 69 3e 29 3a 20 74 68 65 20 63 68 61 72 61 63  /i>): the charac
2a70: 74 65 72 20 61 63 74 69 6e 67 20 61 73 20 61 20  ter acting as a 
2a80: 73 74 72 69 6e 67 20 64 65 6c 69 6d 69 74 65 72  string delimiter
2a90: 2e 3c 62 72 3e 0d 0a 56 61 6c 69 64 20 76 61 6c  .<br>..Valid val
2aa0: 75 65 73 20 61 72 65 20 61 6e 79 20 70 72 69 6e  ues are any prin
2ab0: 74 61 62 6c 65 20 63 68 61 72 61 63 74 65 72 20  table character 
2ac0: 6f 72 20 74 68 65 20 73 70 65 63 69 61 6c 20 6d  or the special m
2ad0: 6e 65 6d 6f 6e 69 63 20 6e 6f 74 61 74 69 6f 6e  nemonic notation
2ae0: 73 20 3c 62 3e 53 49 4e 47 4c 45 51 55 4f 54 45  s <b>SINGLEQUOTE
2af0: 3c 2f 62 3e 2c 20 3c 62 3e 44 4f 55 42 4c 45 51  </b>, <b>DOUBLEQ
2b00: 55 4f 54 45 3c 2f 62 3e 20 6f 72 20 3c 62 3e 4e  UOTE</b> or <b>N
2b10: 4f 4e 45 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 49 66  ONE</b>.<br>..If
2b20: 20 6e 6f 74 20 65 78 70 6c 69 63 69 74 6c 79 20   not explicitly 
2b30: 73 70 65 63 69 66 69 65 64 20 3c 62 3e 44 4f 55  specified <b>DOU
2b40: 42 4c 45 51 55 4f 54 45 3c 2f 62 3e 20 77 69 6c  BLEQUOTE</b> wil
2b50: 6c 20 61 6c 77 61 79 73 20 62 65 20 61 73 73 75  l always be assu
2b60: 6d 65 64 20 28 64 65 66 61 75 6c 74 20 73 65 74  med (default set
2b70: 74 69 6e 67 29 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  ting)</li>..<li>
2b80: 3c 62 3e 66 69 65 6c 64 5f 73 65 70 61 72 61 74  <b>field_separat
2b90: 6f 72 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6f 70  or</b> (<i><b>op
2ba0: 74 69 6f 6e 61 6c 3c 2f 62 3e 3c 2f 69 3e 29 3a  tional</b></i>):
2bb0: 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 61   the character a
2bc0: 63 74 69 6e 67 20 61 73 20 61 20 64 65 6c 69 6d  cting as a delim
2bd0: 69 74 65 72 20 62 65 74 77 65 65 6e 20 63 6f 6e  iter between con
2be0: 73 65 63 75 74 69 76 65 20 66 69 65 6c 64 73 2e  secutive fields.
2bf0: 3c 62 72 3e 0d 0a 56 61 6c 69 64 20 76 61 6c 75  <br>..Valid valu
2c00: 65 73 20 61 72 65 20 61 6e 79 20 70 72 69 6e 74  es are any print
2c10: 61 62 6c 65 20 63 68 61 72 61 63 74 65 72 20 6f  able character o
2c20: 72 20 74 68 65 20 73 70 65 63 69 61 6c 20 6d 6e  r the special mn
2c30: 65 6d 6f 6e 69 63 20 6e 6f 74 61 74 69 6f 6e 73  emonic notations
2c40: 20 3c 62 3e 54 41 42 3c 2f 62 3e 2e 3c 62 72 3e   <b>TAB</b>.<br>
2c50: 0d 0a 49 66 20 6e 6f 74 20 65 78 70 6c 69 63 69  ..If not explici
2c60: 74 6c 79 20 73 70 65 63 69 66 69 65 64 20 3c 62  tly specified <b
2c70: 3e 54 41 42 3c 2f 62 3e 20 77 69 6c 6c 20 61 6c  >TAB</b> will al
2c80: 77 61 79 73 20 62 65 20 61 73 73 75 6d 65 64 20  ways be assumed 
2c90: 28 64 65 66 61 75 6c 74 20 73 65 74 74 69 6e 67  (default setting
2ca0: 29 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62 72  )</li>..</ul><br
2cb0: 3e 0d 0a 3c 74 61 62 6c 65 20 62 67 63 6f 6c 6f  >..<table bgcolo
2cc0: 72 3d 22 23 66 66 66 66 64 30 22 20 63 65 6c 6c  r="#ffffd0" cell
2cd0: 70 61 64 64 69 6e 67 3d 22 31 38 22 3e 3c 74 72  padding="18"><tr
2ce0: 3e 3c 74 64 3e 0d 0a 3c 62 3e 4e 6f 74 65 3c 2f  ><td>..<b>Note</
2cf0: 62 3e 3a 20 71 75 6f 74 69 6e 67 20 6f 72 20 6e  b>: quoting or n
2d00: 6f 74 20 61 6e 79 20 54 65 78 74 20 53 74 72 69  ot any Text Stri
2d10: 6e 67 20 77 68 65 6e 20 69 74 20 61 70 70 65 61  ng when it appea
2d20: 72 73 20 61 73 20 61 20 56 69 72 74 75 61 6c 20  rs as a Virtual 
2d30: 54 61 62 6c 65 20 61 72 67 75 6d 65 6e 74 20 68  Table argument h
2d40: 61 73 20 61 62 73 6f 6c 75 74 65 6c 79 20 6e 6f  as absolutely no
2d50: 20 65 66 66 65 63 74 2e 0d 0a 3c 76 65 72 62 61   effect...<verba
2d60: 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20 43 52 45  tim>..SELECT CRE
2d70: 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c  ATE VIRTUAL TABL
2d80: 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e 47  E my_table USING
2d90: 20 56 69 72 74 75 61 6c 54 65 78 74 28 20 2f 68   VirtualText( /h
2da0: 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79 66 69 6c  ome/sandro/myfil
2db0: 65 2e 74 78 74 20 2c 20 43 50 31 32 35 32 20 2c  e.txt , CP1252 ,
2dc0: 20 31 20 2c 20 50 4f 49 4e 54 20 2c 20 4e 4f 4e   1 , POINT , NON
2dd0: 45 20 2c 20 54 41 42 20 29 3b 0d 0a 6f 72 0d 0a  E , TAB );..or..
2de0: 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49  SELECT CREATE VI
2df0: 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74  RTUAL TABLE my_t
2e00: 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75  able USING Virtu
2e10: 61 6c 54 65 78 74 28 20 27 2f 68 6f 6d 65 2f 73  alText( '/home/s
2e20: 61 6e 64 72 6f 2f 6d 79 66 69 6c 65 2e 74 78 74  andro/myfile.txt
2e30: 27 20 2c 20 27 43 50 31 32 35 32 27 20 2c 20 31  ' , 'CP1252' , 1
2e40: 20 2c 20 27 50 4f 49 4e 54 27 20 2c 20 27 4e 4f   , 'POINT' , 'NO
2e50: 4e 45 27 20 2c 20 27 54 41 42 27 20 29 3b 0d 0a  NE' , 'TAB' );..
2e60: 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 42 6f 74  </verbatim>..Bot
2e70: 68 20 6e 6f 74 61 74 69 6f 6e 73 20 77 69 6c 6c  h notations will
2e80: 20 70 72 6f 64 75 63 65 20 65 78 61 63 74 6c 79   produce exactly
2e90: 20 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74 69   the same identi
2ea0: 63 61 6c 20 72 65 73 75 6c 74 2e 0d 0a 3c 2f 74  cal result...</t
2eb0: 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d  d></tr></table>.
2ec0: 0a 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 62 67  .<br>..<table bg
2ed0: 63 6f 6c 6f 72 3d 22 23 64 30 66 66 64 30 22 20  color="#d0ffd0" 
2ee0: 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 31 38 22  cellpadding="18"
2ef0: 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 42  ><tr><td>..<h3>B
2f00: 65 73 74 20 70 72 61 63 74 69 63 65 73 20 61 6e  est practices an
2f10: 64 20 6b 6e 6f 77 6e 20 6c 69 6d 69 74 61 74 69  d known limitati
2f20: 6f 6e 73 3c 2f 68 33 3e 0d 0a 3c 75 6c 3e 0d 0a  ons</h3>..<ul>..
2f30: 3c 6c 69 3e 3c 62 3e 42 65 20 61 77 61 72 65 3c  <li><b>Be aware<
2f40: 2f 62 3e 3a 20 6f 70 65 6e 69 6e 67 20 62 69 67  /b>: opening big
2f50: 20 6f 72 20 68 75 67 65 20 74 65 78 74 20 66 69   or huge text fi
2f60: 6c 65 73 20 63 6f 75 6c 64 20 65 61 73 69 6c 79  les could easily
2f70: 20 72 65 71 75 69 72 65 20 6d 61 73 73 69 76 65   require massive
2f80: 20 52 41 4d 20 61 6c 6c 6f 63 61 74 69 6f 6e 73   RAM allocations
2f90: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 57  .</li>..<li><b>W
2fa0: 61 72 6e 69 6e 67 3c 2f 62 3e 3a 20 61 74 74 65  arning</b>: atte
2fb0: 6d 70 74 69 6e 67 20 74 6f 20 61 63 63 65 73 73  mpting to access
2fc0: 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 54 65 78   an external Tex
2fd0: 74 20 66 69 6c 65 20 62 79 20 62 6c 69 6e 64 6c  t file by blindl
2fe0: 79 20 73 70 65 63 69 66 79 69 6e 67 20 20 72 61  y specifying  ra
2ff0: 6e 64 6f 6d 20 63 68 6f 6f 73 65 6e 20 64 65 6c  ndom choosen del
3000: 69 6d 69 74 65 72 73 20 61 6e 64 20 73 65 70 61  imiters and sepa
3010: 72 61 74 6f 72 73 20 6d 61 79 20 65 61 73 69 6c  rators may easil
3020: 79 20 68 61 76 65 20 63 61 74 61 73 74 72 6f 70  y have catastrop
3030: 68 69 63 20 65 66 66 65 63 74 73 2e 3c 62 72 3e  hic effects.<br>
3040: 0d 0a 41 6c 77 61 79 73 20 63 61 72 65 66 75 6c  ..Always careful
3050: 6c 79 20 63 68 65 63 6b 20 74 68 65 20 61 63 74  ly check the act
3060: 75 61 6c 20 70 61 79 6c 6f 61 64 20 6f 66 20 74  ual payload of t
3070: 68 65 20 54 65 78 74 20 66 69 6c 65 20 62 65 66  he Text file bef
3080: 6f 72 65 20 61 74 74 65 6d 70 74 69 6e 67 20 74  ore attempting t
3090: 6f 20 61 63 63 65 73 73 20 69 74 2e 3c 2f 6c 69  o access it.</li
30a0: 3e 0d 0a 3c 6c 69 3e 56 69 72 74 75 61 6c 20 54  >..<li>Virtual T
30b0: 61 62 6c 65 73 20 61 72 65 20 6e 6f 74 20 72 65  ables are not re
30c0: 61 6c 6c 79 20 67 65 6e 75 69 6e 65 20 44 61 74  ally genuine Dat
30d0: 61 62 61 73 65 20 54 61 62 6c 65 73 2c 20 74 68  abase Tables, th
30e0: 65 79 20 61 72 65 20 6a 75 73 74 20 70 72 65 74  ey are just pret
30f0: 65 6e 64 69 6e 67 20 74 6f 20 62 65 2e 3c 2f 6c  ending to be.</l
3100: 69 3e 0d 0a 3c 6c 69 3e 56 69 72 74 75 61 6c 20  i>..<li>Virtual 
3110: 54 61 62 6c 65 73 20 68 61 76 65 20 76 65 72 79  Tables have very
3120: 20 70 6f 6f 72 20 73 70 65 65 64 20 70 65 72 66   poor speed perf
3130: 6f 72 6d 61 6e 63 65 73 20 77 68 65 6e 20 63 6f  ormances when co
3140: 6d 70 61 72 65 64 20 74 6f 20 67 65 6e 75 69 6e  mpared to genuin
3150: 65 20 44 61 74 61 62 61 73 65 20 54 61 62 6c 65  e Database Table
3160: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 43 6f 6d  s.</li>..<li>Com
3170: 70 6c 65 78 20 53 51 4c 20 71 75 65 72 69 65 73  plex SQL queries
3180: 20 3c 62 3e 4a 4f 49 4e 3c 2f 62 3e 69 6e 67 20   <b>JOIN</b>ing 
3190: 73 65 76 65 72 61 6c 20 54 61 62 6c 65 73 20 63  several Tables c
31a0: 61 6e 20 6f 66 74 65 6e 20 72 65 74 75 72 6e 20  an often return 
31b0: 6f 64 64 20 61 6e 64 20 6d 69 73 6c 65 61 64 69  odd and misleadi
31c0: 6e 67 20 72 65 73 75 6c 74 73 65 74 73 2c 20 69  ng resultsets, i
31d0: 66 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 6f 66  f one or more of
31e0: 20 74 68 65 20 3c 62 3e 4a 4f 49 4e 3c 2f 62 3e   the <b>JOIN</b>
31f0: 65 64 20 54 61 62 6c 65 73 20 61 72 65 20 6f 66  ed Tables are of
3200: 20 74 68 65 20 56 69 72 74 75 61 6c 20 74 79 70   the Virtual typ
3210: 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65  e.</li>..<li>The
3220: 20 62 65 73 74 20 75 73 61 67 65 20 79 6f 75 20   best usage you 
3230: 63 61 6e 20 64 6f 20 6f 66 20 61 20 56 69 72 74  can do of a Virt
3240: 75 61 6c 20 54 61 62 6c 65 20 69 73 20 74 6f 20  ual Table is to 
3250: 6a 75 73 74 20 73 75 70 70 6f 72 74 20 62 61 73  just support bas
3260: 69 63 20 64 61 74 61 20 69 6d 70 6f 72 74 20 70  ic data import p
3270: 72 6f 63 65 73 73 65 73 2c 20 6f 72 20 74 6f 20  rocesses, or to 
3280: 71 75 69 63 6b 6c 79 20 67 65 74 20 61 6e 20 6f  quickly get an o
3290: 76 65 72 61 6c 6c 20 67 6c 61 6e 63 65 20 61 74  verall glance at
32a0: 20 61 20 66 75 6c 6c 20 64 61 74 61 73 65 74 20   a full dataset 
32b0: 77 69 74 68 6f 75 74 20 6e 65 63 65 73 73 61 72  without necessar
32c0: 69 6c 79 20 69 6d 70 6f 72 74 69 6e 67 20 69 74  ily importing it
32d0: 20 69 6e 74 6f 20 74 68 65 20 44 61 74 61 62 61   into the Databa
32e0: 73 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 72  se.</li>..<li>Pr
32f0: 65 74 65 6e 64 69 6e 67 20 74 6f 20 75 73 65 20  etending to use 
3300: 61 20 56 69 72 74 75 61 6c 20 54 61 62 6c 65 20  a Virtual Table 
3310: 61 73 20 61 20 66 75 6c 6c 20 72 65 70 6c 61 63  as a full replac
3320: 65 6d 65 6e 74 20 6f 66 20 69 6d 70 6f 72 74 69  ement of importi
3330: 6e 67 20 61 6c 6c 20 64 61 74 61 20 77 69 74 68  ng all data with
3340: 69 6e 20 61 20 67 65 6e 75 69 6e 65 20 44 61 74  in a genuine Dat
3350: 61 62 61 73 65 20 54 61 62 6c 65 20 69 73 20 73  abase Table is s
3360: 74 72 6f 6e 67 6c 79 20 64 69 73 63 6f 75 72 61  trongly discoura
3370: 67 65 64 2c 20 61 6e 64 20 6e 65 76 65 72 20 69  ged, and never i
3380: 73 20 61 20 73 6d 61 72 74 20 69 64 65 61 2e 3c  s a smart idea.<
3390: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74  /li>..</ul>..</t
33a0: 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d  d></tr></table>.
33b0: 0a 3c 62 72 3e 0d 0a 0d 0a 3c 61 20 68 72 65 66  .<br>....<a href
33c0: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61  ="https://www.ga
33d0: 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c  ia-gis.it/fossil
33e0: 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f 68  /libspatialite/h
33f0: 6f 6d 65 22 3e 62 61 63 6b 20 74 6f 20 6d 61 69  ome">back to mai
3400: 6e 20 70 61 67 65 3c 2f 61 3e 0a 5a 20 34 63 30  n page</a>.Z 4c0
3410: 30 31 65 38 39 62 63 31 30 37 64 64 62 30 64 61  01e89bc107ddb0da
3420: 64 65 31 63 31 63 65 39 66 61 32 63 62 0a        de1c1ce9fa2cb.