Hex Artifact Content
Not logged in

Artifact 691aa349d03dd9c87bad4bce4606fdec75e4b17f:

Wiki page [Virtual Tables (misc)] by sandro 2018-08-22 15:43:30.
0000: 44 20 32 30 31 38 2d 30 38 2d 32 32 54 31 35 3a  D 2018-08-22T15:
0010: 34 33 3a 33 30 2e 34 36 31 0a 4c 20 56 69 72 74  43:30.461.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 62 39 30 39 61 36 33 39 32 33  sc).P b909a63923
0040: 33 35 62 32 33 62 66 64 66 61 38 34 35 38 66 32  35b23bfdfa8458f2
0050: 65 61 39 31 30 35 39 62 34 63 65 64 36 30 0a 55  ea91059b4ced60.U
0060: 20 73 61 6e 64 72 6f 0a 57 20 32 32 38 38 30 0a   sandro.W 22880.
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 3c 61 20 69 64 3d 22 56 69  >..<h1><a id="Vi
00d0: 72 74 75 61 6c 53 68 61 70 65 22 3e 56 69 72 74  rtualShape">Virt
00e0: 75 61 6c 53 68 61 70 65 3c 2f 61 3e 3c 2f 68 31  ualShape</a></h1
00f0: 3e 0d 0a 54 68 65 20 3c 62 3e 56 69 72 74 75 61  >..The <b>Virtua
0100: 6c 53 68 61 70 65 3c 2f 62 3e 20 49 6e 74 65 72  lShape</b> Inter
0110: 66 61 63 65 20 61 6c 6c 6f 77 73 20 74 6f 20 64  face allows to d
0120: 69 72 65 63 74 6c 79 20 61 63 63 65 73 73 20 61  irectly access a
0130: 6e 20 65 78 74 65 72 6e 61 6c 20 53 68 61 70 65  n external Shape
0140: 46 69 6c 65 20 62 79 20 75 73 69 6e 67 20 73 74  File by using st
0150: 61 6e 64 61 72 64 20 53 70 61 74 69 61 6c 20 53  andard Spatial S
0160: 51 4c 20 71 75 65 72 69 65 73 2e 3c 62 72 3e 0d  QL queries.<br>.
0170: 0a 53 79 6e 74 61 78 20 66 6f 72 20 63 72 65 61  .Syntax for crea
0180: 74 69 6e 67 20 61 20 56 69 72 74 75 61 6c 53 68  ting a VirtualSh
0190: 61 70 65 20 54 61 62 6c 65 3a 0d 0a 3c 76 65 72  ape Table:..<ver
01a0: 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20 43  batim>..SELECT C
01b0: 52 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41  REATE VIRTUAL TA
01c0: 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49  BLE my_table USI
01d0: 4e 47 20 56 69 72 74 75 61 6c 53 68 61 70 65 20  NG VirtualShape 
01e0: 28 20 73 68 70 5f 70 61 74 68 20 2c 20 63 68 61  ( shp_path , cha
01f0: 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67 20 2c 20  rset_encoding , 
0200: 73 72 69 64 20 29 3b 0d 0a 0d 0a 53 45 4c 45 43  srid );....SELEC
0210: 54 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c  T CREATE VIRTUAL
0220: 20 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20   TABLE my_table 
0230: 55 53 49 4e 47 20 56 69 72 74 75 61 6c 53 68 61  USING VirtualSha
0240: 70 65 20 28 20 73 68 70 5f 70 61 74 68 20 2c 20  pe ( shp_path , 
0250: 63 68 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67  charset_encoding
0260: 20 2c 20 73 72 69 64 20 2c 20 74 65 78 74 5f 64   , srid , text_d
0270: 61 74 65 73 20 29 3b 0d 0a 0d 0a 53 45 4c 45 43  ates );....SELEC
0280: 54 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c  T CREATE VIRTUAL
0290: 20 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20   TABLE my_table 
02a0: 55 53 49 4e 47 20 56 69 72 74 75 61 6c 53 68 61  USING VirtualSha
02b0: 70 65 20 28 20 73 68 70 5f 70 61 74 68 20 2c 20  pe ( shp_path , 
02c0: 63 68 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67  charset_encoding
02d0: 20 2c 20 73 72 69 64 20 2c 20 74 65 78 74 5f 64   , srid , text_d
02e0: 61 74 65 73 20 2c 20 63 6f 6c 6e 61 6d 65 5f 63  ates , colname_c
02f0: 61 73 65 20 29 3b 0d 0a 3c 2f 76 65 72 62 61 74  ase );..</verbat
0300: 69 6d 3e 0d 0a 53 75 70 70 6f 72 74 65 64 20 61  im>..Supported a
0310: 72 67 75 6d 65 6e 74 73 20 61 6e 64 20 74 68 65  rguments and the
0320: 69 72 20 69 6e 74 65 72 70 72 65 74 61 74 69 6f  ir interpretatio
0330: 6e 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62  n:..<ul>..<li><b
0340: 3e 73 68 70 5f 70 61 74 68 3c 2f 62 3e 20 28 3c  >shp_path</b> (<
0350: 69 3e 3c 62 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f  i><b>mandatory</
0360: 62 3e 3c 2f 69 3e 29 3a 20 74 68 65 20 72 65 6c  b></i>): the rel
0370: 61 74 69 76 65 20 6f 72 20 61 62 73 6f 6c 75 74  ative or absolut
0380: 65 20 70 61 74 68 6e 61 6d 65 20 6c 65 61 64 69  e pathname leadi
0390: 6e 67 20 74 6f 20 74 68 65 20 65 78 74 65 72 6e  ng to the extern
03a0: 61 6c 20 53 68 61 70 65 66 69 6c 65 2e 0d 0a 3c  al Shapefile...<
03b0: 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 4e 6f 74 65  ul>..<li><b>Note
03c0: 3c 2f 62 3e 3a 20 61 6e 79 20 53 68 61 70 65 66  </b>: any Shapef
03d0: 69 6c 65 20 72 65 71 75 69 72 65 73 20 61 74 20  ile requires at 
03e0: 6c 65 61 73 74 20 74 68 72 65 65 20 69 6e 64 69  least three indi
03f0: 76 69 64 75 61 6c 20 6d 65 6d 62 65 72 73 20 73  vidual members s
0400: 68 61 72 69 6e 67 20 74 68 65 20 73 61 6d 65 20  haring the same 
0410: 62 61 73 65 20 6e 61 6d 65 20 62 75 74 20 77 69  base name but wi
0420: 74 68 20 64 69 66 66 65 72 65 6e 74 20 73 75 66  th different suf
0430: 66 69 78 65 73 20 28 3c 69 3e 2a 2e 73 68 70 3c  fixes (<i>*.shp<
0440: 2f 69 3e 2c 20 3c 69 3e 2a 2e 73 68 78 3c 2f 69  /i>, <i>*.shx</i
0450: 3e 20 61 6e 64 20 3c 69 3e 2a 2e 64 62 66 3c 2f  > and <i>*.dbf</
0460: 69 3e 29 2e 3c 62 72 3e 0d 0a 41 6c 6c 20 73 75  i>).<br>..All su
0470: 66 66 69 78 65 73 20 77 69 6c 6c 20 62 65 20 61  ffixes will be a
0480: 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 68 61 6e  utomatically han
0490: 64 6c 65 64 20 62 79 20 56 69 72 74 75 61 6c 53  dled by VirtualS
04a0: 68 61 70 65 2c 20 61 6e 64 20 63 6f 6e 73 65 71  hape, and conseq
04b0: 75 65 6e 74 6c 79 20 74 68 65 20 3c 62 3e 73 68  uently the <b>sh
04c0: 70 5f 70 61 74 68 3c 2f 62 3e 20 61 72 67 75 6d  p_path</b> argum
04d0: 65 6e 74 20 3c 62 3e 3c 75 3e 3c 69 3e 6d 75 73  ent <b><u><i>mus
04e0: 74 20 6e 6f 74 20 73 70 65 63 69 66 79 20 61 6e  t not specify an
04f0: 79 20 70 72 65 66 69 78 3c 2f 69 3e 3c 2f 75 3e  y prefix</i></u>
0500: 3c 2f 62 3e 2c 20 6a 75 73 74 20 74 68 65 20 62  </b>, just the b
0510: 61 72 65 20 62 61 73 65 20 70 61 74 68 20 6d 75  are base path mu
0520: 73 74 20 62 65 20 70 61 73 73 65 64 2e 3c 2f 6c  st be passed.</l
0530: 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a  i>..</ul></li>..
0540: 3c 6c 69 3e 3c 62 3e 63 68 61 72 73 65 74 5f 65  <li><b>charset_e
0550: 6e 63 6f 64 69 6e 67 3c 2f 62 3e 20 28 3c 69 3e  ncoding</b> (<i>
0560: 3c 62 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f 62 3e  <b>mandatory</b>
0570: 3c 2f 69 3e 29 3a 20 63 61 6e 6f 6e 69 63 61 6c  </i>): canonical
0580: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 68 61   name of the cha
0590: 72 73 65 74 20 65 6e 63 6f 64 69 6e 67 20 61 64  rset encoding ad
05a0: 6f 70 74 65 64 20 62 79 20 74 68 65 20 3c 62 3e  opted by the <b>
05b0: 44 42 46 3c 2f 62 3e 20 6d 65 6d 62 65 72 2e 0d  DBF</b> member..
05c0: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 45 78 61 6d 70  .<ul>..<li>Examp
05d0: 6c 65 73 20 6f 66 20 76 61 6c 69 64 20 6e 61 6d  les of valid nam
05e0: 65 73 20 61 72 65 3a 20 3c 62 3e 41 53 43 49 49  es are: <b>ASCII
05f0: 3c 2f 62 3e 2c 20 3c 62 3e 55 54 46 2d 38 3c 2f  </b>, <b>UTF-8</
0600: 62 3e 2c 20 3c 62 3e 43 50 38 35 30 3c 2f 62 3e  b>, <b>CP850</b>
0610: 2c 20 3c 62 3e 49 53 4f 2d 38 38 34 39 2d 31 3c  , <b>ISO-8849-1<
0620: 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 59 6f  /b></li>..<li>Yo
0630: 75 20 63 61 6e 20 63 68 65 63 6b 20 74 68 65 20  u can check the 
0640: 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 73 75 70  full list of sup
0650: 70 6f 72 74 65 64 20 63 68 61 72 73 65 74 20 65  ported charset e
0660: 6e 63 6f 64 69 6e 67 73 20 66 72 6f 6d 20 3c 61  ncodings from <a
0670: 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77   href="https://w
0680: 77 77 2e 67 6e 75 2e 6f 72 67 2f 73 6f 66 74 77  ww.gnu.org/softw
0690: 61 72 65 2f 6c 69 62 69 63 6f 6e 76 2f 22 3e 68  are/libiconv/">h
06a0: 65 72 65 3c 2f 61 3e 2e 3c 2f 6c 69 3e 0d 0a 3c  ere</a>.</li>..<
06b0: 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c  /ul></li>..<li><
06c0: 62 3e 73 72 69 64 3c 2f 62 3e 20 28 3c 69 3e 3c  b>srid</b> (<i><
06d0: 62 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f 62 3e 3c  b>mandatory</b><
06e0: 2f 69 3e 29 3a 20 74 68 65 20 53 52 49 44 20 76  /i>): the SRID v
06f0: 61 6c 75 65 20 6f 66 20 61 6c 6c 20 47 65 6f 6d  alue of all Geom
0700: 65 74 72 69 65 73 20 77 69 74 68 69 6e 20 74 68  etries within th
0710: 65 20 53 68 61 70 65 66 69 6c 65 2e 0d 0a 3c 75  e Shapefile...<u
0720: 6c 3e 0d 0a 3c 6c 69 3e 45 78 61 6d 70 6c 65 73  l>..<li>Examples
0730: 20 6f 66 20 76 61 6c 69 64 20 53 52 49 44 20 76   of valid SRID v
0740: 61 6c 75 65 73 20 61 72 65 3a 20 3c 62 3e 34 33  alues are: <b>43
0750: 32 36 3c 2f 62 3e 2c 20 3c 62 3e 33 30 30 33 3c  26</b>, <b>3003<
0760: 2f 62 3e 2c 20 3c 62 3e 33 32 36 33 32 3c 2f 62  /b>, <b>32632</b
0770: 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c  ></li>..</ul></l
0780: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74 65 78 74 5f  i>..<li><b>text_
0790: 64 61 74 65 73 3c 2f 62 3e 20 28 3c 69 3e 3c 62  dates</b> (<i><b
07a0: 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 62 3e 3c 2f 69  >optional</b></i
07b0: 3e 29 3a 20 74 68 69 73 20 69 73 20 61 20 3c 62  >): this is a <b
07c0: 3e 42 4f 4f 4c 45 41 4e 3c 2f 62 3e 20 66 6c 61  >BOOLEAN</b> fla
07d0: 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 66  g:..<ul>..<li>if
07e0: 20 73 65 74 20 74 6f 20 3c 62 3e 30 3c 2f 62 3e   set to <b>0</b>
07f0: 20 28 3c 62 3e 46 41 4c 53 45 3c 2f 62 3e 29 20   (<b>FALSE</b>) 
0800: 61 6c 6c 20 66 69 65 6c 64 73 20 6f 66 20 74 68  all fields of th
0810: 65 20 3c 62 3e 44 41 54 45 3c 2f 62 3e 20 74 79  e <b>DATE</b> ty
0820: 70 65 20 77 69 6c 6c 20 62 65 20 72 65 70 72 65  pe will be repre
0830: 73 65 6e 74 65 64 20 61 73 20 3c 61 20 68 72 65  sented as <a hre
0840: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 73  f="https://www.s
0850: 71 6c 69 74 65 2e 6f 72 67 2f 6c 61 6e 67 5f 64  qlite.org/lang_d
0860: 61 74 65 66 75 6e 63 2e 68 74 6d 6c 22 3e 6a 75  atefunc.html">ju
0870: 6c 69 61 6e 20 64 61 74 65 73 3c 2f 61 3e 3c 2f  lian dates</a></
0880: 6c 69 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65 74 20  li>..<li>if set 
0890: 74 6f 20 61 6e 79 20 6f 74 68 65 72 20 69 6e 74  to any other int
08a0: 65 67 65 72 20 76 61 6c 75 65 20 28 3c 62 3e 54  eger value (<b>T
08b0: 52 55 45 3c 2f 62 3e 29 20 61 6c 6c 20 66 69 65  RUE</b>) all fie
08c0: 6c 64 73 20 6f 66 20 74 68 65 20 3c 62 3e 44 41  lds of the <b>DA
08d0: 54 45 3c 2f 62 3e 20 74 79 70 65 20 77 69 6c 6c  TE</b> type will
08e0: 20 62 65 20 72 65 70 72 65 73 65 6e 74 65 64 20   be represented 
08f0: 61 73 20 54 65 78 74 20 53 74 72 69 6e 67 73 20  as Text Strings 
0900: 61 73 20 65 2e 67 2e 20 3c 62 3e 32 30 31 38 2d  as e.g. <b>2018-
0910: 30 38 2d 32 31 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a  08-21</b></li>..
0920: 3c 6c 69 3e 69 66 20 6e 6f 74 20 65 78 70 6c 69  <li>if not expli
0930: 63 69 74 6c 79 20 73 70 65 63 69 66 69 65 64 2c  citly specified,
0940: 20 3c 62 3e 54 52 55 45 3c 2f 62 3e 20 77 69 6c   <b>TRUE</b> wil
0950: 6c 20 61 6c 77 61 79 73 20 62 65 20 61 73 73 75  l always be assu
0960: 6d 65 64 20 28 64 65 66 61 75 6c 74 20 73 65 74  med (default set
0970: 74 69 6e 67 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75  ting).</li>..</u
0980: 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  l></li>..<li><b>
0990: 63 6f 6c 6e 61 6d 65 5f 63 61 73 65 3c 2f 62 3e  colname_case</b>
09a0: 20 28 3c 69 3e 3c 62 3e 6f 70 74 69 6f 6e 61 6c   (<i><b>optional
09b0: 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 74 68 69 73 20  </b></i>): this 
09c0: 61 72 67 75 6d 65 6e 74 20 73 70 65 63 69 66 69  argument specifi
09d0: 65 73 20 69 66 20 61 6c 6c 20 63 6f 6c 75 6d 6e  es if all column
09e0: 20 6e 61 6d 65 73 20 73 68 6f 75 6c 64 20 62 65   names should be
09f0: 20 63 6f 6e 73 69 64 65 72 65 64 20 75 70 70 65   considered uppe
0a00: 72 63 61 73 65 20 6f 72 20 6c 6f 77 65 72 63 61  rcase or lowerca
0a10: 73 65 2e 3c 62 72 3e 0d 0a 56 61 6c 69 64 20 73  se.<br>..Valid s
0a20: 65 74 74 69 6e 67 73 20 61 72 65 3a 0d 0a 3c 75  ettings are:..<u
0a30: 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 75 70 70 65 72  l>..<li><b>upper
0a40: 63 61 73 65 3c 2f 62 3e 20 6f 72 20 3c 62 3e 75  case</b> or <b>u
0a50: 70 70 65 72 3c 2f 62 3e 3a 20 61 6c 6c 20 63 6f  pper</b>: all co
0a60: 6c 75 6d 6e 20 6e 61 6d 65 73 20 77 69 6c 6c 20  lumn names will 
0a70: 62 65 20 66 75 6c 6c 79 20 63 61 70 69 74 61 6c  be fully capital
0a80: 69 7a 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  ized.</li>..<li>
0a90: 3c 62 3e 6c 6f 77 65 72 63 61 73 65 3c 2f 62 3e  <b>lowercase</b>
0aa0: 20 6f 72 20 3c 62 3e 6c 6f 77 65 72 3c 2f 62 3e   or <b>lower</b>
0ab0: 3a 20 61 6c 6c 20 63 6f 6c 75 6d 6e 20 6e 61 6d  : all column nam
0ac0: 65 73 20 77 69 6c 6c 20 62 65 20 66 75 6c 6c 20  es will be full 
0ad0: 6c 6f 77 65 72 63 61 73 65 2e 3c 2f 6c 69 3e 0d  lowercase.</li>.
0ae0: 0a 3c 6c 69 3e 3c 62 3e 73 61 6d 65 63 61 73 65  .<li><b>samecase
0af0: 3c 2f 62 3e 20 6f 72 20 3c 62 3e 73 61 6d 65 3c  </b> or <b>same<
0b00: 2f 62 3e 3a 20 61 6c 6c 20 63 6f 6c 75 6d 6e 20  /b>: all column 
0b10: 6e 61 6d 65 73 20 77 69 6c 6c 20 62 65 20 65 78  names will be ex
0b20: 61 63 74 6c 79 20 70 72 65 73 65 72 76 65 64 20  actly preserved 
0b30: 61 73 20 74 68 65 79 20 61 72 65 20 64 65 66 69  as they are defi
0b40: 6e 65 64 20 69 6e 74 6f 20 74 68 65 20 44 42 46  ned into the DBF
0b50: 20 6d 65 6d 62 65 72 2e 3c 2f 6c 69 3e 0d 0a 3c   member.</li>..<
0b60: 6c 69 3e 69 66 20 6e 6f 74 20 73 70 65 63 69 66  li>if not specif
0b70: 69 65 64 2c 20 6f 72 20 69 66 20 61 6e 79 20 6f  ied, or if any o
0b80: 74 68 65 72 20 64 65 66 69 6e 69 74 69 6f 6e 20  ther definition 
0b90: 64 65 66 69 6e 69 74 69 6f 6e 20 69 73 20 66 6f  definition is fo
0ba0: 75 6e 64 2c 20 3c 62 3e 6c 6f 77 65 72 63 61 73  und, <b>lowercas
0bb0: 65 3c 2f 62 3e 20 77 69 6c 6c 20 61 6c 77 61 79  e</b> will alway
0bc0: 73 20 62 65 20 61 73 73 75 6d 65 64 20 28 64 65  s be assumed (de
0bd0: 66 61 75 6c 74 20 73 65 74 74 69 6e 67 29 2e 3c  fault setting).<
0be0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e  /li>..</ul></li>
0bf0: 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 74 61  ..</ul><br>..<ta
0c00: 62 6c 65 20 62 67 63 6f 6c 6f 72 3d 22 23 66 66  ble bgcolor="#ff
0c10: 66 66 64 30 22 20 63 65 6c 6c 70 61 64 64 69 6e  ffd0" cellpaddin
0c20: 67 3d 22 31 38 22 3e 3c 74 72 3e 3c 74 64 3e 0d  g="18"><tr><td>.
0c30: 0a 3c 62 3e 4e 6f 74 65 3c 2f 62 3e 3a 20 71 75  .<b>Note</b>: qu
0c40: 6f 74 69 6e 67 20 6f 72 20 6e 6f 74 20 61 6e 79  oting or not any
0c50: 20 54 65 78 74 20 53 74 72 69 6e 67 20 77 68 65   Text String whe
0c60: 6e 20 69 74 20 61 70 70 65 61 72 73 20 61 73 20  n it appears as 
0c70: 61 20 56 69 72 74 75 61 6c 20 54 61 62 6c 65 20  a Virtual Table 
0c80: 61 72 67 75 6d 65 6e 74 20 68 61 73 20 61 62 73  argument has abs
0c90: 6f 6c 75 74 65 6c 79 20 6e 6f 20 65 66 66 65 63  olutely no effec
0ca0: 74 2e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a  t...<verbatim>..
0cb0: 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49  SELECT CREATE VI
0cc0: 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74  RTUAL TABLE my_t
0cd0: 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75  able USING Virtu
0ce0: 61 6c 53 68 61 70 65 28 20 2f 68 6f 6d 65 2f 73  alShape( /home/s
0cf0: 61 6e 64 72 6f 2f 6d 79 73 68 70 20 2c 20 43 50  andro/myshp , CP
0d00: 31 32 35 32 20 2c 20 33 30 30 33 20 2c 20 31 20  1252 , 3003 , 1 
0d10: 2c 20 6c 6f 77 65 72 20 29 3b 0d 0a 6f 72 0d 0a  , lower );..or..
0d20: 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49  SELECT CREATE VI
0d30: 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74  RTUAL TABLE my_t
0d40: 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75  able USING Virtu
0d50: 61 6c 53 68 61 70 65 28 20 27 2f 68 6f 6d 65 2f  alShape( '/home/
0d60: 73 61 6e 64 72 6f 2f 6d 79 73 68 70 27 20 2c 20  sandro/myshp' , 
0d70: 27 43 50 31 32 35 32 27 20 2c 20 33 30 30 33 20  'CP1252' , 3003 
0d80: 2c 20 31 20 2c 20 27 6c 6f 77 65 72 27 20 29 3b  , 1 , 'lower' );
0d90: 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 42  ..</verbatim>..B
0da0: 6f 74 68 20 6e 6f 74 61 74 69 6f 6e 73 20 77 69  oth notations wi
0db0: 6c 6c 20 70 72 6f 64 75 63 65 20 65 78 61 63 74  ll produce exact
0dc0: 6c 79 20 74 68 65 20 73 61 6d 65 20 69 64 65 6e  ly the same iden
0dd0: 74 69 63 61 6c 20 72 65 73 75 6c 74 2e 0d 0a 3c  tical result...<
0de0: 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65  /td></tr></table
0df0: 3e 0d 0a 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20  >..<br>..<table 
0e00: 62 67 63 6f 6c 6f 72 3d 22 23 64 30 66 66 64 30  bgcolor="#d0ffd0
0e10: 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 31  " cellpadding="1
0e20: 38 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33  8"><tr><td>..<h3
0e30: 3e 42 65 73 74 20 70 72 61 63 74 69 63 65 73 20  >Best practices 
0e40: 61 6e 64 20 6b 6e 6f 77 6e 20 6c 69 6d 69 74 61  and known limita
0e50: 74 69 6f 6e 73 3c 2f 68 33 3e 0d 0a 3c 75 6c 3e  tions</h3>..<ul>
0e60: 0d 0a 3c 6c 69 3e 56 69 72 74 75 61 6c 20 54 61  ..<li>Virtual Ta
0e70: 62 6c 65 73 20 61 72 65 20 6e 6f 74 20 72 65 61  bles are not rea
0e80: 6c 6c 79 20 67 65 6e 75 69 6e 65 20 44 61 74 61  lly genuine Data
0e90: 62 61 73 65 20 54 61 62 6c 65 73 2c 20 74 68 65  base Tables, the
0ea0: 79 20 61 72 65 20 6a 75 73 74 20 70 72 65 74 65  y are just prete
0eb0: 6e 64 69 6e 67 20 74 6f 20 62 65 2e 3c 2f 6c 69  nding to be.</li
0ec0: 3e 0d 0a 3c 6c 69 3e 56 69 72 74 75 61 6c 20 54  >..<li>Virtual T
0ed0: 61 62 6c 65 73 20 68 61 76 65 20 76 65 72 79 20  ables have very 
0ee0: 70 6f 6f 72 20 73 70 65 65 64 20 70 65 72 66 6f  poor speed perfo
0ef0: 72 6d 61 6e 63 65 73 20 77 68 65 6e 20 63 6f 6d  rmances when com
0f00: 70 61 72 65 64 20 74 6f 20 67 65 6e 75 69 6e 65  pared to genuine
0f10: 20 44 61 74 61 62 61 73 65 20 54 61 62 6c 65 73   Database Tables
0f20: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 43 6f 6d 70  .</li>..<li>Comp
0f30: 6c 65 78 20 53 51 4c 20 71 75 65 72 69 65 73 20  lex SQL queries 
0f40: 3c 62 3e 4a 4f 49 4e 3c 2f 62 3e 69 6e 67 20 73  <b>JOIN</b>ing s
0f50: 65 76 65 72 61 6c 20 54 61 62 6c 65 73 20 63 61  everal Tables ca
0f60: 6e 20 6f 66 74 65 6e 20 72 65 74 75 72 6e 20 6f  n often return o
0f70: 64 64 20 61 6e 64 20 6d 69 73 6c 65 61 64 69 6e  dd and misleadin
0f80: 67 20 72 65 73 75 6c 74 73 65 74 73 2c 20 69 66  g resultsets, if
0f90: 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 6f 66 20   one or more of 
0fa0: 74 68 65 20 3c 62 3e 4a 4f 49 4e 3c 2f 62 3e 65  the <b>JOIN</b>e
0fb0: 64 20 54 61 62 6c 65 73 20 61 72 65 20 6f 66 20  d Tables are of 
0fc0: 74 68 65 20 56 69 72 74 75 61 6c 20 74 79 70 65  the Virtual type
0fd0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20  .</li>..<li>The 
0fe0: 62 65 73 74 20 75 73 61 67 65 20 79 6f 75 20 63  best usage you c
0ff0: 61 6e 20 64 6f 20 6f 66 20 61 20 56 69 72 74 75  an do of a Virtu
1000: 61 6c 20 54 61 62 6c 65 20 69 73 20 74 6f 20 6a  al Table is to j
1010: 75 73 74 20 73 75 70 70 6f 72 74 20 62 61 73 69  ust support basi
1020: 63 20 64 61 74 61 20 69 6d 70 6f 72 74 20 70 72  c data import pr
1030: 6f 63 65 73 73 65 73 2c 20 6f 72 20 74 6f 20 71  ocesses, or to q
1040: 75 69 63 6b 6c 79 20 67 65 74 20 61 6e 20 6f 76  uickly get an ov
1050: 65 72 61 6c 6c 20 67 6c 61 6e 63 65 20 61 74 20  erall glance at 
1060: 61 20 66 75 6c 6c 20 64 61 74 61 73 65 74 20 77  a full dataset w
1070: 69 74 68 6f 75 74 20 6e 65 63 65 73 73 61 72 69  ithout necessari
1080: 6c 79 20 69 6d 70 6f 72 74 69 6e 67 20 69 74 20  ly importing it 
1090: 69 6e 74 6f 20 74 68 65 20 44 61 74 61 62 61 73  into the Databas
10a0: 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 72 65  e.</li>..<li>Pre
10b0: 74 65 6e 64 69 6e 67 20 74 6f 20 75 73 65 20 61  tending to use a
10c0: 20 56 69 72 74 75 61 6c 20 54 61 62 6c 65 20 61   Virtual Table a
10d0: 73 20 61 20 66 75 6c 6c 20 72 65 70 6c 61 63 65  s a full replace
10e0: 6d 65 6e 74 20 6f 66 20 69 6d 70 6f 72 74 69 6e  ment of importin
10f0: 67 20 61 6c 6c 20 64 61 74 61 20 77 69 74 68 69  g all data withi
1100: 6e 20 61 20 67 65 6e 75 69 6e 65 20 44 61 74 61  n a genuine Data
1110: 62 61 73 65 20 54 61 62 6c 65 20 69 73 20 73 74  base Table is st
1120: 72 6f 6e 67 6c 79 20 64 69 73 63 6f 75 72 61 67  rongly discourag
1130: 65 64 2c 20 61 6e 64 20 6e 65 76 65 72 20 69 73  ed, and never is
1140: 20 61 20 73 6d 61 72 74 20 69 64 65 61 2e 3c 2f   a smart idea.</
1150: 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a  li>..</ul><br>..
1160: 3c 62 3e 57 61 72 6e 69 6e 67 3c 2f 62 3e 3a 20  <b>Warning</b>: 
1170: 56 69 72 74 75 61 6c 53 68 61 70 65 20 54 61 62  VirtualShape Tab
1180: 6c 65 73 20 61 72 65 20 61 6c 77 61 79 73 20 73  les are always s
1190: 75 62 6a 65 63 74 20 74 6f 20 3c 62 3e 52 45 41  ubject to <b>REA
11a0: 44 2d 4f 4e 4c 59 3c 2f 62 3e 20 72 65 73 74 72  D-ONLY</b> restr
11b0: 69 63 74 69 6f 6e 73 2e 20 41 6e 79 20 61 74 74  ictions. Any att
11c0: 65 6d 70 74 20 74 6f 20 74 6f 20 65 78 65 63 75  empt to to execu
11d0: 74 65 20 61 6e 20 3c 62 3e 49 4e 53 45 52 54 3c  te an <b>INSERT<
11e0: 2f 62 3e 2c 20 3c 62 3e 55 50 44 41 54 45 3c 2f  /b>, <b>UPDATE</
11f0: 62 3e 20 6f 72 20 3c 62 3e 44 45 4c 45 54 45 3c  b> or <b>DELETE<
1200: 2f 62 3e 20 73 74 61 74 65 6d 65 6e 74 20 77 69  /b> statement wi
1210: 6c 6c 20 61 6c 77 61 79 73 20 72 65 74 75 72 6e  ll always return
1220: 20 61 6e 20 65 72 72 6f 72 2e 3c 62 72 3e 0d 0a   an error.<br>..
1230: 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c  </td></tr></tabl
1240: 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65  e>..<br>..<table
1250: 20 62 67 63 6f 6c 6f 72 3d 22 23 65 30 65 30 65   bgcolor="#e0e0e
1260: 30 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22  0" cellpadding="
1270: 31 38 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68  18"><tr><td>..<h
1280: 33 3e 52 65 6c 61 74 65 64 20 54 6f 70 69 63 73  3>Related Topics
1290: 3c 2f 68 33 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69  </h3>..<ul>..<li
12a0: 3e 54 68 65 20 3c 62 3e 49 6d 70 6f 72 74 53 48  >The <b>ImportSH
12b0: 50 28 29 3c 2f 62 3e 20 53 51 4c 20 66 75 6e 63  P()</b> SQL func
12c0: 74 69 6f 6e 20 61 6c 6c 6f 77 73 20 74 6f 20 63  tion allows to c
12d0: 72 65 61 74 65 20 61 6e 64 20 70 6f 70 75 6c 61  reate and popula
12e0: 74 65 20 61 20 67 65 6e 75 69 6e 65 20 53 70 61  te a genuine Spa
12f0: 74 69 61 6c 20 54 61 62 6c 65 20 62 79 20 69 6d  tial Table by im
1300: 70 6f 72 74 69 6e 67 20 61 6e 20 65 78 74 65 72  porting an exter
1310: 6e 61 6c 20 53 68 61 70 65 66 69 6c 65 2e 3c 2f  nal Shapefile.</
1320: 6c 69 3e 0d 0a 3c 6c 69 3e 41 6e 64 20 74 68 65  li>..<li>And the
1330: 20 3c 62 3e 45 78 70 6f 72 74 53 48 50 28 29 3c   <b>ExportSHP()<
1340: 2f 62 3e 20 73 69 73 74 65 72 20 66 75 6e 63 74  /b> sister funct
1350: 69 6f 6e 20 61 6c 6c 6f 77 73 20 74 6f 20 64 69  ion allows to di
1360: 72 65 63 74 6c 79 20 65 78 70 6f 72 74 20 61 20  rectly export a 
1370: 77 68 6f 6c 65 20 53 70 61 74 69 61 6c 20 54 61  whole Spatial Ta
1380: 62 6c 65 20 69 6e 74 6f 20 61 6e 20 65 78 74 65  ble into an exte
1390: 72 6e 61 6c 20 53 68 61 70 65 66 69 6c 65 2e 3c  rnal Shapefile.<
13a0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74  /li>..</ul>..</t
13b0: 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d  d></tr></table>.
13c0: 0a 3c 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 31  .<br>..<hr>..<h1
13d0: 3e 3c 61 20 69 64 3d 22 56 69 72 74 75 61 6c 44  ><a id="VirtualD
13e0: 42 46 22 3e 56 69 72 74 75 61 6c 44 42 46 3c 2f  BF">VirtualDBF</
13f0: 61 3e 3c 2f 68 31 3e 0d 0a 54 68 65 20 3c 62 3e  a></h1>..The <b>
1400: 56 69 72 74 75 61 6c 44 42 46 3c 2f 62 3e 20 49  VirtualDBF</b> I
1410: 6e 74 65 72 66 61 63 65 20 61 6c 6c 6f 77 73 20  nterface allows 
1420: 74 6f 20 64 69 72 65 63 74 6c 79 20 61 63 63 65  to directly acce
1430: 73 73 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 44  ss an external D
1440: 42 46 20 74 61 62 6c 65 20 62 79 20 75 73 69 6e  BF table by usin
1450: 67 20 73 74 61 6e 64 61 72 64 20 53 70 61 74 69  g standard Spati
1460: 61 6c 20 53 51 4c 20 71 75 65 72 69 65 73 2e 3c  al SQL queries.<
1470: 62 72 3e 0d 0a 53 79 6e 74 61 78 20 66 6f 72 20  br>..Syntax for 
1480: 63 72 65 61 74 69 6e 67 20 61 20 56 69 72 74 75  creating a Virtu
1490: 61 6c 44 62 66 20 54 61 62 6c 65 3a 0d 0a 3c 76  alDbf Table:..<v
14a0: 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54  erbatim>..SELECT
14b0: 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c 20   CREATE VIRTUAL 
14c0: 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55  TABLE my_table U
14d0: 53 49 4e 47 20 56 69 72 74 75 61 6c 44 62 66 20  SING VirtualDbf 
14e0: 28 20 64 62 66 5f 70 61 74 68 20 2c 20 63 68 61  ( dbf_path , cha
14f0: 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67 20 29 3b  rset_encoding );
1500: 0d 0a 0d 0a 53 45 4c 45 43 54 20 43 52 45 41 54  ....SELECT CREAT
1510: 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20  E VIRTUAL TABLE 
1520: 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e 47 20 56  my_table USING V
1530: 69 72 74 75 61 6c 44 62 66 20 28 20 64 62 66 5f  irtualDbf ( dbf_
1540: 70 61 74 68 20 2c 20 63 68 61 72 73 65 74 5f 65  path , charset_e
1550: 6e 63 6f 64 69 6e 67 20 2c 20 74 65 78 74 5f 64  ncoding , text_d
1560: 61 74 65 73 20 29 3b 0d 0a 0d 0a 53 45 4c 45 43  ates );....SELEC
1570: 54 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c  T CREATE VIRTUAL
1580: 20 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20   TABLE my_table 
1590: 55 53 49 4e 47 20 56 69 72 74 75 61 6c 44 62 66  USING VirtualDbf
15a0: 20 28 20 64 62 66 5f 70 61 74 68 20 2c 20 63 68   ( dbf_path , ch
15b0: 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67 20 2c  arset_encoding ,
15c0: 20 74 65 78 74 5f 64 61 74 65 73 20 2c 20 63 6f   text_dates , co
15d0: 6c 6e 61 6d 65 5f 63 61 73 65 20 29 3b 0d 0a 3c  lname_case );..<
15e0: 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 53 75 70 70  /verbatim>..Supp
15f0: 6f 72 74 65 64 20 61 72 67 75 6d 65 6e 74 73 20  orted arguments 
1600: 61 6e 64 20 74 68 65 69 72 20 69 6e 74 65 72 70  and their interp
1610: 72 65 74 61 74 69 6f 6e 3a 0d 0a 3c 75 6c 3e 0d  retation:..<ul>.
1620: 0a 3c 6c 69 3e 3c 62 3e 64 62 66 5f 70 61 74 68  .<li><b>dbf_path
1630: 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6d 61 6e 64  </b> (<i><b>mand
1640: 61 74 6f 72 79 3c 2f 62 3e 3c 2f 69 3e 29 3a 20  atory</b></i>): 
1650: 74 68 65 20 72 65 6c 61 74 69 76 65 20 6f 72 20  the relative or 
1660: 61 62 73 6f 6c 75 74 65 20 70 61 74 68 6e 61 6d  absolute pathnam
1670: 65 20 6c 65 61 64 69 6e 67 20 74 6f 20 74 68 65  e leading to the
1680: 20 65 78 74 65 72 6e 61 6c 20 44 42 46 20 66 69   external DBF fi
1690: 6c 65 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c  le...<ul>..<li><
16a0: 62 3e 4e 6f 74 65 3c 2f 62 3e 3a 20 74 68 65 20  b>Note</b>: the 
16b0: 66 75 6c 6c 20 70 61 74 68 6e 61 6d 65 20 6d 75  full pathname mu
16c0: 73 74 20 62 65 20 70 61 73 73 65 64 2c 20 69 6e  st be passed, in
16d0: 63 6c 75 64 69 6e 67 20 74 68 65 20 66 69 6e 61  cluding the fina
16e0: 6c 20 3c 69 3e 2a 2e 64 62 66 3c 2f 69 3e 20 73  l <i>*.dbf</i> s
16f0: 75 66 66 69 78 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75  uffix.</li>..</u
1700: 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  l></li>..<li><b>
1710: 63 68 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67  charset_encoding
1720: 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6d 61 6e 64  </b> (<i><b>mand
1730: 61 74 6f 72 79 3c 2f 62 3e 3c 2f 69 3e 29 3a 20  atory</b></i>): 
1740: 63 61 6e 6f 6e 69 63 61 6c 20 6e 61 6d 65 20 6f  canonical name o
1750: 66 20 74 68 65 20 63 68 61 72 73 65 74 20 65 6e  f the charset en
1760: 63 6f 64 69 6e 67 20 61 64 6f 70 74 65 64 20 62  coding adopted b
1770: 79 20 74 68 65 20 3c 62 3e 44 42 46 3c 2f 62 3e  y the <b>DBF</b>
1780: 20 6d 65 6d 62 65 72 2e 0d 0a 3c 75 6c 3e 0d 0a   member...<ul>..
1790: 3c 6c 69 3e 45 78 61 6d 70 6c 65 73 20 6f 66 20  <li>Examples of 
17a0: 76 61 6c 69 64 20 6e 61 6d 65 73 20 61 72 65 3a  valid names are:
17b0: 20 3c 62 3e 41 53 43 49 49 3c 2f 62 3e 2c 20 3c   <b>ASCII</b>, <
17c0: 62 3e 55 54 46 2d 38 3c 2f 62 3e 2c 20 3c 62 3e  b>UTF-8</b>, <b>
17d0: 43 50 38 35 30 3c 2f 62 3e 2c 20 3c 62 3e 49 53  CP850</b>, <b>IS
17e0: 4f 2d 38 38 34 39 2d 31 3c 2f 62 3e 3c 2f 6c 69  O-8849-1</b></li
17f0: 3e 0d 0a 3c 6c 69 3e 59 6f 75 20 63 61 6e 20 63  >..<li>You can c
1800: 68 65 63 6b 20 74 68 65 20 66 75 6c 6c 20 6c 69  heck the full li
1810: 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20  st of supported 
1820: 63 68 61 72 73 65 74 20 65 6e 63 6f 64 69 6e 67  charset encoding
1830: 73 20 66 72 6f 6d 20 3c 61 20 68 72 65 66 3d 22  s from <a href="
1840: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 6e 75 2e  https://www.gnu.
1850: 6f 72 67 2f 73 6f 66 74 77 61 72 65 2f 6c 69 62  org/software/lib
1860: 69 63 6f 6e 76 2f 22 3e 68 65 72 65 3c 2f 61 3e  iconv/">here</a>
1870: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c  .</li>..</ul></l
1880: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74 65 78 74 5f  i>..<li><b>text_
1890: 64 61 74 65 73 3c 2f 62 3e 20 28 3c 69 3e 3c 62  dates</b> (<i><b
18a0: 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 62 3e 3c 2f 69  >optional</b></i
18b0: 3e 29 3a 20 74 68 69 73 20 69 73 20 61 20 3c 62  >): this is a <b
18c0: 3e 42 4f 4f 4c 45 41 4e 3c 2f 62 3e 20 66 6c 61  >BOOLEAN</b> fla
18d0: 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 66  g:..<ul>..<li>if
18e0: 20 73 65 74 20 74 6f 20 3c 62 3e 30 3c 2f 62 3e   set to <b>0</b>
18f0: 20 28 3c 62 3e 46 41 4c 53 45 3c 2f 62 3e 29 20   (<b>FALSE</b>) 
1900: 61 6c 6c 20 66 69 65 6c 64 73 20 6f 66 20 74 68  all fields of th
1910: 65 20 3c 62 3e 44 41 54 45 3c 2f 62 3e 20 74 79  e <b>DATE</b> ty
1920: 70 65 20 77 69 6c 6c 20 62 65 20 72 65 70 72 65  pe will be repre
1930: 73 65 6e 74 65 64 20 61 73 20 3c 61 20 68 72 65  sented as <a hre
1940: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 73  f="https://www.s
1950: 71 6c 69 74 65 2e 6f 72 67 2f 6c 61 6e 67 5f 64  qlite.org/lang_d
1960: 61 74 65 66 75 6e 63 2e 68 74 6d 6c 22 3e 6a 75  atefunc.html">ju
1970: 6c 69 61 6e 20 64 61 74 65 73 3c 2f 61 3e 3c 2f  lian dates</a></
1980: 6c 69 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65 74 20  li>..<li>if set 
1990: 74 6f 20 61 6e 79 20 6f 74 68 65 72 20 69 6e 74  to any other int
19a0: 65 67 65 72 20 76 61 6c 75 65 20 28 3c 62 3e 54  eger value (<b>T
19b0: 52 55 45 3c 2f 62 3e 29 20 61 6c 6c 20 66 69 65  RUE</b>) all fie
19c0: 6c 64 73 20 6f 66 20 74 68 65 20 3c 62 3e 44 41  lds of the <b>DA
19d0: 54 45 3c 2f 62 3e 20 74 79 70 65 20 77 69 6c 6c  TE</b> type will
19e0: 20 62 65 20 72 65 70 72 65 73 65 6e 74 65 64 20   be represented 
19f0: 61 73 20 54 65 78 74 20 53 74 72 69 6e 67 73 20  as Text Strings 
1a00: 61 73 20 65 2e 67 2e 20 3c 62 3e 32 30 31 38 2d  as e.g. <b>2018-
1a10: 30 38 2d 32 31 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a  08-21</b></li>..
1a20: 3c 6c 69 3e 69 66 20 6e 6f 74 20 65 78 70 6c 69  <li>if not expli
1a30: 63 69 74 6c 79 20 73 70 65 63 69 66 69 65 64 2c  citly specified,
1a40: 20 3c 62 3e 54 52 55 45 3c 2f 62 3e 20 77 69 6c   <b>TRUE</b> wil
1a50: 6c 20 61 6c 77 61 79 73 20 62 65 20 61 73 73 75  l always be assu
1a60: 6d 65 64 20 28 64 65 66 61 75 6c 74 20 73 65 74  med (default set
1a70: 74 69 6e 67 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75  ting).</li>..</u
1a80: 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  l></li>..<li><b>
1a90: 63 6f 6c 6e 61 6d 65 5f 63 61 73 65 3c 2f 62 3e  colname_case</b>
1aa0: 20 28 3c 69 3e 3c 62 3e 6f 70 74 69 6f 6e 61 6c   (<i><b>optional
1ab0: 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 74 68 69 73 20  </b></i>): this 
1ac0: 61 72 67 75 6d 65 6e 74 20 73 70 65 63 69 66 69  argument specifi
1ad0: 65 73 20 69 66 20 61 6c 6c 20 63 6f 6c 75 6d 6e  es if all column
1ae0: 20 6e 61 6d 65 73 20 73 68 6f 75 6c 64 20 62 65   names should be
1af0: 20 63 6f 6e 73 69 64 65 72 65 64 20 75 70 70 65   considered uppe
1b00: 72 63 61 73 65 20 6f 72 20 6c 6f 77 65 72 63 61  rcase or lowerca
1b10: 73 65 2e 3c 62 72 3e 0d 0a 56 61 6c 69 64 20 73  se.<br>..Valid s
1b20: 65 74 74 69 6e 67 73 20 61 72 65 3a 0d 0a 3c 75  ettings are:..<u
1b30: 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 75 70 70 65 72  l>..<li><b>upper
1b40: 63 61 73 65 3c 2f 62 3e 20 6f 72 20 3c 62 3e 75  case</b> or <b>u
1b50: 70 70 65 72 3c 2f 62 3e 3a 20 61 6c 6c 20 63 6f  pper</b>: all co
1b60: 6c 75 6d 6e 20 6e 61 6d 65 73 20 77 69 6c 6c 20  lumn names will 
1b70: 62 65 20 66 75 6c 6c 79 20 63 61 70 69 74 61 6c  be fully capital
1b80: 69 7a 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  ized.</li>..<li>
1b90: 3c 62 3e 6c 6f 77 65 72 63 61 73 65 3c 2f 62 3e  <b>lowercase</b>
1ba0: 20 6f 72 20 3c 62 3e 6c 6f 77 65 72 3c 2f 62 3e   or <b>lower</b>
1bb0: 3a 20 61 6c 6c 20 63 6f 6c 75 6d 6e 20 6e 61 6d  : all column nam
1bc0: 65 73 20 77 69 6c 6c 20 62 65 20 66 75 6c 6c 20  es will be full 
1bd0: 6c 6f 77 65 72 63 61 73 65 2e 3c 2f 6c 69 3e 0d  lowercase.</li>.
1be0: 0a 3c 6c 69 3e 3c 62 3e 73 61 6d 65 63 61 73 65  .<li><b>samecase
1bf0: 3c 2f 62 3e 20 6f 72 20 3c 62 3e 73 61 6d 65 3c  </b> or <b>same<
1c00: 2f 62 3e 3a 20 61 6c 6c 20 63 6f 6c 75 6d 6e 20  /b>: all column 
1c10: 6e 61 6d 65 73 20 77 69 6c 6c 20 62 65 20 65 78  names will be ex
1c20: 61 63 74 6c 79 20 70 72 65 73 65 72 76 65 64 20  actly preserved 
1c30: 61 73 20 74 68 65 79 20 61 72 65 20 64 65 66 69  as they are defi
1c40: 6e 65 64 20 69 6e 74 6f 20 74 68 65 20 44 42 46  ned into the DBF
1c50: 20 6d 65 6d 62 65 72 2e 3c 2f 6c 69 3e 0d 0a 3c   member.</li>..<
1c60: 6c 69 3e 69 66 20 6e 6f 74 20 73 70 65 63 69 66  li>if not specif
1c70: 69 65 64 2c 20 6f 72 20 69 66 20 61 6e 79 20 6f  ied, or if any o
1c80: 74 68 65 72 20 64 65 66 69 6e 69 74 69 6f 6e 20  ther definition 
1c90: 64 65 66 69 6e 69 74 69 6f 6e 20 69 73 20 66 6f  definition is fo
1ca0: 75 6e 64 2c 20 3c 62 3e 6c 6f 77 65 72 63 61 73  und, <b>lowercas
1cb0: 65 3c 2f 62 3e 20 77 69 6c 6c 20 61 6c 77 61 79  e</b> will alway
1cc0: 73 20 62 65 20 61 73 73 75 6d 65 64 20 28 64 65  s be assumed (de
1cd0: 66 61 75 6c 74 20 73 65 74 74 69 6e 67 29 2e 3c  fault setting).<
1ce0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e  /li>..</ul></li>
1cf0: 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 74 61  ..</ul><br>..<ta
1d00: 62 6c 65 20 62 67 63 6f 6c 6f 72 3d 22 23 66 66  ble bgcolor="#ff
1d10: 66 66 64 30 22 20 63 65 6c 6c 70 61 64 64 69 6e  ffd0" cellpaddin
1d20: 67 3d 22 31 38 22 3e 3c 74 72 3e 3c 74 64 3e 0d  g="18"><tr><td>.
1d30: 0a 3c 62 3e 4e 6f 74 65 3c 2f 62 3e 3a 20 71 75  .<b>Note</b>: qu
1d40: 6f 74 69 6e 67 20 6f 72 20 6e 6f 74 20 61 6e 79  oting or not any
1d50: 20 54 65 78 74 20 53 74 72 69 6e 67 20 77 68 65   Text String whe
1d60: 6e 20 69 74 20 61 70 70 65 61 72 73 20 61 73 20  n it appears as 
1d70: 61 20 56 69 72 74 75 61 6c 20 54 61 62 6c 65 20  a Virtual Table 
1d80: 61 72 67 75 6d 65 6e 74 20 68 61 73 20 61 62 73  argument has abs
1d90: 6f 6c 75 74 65 6c 79 20 6e 6f 20 65 66 66 65 63  olutely no effec
1da0: 74 2e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a  t...<verbatim>..
1db0: 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49  SELECT CREATE VI
1dc0: 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74  RTUAL TABLE my_t
1dd0: 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75  able USING Virtu
1de0: 61 6c 44 62 66 28 20 2f 68 6f 6d 65 2f 73 61 6e  alDbf( /home/san
1df0: 64 72 6f 2f 6d 79 73 68 70 20 2c 20 43 50 31 32  dro/myshp , CP12
1e00: 35 32 20 2c 20 31 20 2c 20 6c 6f 77 65 72 20 29  52 , 1 , lower )
1e10: 3b 0d 0a 6f 72 0d 0a 53 45 4c 45 43 54 20 43 52  ;..or..SELECT CR
1e20: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42  EATE VIRTUAL TAB
1e30: 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e  LE my_table USIN
1e40: 47 20 56 69 72 74 75 61 6c 44 62 66 28 20 27 2f  G VirtualDbf( '/
1e50: 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79 73 68  home/sandro/mysh
1e60: 70 27 20 2c 20 27 43 50 31 32 35 32 27 20 2c 20  p' , 'CP1252' , 
1e70: 31 20 2c 20 27 6c 6f 77 65 72 27 20 29 3b 0d 0a  1 , 'lower' );..
1e80: 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 42 6f 74  </verbatim>..Bot
1e90: 68 20 6e 6f 74 61 74 69 6f 6e 73 20 77 69 6c 6c  h notations will
1ea0: 20 70 72 6f 64 75 63 65 20 65 78 61 63 74 6c 79   produce exactly
1eb0: 20 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74 69   the same identi
1ec0: 63 61 6c 20 72 65 73 75 6c 74 2e 0d 0a 3c 2f 74  cal result...</t
1ed0: 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d  d></tr></table>.
1ee0: 0a 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 62 67  .<br>..<table bg
1ef0: 63 6f 6c 6f 72 3d 22 23 64 30 66 66 64 30 22 20  color="#d0ffd0" 
1f00: 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 31 38 22  cellpadding="18"
1f10: 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 42  ><tr><td>..<h3>B
1f20: 65 73 74 20 70 72 61 63 74 69 63 65 73 20 61 6e  est practices an
1f30: 64 20 6b 6e 6f 77 6e 20 6c 69 6d 69 74 61 74 69  d known limitati
1f40: 6f 6e 73 3c 2f 68 33 3e 0d 0a 3c 75 6c 3e 0d 0a  ons</h3>..<ul>..
1f50: 3c 6c 69 3e 56 69 72 74 75 61 6c 20 54 61 62 6c  <li>Virtual Tabl
1f60: 65 73 20 61 72 65 20 6e 6f 74 20 72 65 61 6c 6c  es are not reall
1f70: 79 20 67 65 6e 75 69 6e 65 20 44 61 74 61 62 61  y genuine Databa
1f80: 73 65 20 54 61 62 6c 65 73 2c 20 74 68 65 79 20  se Tables, they 
1f90: 61 72 65 20 6a 75 73 74 20 70 72 65 74 65 6e 64  are just pretend
1fa0: 69 6e 67 20 74 6f 20 62 65 2e 3c 2f 6c 69 3e 0d  ing to be.</li>.
1fb0: 0a 3c 6c 69 3e 56 69 72 74 75 61 6c 20 54 61 62  .<li>Virtual Tab
1fc0: 6c 65 73 20 68 61 76 65 20 76 65 72 79 20 70 6f  les have very po
1fd0: 6f 72 20 73 70 65 65 64 20 70 65 72 66 6f 72 6d  or speed perform
1fe0: 61 6e 63 65 73 20 77 68 65 6e 20 63 6f 6d 70 61  ances when compa
1ff0: 72 65 64 20 74 6f 20 67 65 6e 75 69 6e 65 20 44  red to genuine D
2000: 61 74 61 62 61 73 65 20 54 61 62 6c 65 73 2e 3c  atabase Tables.<
2010: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 43 6f 6d 70 6c 65  /li>..<li>Comple
2020: 78 20 53 51 4c 20 71 75 65 72 69 65 73 20 3c 62  x SQL queries <b
2030: 3e 4a 4f 49 4e 3c 2f 62 3e 69 6e 67 20 73 65 76  >JOIN</b>ing sev
2040: 65 72 61 6c 20 54 61 62 6c 65 73 20 63 61 6e 20  eral Tables can 
2050: 6f 66 74 65 6e 20 72 65 74 75 72 6e 20 6f 64 64  often return odd
2060: 20 61 6e 64 20 6d 69 73 6c 65 61 64 69 6e 67 20   and misleading 
2070: 72 65 73 75 6c 74 73 65 74 73 2c 20 69 66 20 6f  resultsets, if o
2080: 6e 65 20 6f 72 20 6d 6f 72 65 20 6f 66 20 74 68  ne or more of th
2090: 65 20 3c 62 3e 4a 4f 49 4e 3c 2f 62 3e 65 64 20  e <b>JOIN</b>ed 
20a0: 54 61 62 6c 65 73 20 61 72 65 20 6f 66 20 74 68  Tables are of th
20b0: 65 20 56 69 72 74 75 61 6c 20 74 79 70 65 2e 3c  e Virtual type.<
20c0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 62 65  /li>..<li>The be
20d0: 73 74 20 75 73 61 67 65 20 79 6f 75 20 63 61 6e  st usage you can
20e0: 20 64 6f 20 6f 66 20 61 20 56 69 72 74 75 61 6c   do of a Virtual
20f0: 20 54 61 62 6c 65 20 69 73 20 74 6f 20 6a 75 73   Table is to jus
2100: 74 20 73 75 70 70 6f 72 74 20 62 61 73 69 63 20  t support basic 
2110: 64 61 74 61 20 69 6d 70 6f 72 74 20 70 72 6f 63  data import proc
2120: 65 73 73 65 73 2c 20 6f 72 20 74 6f 20 71 75 69  esses, or to qui
2130: 63 6b 6c 79 20 67 65 74 20 61 6e 20 6f 76 65 72  ckly get an over
2140: 61 6c 6c 20 67 6c 61 6e 63 65 20 61 74 20 61 20  all glance at a 
2150: 66 75 6c 6c 20 64 61 74 61 73 65 74 20 77 69 74  full dataset wit
2160: 68 6f 75 74 20 6e 65 63 65 73 73 61 72 69 6c 79  hout necessarily
2170: 20 69 6d 70 6f 72 74 69 6e 67 20 69 74 20 69 6e   importing it in
2180: 74 6f 20 74 68 65 20 44 61 74 61 62 61 73 65 2e  to the Database.
2190: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 72 65 74 65  </li>..<li>Prete
21a0: 6e 64 69 6e 67 20 74 6f 20 75 73 65 20 61 20 56  nding to use a V
21b0: 69 72 74 75 61 6c 20 54 61 62 6c 65 20 61 73 20  irtual Table as 
21c0: 61 20 66 75 6c 6c 20 72 65 70 6c 61 63 65 6d 65  a full replaceme
21d0: 6e 74 20 6f 66 20 69 6d 70 6f 72 74 69 6e 67 20  nt of importing 
21e0: 61 6c 6c 20 64 61 74 61 20 77 69 74 68 69 6e 20  all data within 
21f0: 61 20 67 65 6e 75 69 6e 65 20 44 61 74 61 62 61  a genuine Databa
2200: 73 65 20 54 61 62 6c 65 20 69 73 20 73 74 72 6f  se Table is stro
2210: 6e 67 6c 79 20 64 69 73 63 6f 75 72 61 67 65 64  ngly discouraged
2220: 2c 20 61 6e 64 20 6e 65 76 65 72 20 69 73 20 61  , and never is a
2230: 20 73 6d 61 72 74 20 69 64 65 61 2e 3c 2f 6c 69   smart idea.</li
2240: 3e 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 62  >..</ul><br>..<b
2250: 3e 57 61 72 6e 69 6e 67 3c 2f 62 3e 3a 20 56 69  >Warning</b>: Vi
2260: 72 74 75 61 6c 44 42 46 20 54 61 62 6c 65 73 20  rtualDBF Tables 
2270: 61 72 65 20 61 6c 77 61 79 73 20 73 75 62 6a 65  are always subje
2280: 63 74 20 74 6f 20 3c 62 3e 52 45 41 44 2d 4f 4e  ct to <b>READ-ON
2290: 4c 59 3c 2f 62 3e 20 72 65 73 74 72 69 63 74 69  LY</b> restricti
22a0: 6f 6e 73 2e 20 41 6e 79 20 61 74 74 65 6d 70 74  ons. Any attempt
22b0: 20 74 6f 20 74 6f 20 65 78 65 63 75 74 65 20 61   to to execute a
22c0: 6e 20 3c 62 3e 49 4e 53 45 52 54 3c 2f 62 3e 2c  n <b>INSERT</b>,
22d0: 20 3c 62 3e 55 50 44 41 54 45 3c 2f 62 3e 20 6f   <b>UPDATE</b> o
22e0: 72 20 3c 62 3e 44 45 4c 45 54 45 3c 2f 62 3e 20  r <b>DELETE</b> 
22f0: 73 74 61 74 65 6d 65 6e 74 20 77 69 6c 6c 20 61  statement will a
2300: 6c 77 61 79 73 20 72 65 74 75 72 6e 20 61 6e 20  lways return an 
2310: 65 72 72 6f 72 2e 3c 62 72 3e 0d 0a 3c 2f 74 64  error.<br>..</td
2320: 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a  ></tr></table>..
2330: 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 62 67 63  <br>..<table bgc
2340: 6f 6c 6f 72 3d 22 23 65 30 65 30 65 30 22 20 63  olor="#e0e0e0" c
2350: 65 6c 6c 70 61 64 64 69 6e 67 3d 22 31 38 22 3e  ellpadding="18">
2360: 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 52 65  <tr><td>..<h3>Re
2370: 6c 61 74 65 64 20 54 6f 70 69 63 73 3c 2f 68 33  lated Topics</h3
2380: 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 54 68 65  >..<ul>..<li>The
2390: 20 3c 62 3e 49 6d 70 6f 72 74 44 42 46 28 29 3c   <b>ImportDBF()<
23a0: 2f 62 3e 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e  /b> SQL function
23b0: 20 61 6c 6c 6f 77 73 20 74 6f 20 63 72 65 61 74   allows to creat
23c0: 65 20 61 6e 64 20 70 6f 70 75 6c 61 74 65 20 61  e and populate a
23d0: 20 67 65 6e 75 69 6e 65 20 44 61 74 61 62 61 73   genuine Databas
23e0: 65 20 54 61 62 6c 65 20 62 79 20 69 6d 70 6f 72  e Table by impor
23f0: 74 69 6e 67 20 61 6e 20 65 78 74 65 72 6e 61 6c  ting an external
2400: 20 44 42 46 20 66 69 6c 65 2e 3c 2f 6c 69 3e 0d   DBF file.</li>.
2410: 0a 3c 6c 69 3e 41 6e 64 20 74 68 65 20 3c 62 3e  .<li>And the <b>
2420: 45 78 70 6f 72 74 44 42 46 28 29 3c 2f 62 3e 20  ExportDBF()</b> 
2430: 73 69 73 74 65 72 20 66 75 6e 63 74 69 6f 6e 20  sister function 
2440: 61 6c 6c 6f 77 73 20 74 6f 20 64 69 72 65 63 74  allows to direct
2450: 6c 79 20 65 78 70 6f 72 74 20 61 20 77 68 6f 6c  ly export a whol
2460: 65 20 44 61 74 61 62 61 73 65 20 54 61 62 6c 65  e Database Table
2470: 20 69 6e 74 6f 20 61 6e 20 65 78 74 65 72 6e 61   into an externa
2480: 6c 20 44 42 46 20 66 69 6c 65 2e 3c 2f 6c 69 3e  l DBF file.</li>
2490: 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 2f  ..</ul>..</td></
24a0: 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62 72  tr></table>..<br
24b0: 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 31 3e 3c 61 20  >..<hr>..<h1><a 
24c0: 69 64 3d 22 56 69 72 74 75 61 6c 54 65 78 74 22  id="VirtualText"
24d0: 3e 56 69 72 74 75 61 6c 54 65 78 74 3c 2f 61 3e  >VirtualText</a>
24e0: 3c 2f 68 31 3e 0d 0a 54 68 65 20 3c 62 3e 56 69  </h1>..The <b>Vi
24f0: 72 74 75 61 6c 54 65 78 74 3c 2f 62 3e 20 49 6e  rtualText</b> In
2500: 74 65 72 66 61 63 65 20 61 6c 6c 6f 77 73 20 74  terface allows t
2510: 6f 20 64 69 72 65 63 74 6c 79 20 61 63 63 65 73  o directly acces
2520: 73 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 54 65  s an external Te
2530: 78 74 20 66 69 6c 65 20 62 79 20 75 73 69 6e 67  xt file by using
2540: 20 73 74 61 6e 64 61 72 64 20 53 70 61 74 69 61   standard Spatia
2550: 6c 20 53 51 4c 20 71 75 65 72 69 65 73 2e 3c 62  l SQL queries.<b
2560: 72 3e 0d 0a 54 68 65 20 54 65 78 74 20 46 69 6c  r>..The Text Fil
2570: 65 20 69 73 20 65 78 70 65 63 74 65 64 20 74 6f  e is expected to
2580: 20 63 6f 6e 74 61 69 6e 20 61 20 70 72 6f 70 65   contain a prope
2590: 72 6c 79 20 66 6f 72 6d 61 74 74 65 64 20 54 61  rly formatted Ta
25a0: 62 6c 65 20 61 63 63 6f 72 64 69 6e 67 6c 79 20  ble accordingly 
25b0: 74 6f 20 73 6f 6d 65 20 3c 62 3e 44 65 6c 69 6d  to some <b>Delim
25c0: 69 74 65 72 2d 53 65 70 61 72 61 74 65 64 2d 56  iter-Separated-V
25d0: 61 6c 75 65 73 3c 2f 62 3e 20 66 6f 72 6d 61 74  alues</b> format
25e0: 20 28 63 6f 6d 6d 61 20 73 65 70 61 72 61 74 65   (comma separate
25f0: 64 20 76 61 6c 75 65 73 20 3c 69 3e 2a 2e 63 73  d values <i>*.cs
2600: 76 3c 2f 69 3e 2c 20 74 61 62 20 73 65 70 61 72  v</i>, tab separ
2610: 61 74 65 64 20 76 61 6c 75 65 73 20 3c 69 3e 2a  ated values <i>*
2620: 2e 74 78 74 3c 2f 69 3e 20 61 6e 64 20 61 6c 69  .txt</i> and ali
2630: 6b 65 29 2e 3c 62 72 3e 0d 0a 53 79 6e 74 61 78  ke).<br>..Syntax
2640: 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 61 20   for creating a 
2650: 56 69 72 74 75 61 6c 54 65 78 74 20 54 61 62 6c  VirtualText Tabl
2660: 65 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a  e:..<verbatim>..
2670: 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49  SELECT CREATE VI
2680: 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74  RTUAL TABLE my_t
2690: 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75  able USING Virtu
26a0: 61 6c 54 65 78 74 20 28 20 74 65 78 74 66 69 6c  alText ( textfil
26b0: 65 5f 70 61 74 68 20 2c 20 63 68 61 72 73 65 74  e_path , charset
26c0: 5f 65 6e 63 6f 64 69 6e 67 20 29 3b 0d 0a 0d 0a  _encoding );....
26d0: 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49  SELECT CREATE VI
26e0: 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74  RTUAL TABLE my_t
26f0: 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75  able USING Virtu
2700: 61 6c 54 65 78 74 20 28 20 74 65 78 74 66 69 6c  alText ( textfil
2710: 65 5f 70 61 74 68 20 2c 20 63 68 61 72 73 65 74  e_path , charset
2720: 5f 65 6e 63 6f 64 69 6e 67 20 2c 20 66 69 72 73  _encoding , firs
2730: 74 5f 72 6f 77 5f 61 73 5f 74 69 74 6c 65 73 20  t_row_as_titles 
2740: 29 3b 0d 0a 0d 0a 53 45 4c 45 43 54 20 43 52 45  );....SELECT CRE
2750: 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c  ATE VIRTUAL TABL
2760: 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e 47  E my_table USING
2770: 20 56 69 72 74 75 61 6c 54 65 78 74 20 28 20 74   VirtualText ( t
2780: 65 78 74 66 69 6c 65 5f 70 61 74 68 20 2c 20 63  extfile_path , c
2790: 68 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67 20  harset_encoding 
27a0: 2c 20 66 69 72 73 74 5f 72 6f 77 5f 61 73 5f 74  , first_row_as_t
27b0: 69 74 6c 65 73 20 2c 20 64 65 63 69 6d 61 6c 5f  itles , decimal_
27c0: 73 65 70 61 72 61 74 6f 72 20 29 3b 0d 0a 0d 0a  separator );....
27d0: 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49  SELECT CREATE VI
27e0: 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74  RTUAL TABLE my_t
27f0: 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75  able USING Virtu
2800: 61 6c 54 65 78 74 20 28 20 74 65 78 74 66 69 6c  alText ( textfil
2810: 65 5f 70 61 74 68 20 2c 20 63 68 61 72 73 65 74  e_path , charset
2820: 5f 65 6e 63 6f 64 69 6e 67 20 2c 20 66 69 72 73  _encoding , firs
2830: 74 5f 72 6f 77 5f 61 73 5f 74 69 74 6c 65 73 20  t_row_as_titles 
2840: 2c 20 64 65 63 69 6d 61 6c 5f 73 65 70 61 72 61  , decimal_separa
2850: 74 6f 72 20 2c 20 74 65 78 74 5f 73 65 70 61 72  tor , text_separ
2860: 61 74 6f 72 20 29 3b 0d 0a 0d 0a 53 45 4c 45 43  ator );....SELEC
2870: 54 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c  T CREATE VIRTUAL
2880: 20 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20   TABLE my_table 
2890: 55 53 49 4e 47 20 56 69 72 74 75 61 6c 54 65 78  USING VirtualTex
28a0: 74 20 28 20 74 65 78 74 66 69 6c 65 5f 70 61 74  t ( textfile_pat
28b0: 68 20 2c 20 63 68 61 72 73 65 74 5f 65 6e 63 6f  h , charset_enco
28c0: 64 69 6e 67 20 2c 20 66 69 72 73 74 5f 72 6f 77  ding , first_row
28d0: 5f 61 73 5f 74 69 74 6c 65 73 20 2c 20 64 65 63  _as_titles , dec
28e0: 69 6d 61 6c 5f 73 65 70 61 72 61 74 6f 72 20 2c  imal_separator ,
28f0: 20 74 65 78 74 5f 73 65 70 61 72 61 74 6f 72 20   text_separator 
2900: 2c 20 66 69 65 6c 64 5f 73 65 70 61 72 61 74 6f  , field_separato
2910: 72 20 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d  r );..</verbatim
2920: 3e 0d 0a 53 75 70 70 6f 72 74 65 64 20 61 72 67  >..Supported arg
2930: 75 6d 65 6e 74 73 20 61 6e 64 20 74 68 65 69 72  uments and their
2940: 20 69 6e 74 65 72 70 72 65 74 61 74 69 6f 6e 3a   interpretation:
2950: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74  ..<ul>..<li><b>t
2960: 65 78 74 66 69 6c 65 5f 70 61 74 68 3c 2f 62 3e  extfile_path</b>
2970: 20 28 3c 69 3e 3c 62 3e 6d 61 6e 64 61 74 6f 72   (<i><b>mandator
2980: 79 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 74 68 65 20  y</b></i>): the 
2990: 72 65 6c 61 74 69 76 65 20 6f 72 20 61 62 73 6f  relative or abso
29a0: 6c 75 74 65 20 70 61 74 68 6e 61 6d 65 20 6c 65  lute pathname le
29b0: 61 64 69 6e 67 20 74 6f 20 74 68 65 20 65 78 74  ading to the ext
29c0: 65 72 6e 61 6c 20 54 65 78 74 20 66 69 6c 65 2e  ernal Text file.
29d0: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 4e  ..<ul>..<li><b>N
29e0: 6f 74 65 3c 2f 62 3e 3a 20 74 68 65 20 66 75 6c  ote</b>: the ful
29f0: 6c 20 70 61 74 68 6e 61 6d 65 20 6d 75 73 74 20  l pathname must 
2a00: 62 65 20 70 61 73 73 65 64 2c 20 69 6e 63 6c 75  be passed, inclu
2a10: 64 69 6e 67 20 61 6e 20 65 76 65 6e 74 75 61 6c  ding an eventual
2a20: 20 66 69 6e 61 6c 20 73 75 66 66 69 78 20 28 3c   final suffix (<
2a30: 69 3e 2a 2e 74 78 74 3c 2f 69 3e 2c 20 3c 69 3e  i>*.txt</i>, <i>
2a40: 2a 2e 63 73 76 3c 2f 69 3e 20 61 6e 64 20 61 6c  *.csv</i> and al
2a50: 69 6b 65 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c  ike).</li>..</ul
2a60: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 63  ></li>..<li><b>c
2a70: 68 61 72 73 65 74 5f 65 6e 63 6f 64 69 6e 67 3c  harset_encoding<
2a80: 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6d 61 6e 64 61  /b> (<i><b>manda
2a90: 74 6f 72 79 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 63  tory</b></i>): c
2aa0: 61 6e 6f 6e 69 63 61 6c 20 6e 61 6d 65 20 6f 66  anonical name of
2ab0: 20 74 68 65 20 63 68 61 72 73 65 74 20 65 6e 63   the charset enc
2ac0: 6f 64 69 6e 67 20 61 64 6f 70 74 65 64 20 62 79  oding adopted by
2ad0: 20 74 68 65 20 54 65 78 74 20 66 69 6c 65 2e 0d   the Text file..
2ae0: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 45 78 61 6d 70  .<ul>..<li>Examp
2af0: 6c 65 73 20 6f 66 20 76 61 6c 69 64 20 6e 61 6d  les of valid nam
2b00: 65 73 20 61 72 65 3a 20 3c 62 3e 41 53 43 49 49  es are: <b>ASCII
2b10: 3c 2f 62 3e 2c 20 3c 62 3e 55 54 46 2d 38 3c 2f  </b>, <b>UTF-8</
2b20: 62 3e 2c 20 3c 62 3e 43 50 38 35 30 3c 2f 62 3e  b>, <b>CP850</b>
2b30: 2c 20 3c 62 3e 49 53 4f 2d 38 38 34 39 2d 31 3c  , <b>ISO-8849-1<
2b40: 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 59 6f  /b></li>..<li>Yo
2b50: 75 20 63 61 6e 20 63 68 65 63 6b 20 74 68 65 20  u can check the 
2b60: 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 73 75 70  full list of sup
2b70: 70 6f 72 74 65 64 20 63 68 61 72 73 65 74 20 65  ported charset e
2b80: 6e 63 6f 64 69 6e 67 73 20 66 72 6f 6d 20 3c 61  ncodings from <a
2b90: 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77   href="https://w
2ba0: 77 77 2e 67 6e 75 2e 6f 72 67 2f 73 6f 66 74 77  ww.gnu.org/softw
2bb0: 61 72 65 2f 6c 69 62 69 63 6f 6e 76 2f 22 3e 68  are/libiconv/">h
2bc0: 65 72 65 3c 2f 61 3e 2e 3c 2f 6c 69 3e 0d 0a 3c  ere</a>.</li>..<
2bd0: 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c  /ul></li>..<li><
2be0: 62 3e 66 69 72 73 74 5f 72 6f 77 5f 61 73 5f 74  b>first_row_as_t
2bf0: 69 74 6c 65 73 3c 2f 62 3e 20 28 3c 69 3e 3c 62  itles</b> (<i><b
2c00: 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 62 3e 3c 2f 69  >optional</b></i
2c10: 3e 29 3a 20 74 68 69 73 20 69 73 20 61 20 3c 62  >): this is a <b
2c20: 3e 42 4f 4f 4c 45 41 4e 3c 2f 62 3e 20 66 6c 61  >BOOLEAN</b> fla
2c30: 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 66  g:..<ul>..<li>if
2c40: 20 73 65 74 20 74 6f 20 3c 62 3e 30 3c 2f 62 3e   set to <b>0</b>
2c50: 20 28 3c 62 3e 46 41 4c 53 45 3c 2f 62 3e 29 20   (<b>FALSE</b>) 
2c60: 61 6c 6c 20 63 6f 6c 75 6d 6e 20 6e 61 6d 65 73  all column names
2c70: 20 77 69 6c 6c 20 62 65 20 61 75 74 6f 6d 61 74   will be automat
2c80: 69 63 61 6c 6c 79 20 73 65 74 20 62 79 20 75 73  ically set by us
2c90: 69 6e 67 20 61 20 70 72 6f 67 72 65 73 73 69 76  ing a progressiv
2ca0: 65 20 73 65 71 75 65 6e 63 65 2e 3c 2f 6c 69 3e  e sequence.</li>
2cb0: 0d 0a 3c 6c 69 3e 69 66 20 73 65 74 20 74 6f 20  ..<li>if set to 
2cc0: 61 6e 79 20 6f 74 68 65 72 20 69 6e 74 65 67 65  any other intege
2cd0: 72 20 76 61 6c 75 65 20 28 3c 62 3e 54 52 55 45  r value (<b>TRUE
2ce0: 3c 2f 62 3e 29 20 61 6c 6c 20 63 6f 6c 75 6d 6e  </b>) all column
2cf0: 20 6e 61 6d 65 73 20 77 69 6c 6c 20 62 79 20 65   names will by e
2d00: 78 70 65 63 74 65 64 20 74 6f 20 62 65 20 64 65  xpected to be de
2d10: 66 69 6e 65 64 20 69 6e 20 74 68 65 20 76 65 72  fined in the ver
2d20: 79 20 66 69 72 73 74 20 72 6f 77 20 6f 66 20 74  y first row of t
2d30: 68 65 20 54 65 78 74 20 66 69 6c 65 2e 3c 2f 6c  he Text file.</l
2d40: 69 3e 0d 0a 3c 6c 69 3e 69 66 20 6e 6f 74 20 65  i>..<li>if not e
2d50: 78 70 6c 69 63 69 74 6c 79 20 73 70 65 63 69 66  xplicitly specif
2d60: 69 65 64 2c 20 3c 62 3e 54 52 55 45 3c 2f 62 3e  ied, <b>TRUE</b>
2d70: 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 62 65 20   will always be 
2d80: 61 73 73 75 6d 65 64 20 28 64 65 66 61 75 6c 74  assumed (default
2d90: 20 73 65 74 74 69 6e 67 29 2e 3c 2f 6c 69 3e 0d   setting).</li>.
2da0: 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 75 6c  .</ul></li>..<ul
2db0: 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c  >..</ul></li>..<
2dc0: 6c 69 3e 3c 62 3e 64 65 63 69 6d 61 6c 5f 73 65  li><b>decimal_se
2dd0: 70 61 72 61 74 6f 72 3c 2f 62 3e 20 28 3c 69 3e  parator</b> (<i>
2de0: 3c 62 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 62 3e 3c  <b>optional</b><
2df0: 2f 69 3e 29 3a 20 74 68 65 20 63 68 61 72 61 63  /i>): the charac
2e00: 74 65 72 20 61 63 74 69 6e 67 20 61 73 20 61 20  ter acting as a 
2e10: 73 65 70 61 72 61 74 6f 72 20 62 65 74 77 65 65  separator betwee
2e20: 6e 20 74 68 65 20 69 6e 74 65 67 65 72 20 61 6e  n the integer an
2e30: 64 20 64 65 63 69 6d 61 6c 20 70 61 72 74 73 20  d decimal parts 
2e40: 6f 66 20 61 20 6e 75 6d 62 65 72 2e 3c 62 72 3e  of a number.<br>
2e50: 0d 0a 56 61 6c 69 64 20 76 61 6c 75 65 73 20 61  ..Valid values a
2e60: 72 65 20 61 6e 79 20 70 72 69 6e 74 61 62 6c 65  re any printable
2e70: 20 63 68 61 72 61 63 74 65 72 20 6f 72 20 74 68   character or th
2e80: 65 20 73 70 65 63 69 61 6c 20 6d 6e 65 6d 6f 6e  e special mnemon
2e90: 69 63 20 6e 6f 74 61 74 69 6f 6e 73 20 3c 62 3e  ic notations <b>
2ea0: 50 4f 49 4e 54 3c 2f 62 3e 20 6f 72 20 3c 62 3e  POINT</b> or <b>
2eb0: 43 4f 4d 4d 41 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a  COMMA</b>.<br>..
2ec0: 49 66 20 6e 6f 74 20 65 78 70 6c 69 63 69 74 6c  If not explicitl
2ed0: 79 20 73 70 65 63 69 66 69 65 64 20 3c 62 3e 50  y specified <b>P
2ee0: 4f 49 4e 54 3c 2f 62 3e 20 77 69 6c 6c 20 61 6c  OINT</b> will al
2ef0: 77 61 79 73 20 62 65 20 61 73 73 75 6d 65 64 20  ways be assumed 
2f00: 28 64 65 66 61 75 6c 74 20 73 65 74 74 69 6e 67  (default setting
2f10: 29 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74  )</li>..<li><b>t
2f20: 65 78 74 5f 73 65 70 61 72 61 74 6f 72 3c 2f 62  ext_separator</b
2f30: 3e 20 28 3c 69 3e 3c 62 3e 6f 70 74 69 6f 6e 61  > (<i><b>optiona
2f40: 6c 3c 2f 62 3e 3c 2f 69 3e 29 3a 20 74 68 65 20  l</b></i>): the 
2f50: 63 68 61 72 61 63 74 65 72 20 61 63 74 69 6e 67  character acting
2f60: 20 61 73 20 61 20 73 74 72 69 6e 67 20 64 65 6c   as a string del
2f70: 69 6d 69 74 65 72 2e 3c 62 72 3e 0d 0a 56 61 6c  imiter.<br>..Val
2f80: 69 64 20 76 61 6c 75 65 73 20 61 72 65 20 61 6e  id values are an
2f90: 79 20 70 72 69 6e 74 61 62 6c 65 20 63 68 61 72  y printable char
2fa0: 61 63 74 65 72 20 6f 72 20 74 68 65 20 73 70 65  acter or the spe
2fb0: 63 69 61 6c 20 6d 6e 65 6d 6f 6e 69 63 20 6e 6f  cial mnemonic no
2fc0: 74 61 74 69 6f 6e 73 20 3c 62 3e 53 49 4e 47 4c  tations <b>SINGL
2fd0: 45 51 55 4f 54 45 3c 2f 62 3e 2c 20 3c 62 3e 44  EQUOTE</b>, <b>D
2fe0: 4f 55 42 4c 45 51 55 4f 54 45 3c 2f 62 3e 20 6f  OUBLEQUOTE</b> o
2ff0: 72 20 3c 62 3e 4e 4f 4e 45 3c 2f 62 3e 2e 3c 62  r <b>NONE</b>.<b
3000: 72 3e 0d 0a 49 66 20 6e 6f 74 20 65 78 70 6c 69  r>..If not expli
3010: 63 69 74 6c 79 20 73 70 65 63 69 66 69 65 64 20  citly specified 
3020: 3c 62 3e 44 4f 55 42 4c 45 51 55 4f 54 45 3c 2f  <b>DOUBLEQUOTE</
3030: 62 3e 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 62  b> will always b
3040: 65 20 61 73 73 75 6d 65 64 20 28 64 65 66 61 75  e assumed (defau
3050: 6c 74 20 73 65 74 74 69 6e 67 29 3c 2f 6c 69 3e  lt setting)</li>
3060: 0d 0a 3c 6c 69 3e 3c 62 3e 66 69 65 6c 64 5f 73  ..<li><b>field_s
3070: 65 70 61 72 61 74 6f 72 3c 2f 62 3e 20 28 3c 69  eparator</b> (<i
3080: 3e 3c 62 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 62 3e  ><b>optional</b>
3090: 3c 2f 69 3e 29 3a 20 74 68 65 20 63 68 61 72 61  </i>): the chara
30a0: 63 74 65 72 20 61 63 74 69 6e 67 20 61 73 20 61  cter acting as a
30b0: 20 64 65 6c 69 6d 69 74 65 72 20 62 65 74 77 65   delimiter betwe
30c0: 65 6e 20 63 6f 6e 73 65 63 75 74 69 76 65 20 66  en consecutive f
30d0: 69 65 6c 64 73 2e 3c 62 72 3e 0d 0a 56 61 6c 69  ields.<br>..Vali
30e0: 64 20 76 61 6c 75 65 73 20 61 72 65 20 61 6e 79  d values are any
30f0: 20 70 72 69 6e 74 61 62 6c 65 20 63 68 61 72 61   printable chara
3100: 63 74 65 72 20 6f 72 20 74 68 65 20 73 70 65 63  cter or the spec
3110: 69 61 6c 20 6d 6e 65 6d 6f 6e 69 63 20 6e 6f 74  ial mnemonic not
3120: 61 74 69 6f 6e 73 20 3c 62 3e 54 41 42 3c 2f 62  ations <b>TAB</b
3130: 3e 2e 3c 62 72 3e 0d 0a 49 66 20 6e 6f 74 20 65  >.<br>..If not e
3140: 78 70 6c 69 63 69 74 6c 79 20 73 70 65 63 69 66  xplicitly specif
3150: 69 65 64 20 3c 62 3e 54 41 42 3c 2f 62 3e 20 77  ied <b>TAB</b> w
3160: 69 6c 6c 20 61 6c 77 61 79 73 20 62 65 20 61 73  ill always be as
3170: 73 75 6d 65 64 20 28 64 65 66 61 75 6c 74 20 73  sumed (default s
3180: 65 74 74 69 6e 67 29 3c 2f 6c 69 3e 0d 0a 3c 2f  etting)</li>..</
3190: 75 6c 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20  ul><br>..<table 
31a0: 62 67 63 6f 6c 6f 72 3d 22 23 66 66 66 66 64 30  bgcolor="#ffffd0
31b0: 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 31  " cellpadding="1
31c0: 38 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 62 3e  8"><tr><td>..<b>
31d0: 4e 6f 74 65 3c 2f 62 3e 3a 20 71 75 6f 74 69 6e  Note</b>: quotin
31e0: 67 20 6f 72 20 6e 6f 74 20 61 6e 79 20 54 65 78  g or not any Tex
31f0: 74 20 53 74 72 69 6e 67 20 77 68 65 6e 20 69 74  t String when it
3200: 20 61 70 70 65 61 72 73 20 61 73 20 61 20 56 69   appears as a Vi
3210: 72 74 75 61 6c 20 54 61 62 6c 65 20 61 72 67 75  rtual Table argu
3220: 6d 65 6e 74 20 68 61 73 20 61 62 73 6f 6c 75 74  ment has absolut
3230: 65 6c 79 20 6e 6f 20 65 66 66 65 63 74 2e 0d 0a  ely no effect...
3240: 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45  <verbatim>..SELE
3250: 43 54 20 43 52 45 41 54 45 20 56 49 52 54 55 41  CT CREATE VIRTUA
3260: 4c 20 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65  L TABLE my_table
3270: 20 55 53 49 4e 47 20 56 69 72 74 75 61 6c 54 65   USING VirtualTe
3280: 78 74 28 20 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f  xt( /home/sandro
3290: 2f 6d 79 66 69 6c 65 2e 74 78 74 20 2c 20 43 50  /myfile.txt , CP
32a0: 31 32 35 32 20 2c 20 31 20 2c 20 50 4f 49 4e 54  1252 , 1 , POINT
32b0: 20 2c 20 4e 4f 4e 45 20 2c 20 54 41 42 20 29 3b   , NONE , TAB );
32c0: 0d 0a 6f 72 0d 0a 53 45 4c 45 43 54 20 43 52 45  ..or..SELECT CRE
32d0: 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c  ATE VIRTUAL TABL
32e0: 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e 47  E my_table USING
32f0: 20 56 69 72 74 75 61 6c 54 65 78 74 28 20 27 2f   VirtualText( '/
3300: 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79 66 69  home/sandro/myfi
3310: 6c 65 2e 74 78 74 27 20 2c 20 27 43 50 31 32 35  le.txt' , 'CP125
3320: 32 27 20 2c 20 31 20 2c 20 27 50 4f 49 4e 54 27  2' , 1 , 'POINT'
3330: 20 2c 20 27 4e 4f 4e 45 27 20 2c 20 27 54 41 42   , 'NONE' , 'TAB
3340: 27 20 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d  ' );..</verbatim
3350: 3e 0d 0a 42 6f 74 68 20 6e 6f 74 61 74 69 6f 6e  >..Both notation
3360: 73 20 77 69 6c 6c 20 70 72 6f 64 75 63 65 20 65  s will produce e
3370: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20  xactly the same 
3380: 69 64 65 6e 74 69 63 61 6c 20 72 65 73 75 6c 74  identical result
3390: 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74  ...</td></tr></t
33a0: 61 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 74 61  able>..<br>..<ta
33b0: 62 6c 65 20 62 67 63 6f 6c 6f 72 3d 22 23 64 30  ble bgcolor="#d0
33c0: 66 66 64 30 22 20 63 65 6c 6c 70 61 64 64 69 6e  ffd0" cellpaddin
33d0: 67 3d 22 31 38 22 3e 3c 74 72 3e 3c 74 64 3e 0d  g="18"><tr><td>.
33e0: 0a 3c 68 33 3e 42 65 73 74 20 70 72 61 63 74 69  .<h3>Best practi
33f0: 63 65 73 20 61 6e 64 20 6b 6e 6f 77 6e 20 6c 69  ces and known li
3400: 6d 69 74 61 74 69 6f 6e 73 3c 2f 68 33 3e 0d 0a  mitations</h3>..
3410: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 42 65 20  <ul>..<li><b>Be 
3420: 61 77 61 72 65 3c 2f 62 3e 3a 20 6f 70 65 6e 69  aware</b>: openi
3430: 6e 67 20 62 69 67 20 6f 72 20 68 75 67 65 20 74  ng big or huge t
3440: 65 78 74 20 66 69 6c 65 73 20 63 6f 75 6c 64 20  ext files could 
3450: 65 61 73 69 6c 79 20 72 65 71 75 69 72 65 20 6d  easily require m
3460: 61 73 73 69 76 65 20 52 41 4d 20 61 6c 6c 6f 63  assive RAM alloc
3470: 61 74 69 6f 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c  ations.</li>..<l
3480: 69 3e 3c 62 3e 57 61 72 6e 69 6e 67 3c 2f 62 3e  i><b>Warning</b>
3490: 3a 20 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20  : attempting to 
34a0: 61 63 63 65 73 73 20 61 6e 20 65 78 74 65 72 6e  access an extern
34b0: 61 6c 20 54 65 78 74 20 66 69 6c 65 20 62 79 20  al Text file by 
34c0: 62 6c 69 6e 64 6c 79 20 73 70 65 63 69 66 79 69  blindly specifyi
34d0: 6e 67 20 72 61 6e 64 6f 6d 6c 79 20 63 68 6f 73  ng randomly chos
34e0: 65 6e 20 64 65 6c 69 6d 69 74 65 72 73 20 6f 72  en delimiters or
34f0: 20 73 65 70 61 72 61 74 6f 72 73 20 6d 61 79 20   separators may 
3500: 65 61 73 69 6c 79 20 68 61 76 65 20 63 61 74 61  easily have cata
3510: 73 74 72 6f 70 68 69 63 20 65 66 66 65 63 74 73  strophic effects
3520: 2e 3c 62 72 3e 0d 0a 41 6c 77 61 79 73 20 63 61  .<br>..Always ca
3530: 72 65 66 75 6c 6c 79 20 63 68 65 63 6b 20 74 68  refully check th
3540: 65 20 61 63 74 75 61 6c 20 70 61 79 6c 6f 61 64  e actual payload
3550: 20 6f 66 20 74 68 65 20 54 65 78 74 20 66 69 6c   of the Text fil
3560: 65 20 62 65 66 6f 72 65 20 61 74 74 65 6d 70 74  e before attempt
3570: 69 6e 67 20 74 6f 20 61 63 63 65 73 73 20 69 74  ing to access it
3580: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 56 69 72 74  .</li>..<li>Virt
3590: 75 61 6c 20 54 61 62 6c 65 73 20 61 72 65 20 6e  ual Tables are n
35a0: 6f 74 20 72 65 61 6c 6c 79 20 67 65 6e 75 69 6e  ot really genuin
35b0: 65 20 44 61 74 61 62 61 73 65 20 54 61 62 6c 65  e Database Table
35c0: 73 2c 20 74 68 65 79 20 61 72 65 20 6a 75 73 74  s, they are just
35d0: 20 70 72 65 74 65 6e 64 69 6e 67 20 74 6f 20 62   pretending to b
35e0: 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 56 69 72  e.</li>..<li>Vir
35f0: 74 75 61 6c 20 54 61 62 6c 65 73 20 68 61 76 65  tual Tables have
3600: 20 76 65 72 79 20 70 6f 6f 72 20 73 70 65 65 64   very poor speed
3610: 20 70 65 72 66 6f 72 6d 61 6e 63 65 73 20 77 68   performances wh
3620: 65 6e 20 63 6f 6d 70 61 72 65 64 20 74 6f 20 67  en compared to g
3630: 65 6e 75 69 6e 65 20 44 61 74 61 62 61 73 65 20  enuine Database 
3640: 54 61 62 6c 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c  Tables.</li>..<l
3650: 69 3e 43 6f 6d 70 6c 65 78 20 53 51 4c 20 71 75  i>Complex SQL qu
3660: 65 72 69 65 73 20 3c 62 3e 4a 4f 49 4e 3c 2f 62  eries <b>JOIN</b
3670: 3e 69 6e 67 20 73 65 76 65 72 61 6c 20 54 61 62  >ing several Tab
3680: 6c 65 73 20 63 61 6e 20 6f 66 74 65 6e 20 72 65  les can often re
3690: 74 75 72 6e 20 6f 64 64 20 61 6e 64 20 6d 69 73  turn odd and mis
36a0: 6c 65 61 64 69 6e 67 20 72 65 73 75 6c 74 73 65  leading resultse
36b0: 74 73 2c 20 69 66 20 6f 6e 65 20 6f 72 20 6d 6f  ts, if one or mo
36c0: 72 65 20 6f 66 20 74 68 65 20 3c 62 3e 4a 4f 49  re of the <b>JOI
36d0: 4e 3c 2f 62 3e 65 64 20 54 61 62 6c 65 73 20 61  N</b>ed Tables a
36e0: 72 65 20 6f 66 20 74 68 65 20 56 69 72 74 75 61  re of the Virtua
36f0: 6c 20 74 79 70 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c  l type.</li>..<l
3700: 69 3e 54 68 65 20 62 65 73 74 20 75 73 61 67 65  i>The best usage
3710: 20 79 6f 75 20 63 61 6e 20 64 6f 20 6f 66 20 61   you can do of a
3720: 20 56 69 72 74 75 61 6c 20 54 61 62 6c 65 20 69   Virtual Table i
3730: 73 20 74 6f 20 6a 75 73 74 20 73 75 70 70 6f 72  s to just suppor
3740: 74 20 62 61 73 69 63 20 64 61 74 61 20 69 6d 70  t basic data imp
3750: 6f 72 74 20 70 72 6f 63 65 73 73 65 73 2c 20 6f  ort processes, o
3760: 72 20 74 6f 20 71 75 69 63 6b 6c 79 20 67 65 74  r to quickly get
3770: 20 61 6e 20 6f 76 65 72 61 6c 6c 20 67 6c 61 6e   an overall glan
3780: 63 65 20 61 74 20 61 20 66 75 6c 6c 20 64 61 74  ce at a full dat
3790: 61 73 65 74 20 77 69 74 68 6f 75 74 20 6e 65 63  aset without nec
37a0: 65 73 73 61 72 69 6c 79 20 69 6d 70 6f 72 74 69  essarily importi
37b0: 6e 67 20 69 74 20 69 6e 74 6f 20 74 68 65 20 44  ng it into the D
37c0: 61 74 61 62 61 73 65 2e 3c 2f 6c 69 3e 0d 0a 3c  atabase.</li>..<
37d0: 6c 69 3e 50 72 65 74 65 6e 64 69 6e 67 20 74 6f  li>Pretending to
37e0: 20 75 73 65 20 61 20 56 69 72 74 75 61 6c 20 54   use a Virtual T
37f0: 61 62 6c 65 20 61 73 20 61 20 66 75 6c 6c 20 72  able as a full r
3800: 65 70 6c 61 63 65 6d 65 6e 74 20 6f 66 20 69 6d  eplacement of im
3810: 70 6f 72 74 69 6e 67 20 61 6c 6c 20 64 61 74 61  porting all data
3820: 20 77 69 74 68 69 6e 20 61 20 67 65 6e 75 69 6e   within a genuin
3830: 65 20 44 61 74 61 62 61 73 65 20 54 61 62 6c 65  e Database Table
3840: 20 69 73 20 73 74 72 6f 6e 67 6c 79 20 64 69 73   is strongly dis
3850: 63 6f 75 72 61 67 65 64 2c 20 61 6e 64 20 6e 65  couraged, and ne
3860: 76 65 72 20 69 73 20 61 20 73 6d 61 72 74 20 69  ver is a smart i
3870: 64 65 61 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  dea.</li>..</ul>
3880: 3c 62 72 3e 0d 0a 3c 62 3e 57 61 72 6e 69 6e 67  <br>..<b>Warning
3890: 3c 2f 62 3e 3a 20 56 69 72 74 75 61 6c 54 65 78  </b>: VirtualTex
38a0: 74 20 54 61 62 6c 65 73 20 61 72 65 20 61 6c 77  t Tables are alw
38b0: 61 79 73 20 73 75 62 6a 65 63 74 20 74 6f 20 3c  ays subject to <
38c0: 62 3e 52 45 41 44 2d 4f 4e 4c 59 3c 2f 62 3e 20  b>READ-ONLY</b> 
38d0: 72 65 73 74 72 69 63 74 69 6f 6e 73 2e 20 41 6e  restrictions. An
38e0: 79 20 61 74 74 65 6d 70 74 20 74 6f 20 74 6f 20  y attempt to to 
38f0: 65 78 65 63 75 74 65 20 61 6e 20 3c 62 3e 49 4e  execute an <b>IN
3900: 53 45 52 54 3c 2f 62 3e 2c 20 3c 62 3e 55 50 44  SERT</b>, <b>UPD
3910: 41 54 45 3c 2f 62 3e 20 6f 72 20 3c 62 3e 44 45  ATE</b> or <b>DE
3920: 4c 45 54 45 3c 2f 62 3e 20 73 74 61 74 65 6d 65  LETE</b> stateme
3930: 6e 74 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 72  nt will always r
3940: 65 74 75 72 6e 20 61 6e 20 65 72 72 6f 72 2e 3c  eturn an error.<
3950: 62 72 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c  br>..</td></tr><
3960: 2f 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c  /table>..<br>..<
3970: 68 72 3e 0d 0a 3c 68 31 3e 3c 61 20 69 64 3d 22  hr>..<h1><a id="
3980: 56 69 72 74 75 61 6c 58 4c 22 3e 56 69 72 74 75  VirtualXL">Virtu
3990: 61 6c 58 4c 3c 2f 61 3e 3c 2f 68 31 3e 0d 0a 54  alXL</a></h1>..T
39a0: 68 65 20 3c 62 3e 56 69 72 74 75 61 6c 58 4c 3c  he <b>VirtualXL<
39b0: 2f 62 3e 20 49 6e 74 65 72 66 61 63 65 20 61 6c  /b> Interface al
39c0: 6c 6f 77 73 20 74 6f 20 64 69 72 65 63 74 6c 79  lows to directly
39d0: 20 61 63 63 65 73 73 20 61 6e 20 65 78 74 65 72   access an exter
39e0: 6e 61 6c 20 4d 53 20 45 78 63 65 6c 20 73 70 72  nal MS Excel spr
39f0: 65 61 64 73 68 65 65 74 20 62 79 20 75 73 69 6e  eadsheet by usin
3a00: 67 20 73 74 61 6e 64 61 72 64 20 53 70 61 74 69  g standard Spati
3a10: 61 6c 20 53 51 4c 20 71 75 65 72 69 65 73 2e 3c  al SQL queries.<
3a20: 62 72 3e 0d 0a 53 79 6e 74 61 78 20 66 6f 72 20  br>..Syntax for 
3a30: 63 72 65 61 74 69 6e 67 20 61 20 56 69 72 74 75  creating a Virtu
3a40: 61 6c 58 4c 20 54 61 62 6c 65 3a 0d 0a 3c 76 65  alXL Table:..<ve
3a50: 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20  rbatim>..SELECT 
3a60: 43 52 45 41 54 45 20 56 49 52 54 55 41 4c 20 54  CREATE VIRTUAL T
3a70: 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55 53  ABLE my_table US
3a80: 49 4e 47 20 56 69 72 74 75 61 6c 58 4c 20 28 20  ING VirtualXL ( 
3a90: 78 6c 73 5f 70 61 74 68 20 29 3b 0d 0a 0d 0a 53  xls_path );....S
3aa0: 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49 52  ELECT CREATE VIR
3ab0: 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74 61  TUAL TABLE my_ta
3ac0: 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75 61  ble USING Virtua
3ad0: 6c 58 4c 20 28 20 78 6c 73 5f 70 61 74 68 20 2c  lXL ( xls_path ,
3ae0: 20 77 6f 72 6b 73 68 65 65 74 5f 69 6e 64 65 78   worksheet_index
3af0: 20 29 3b 0d 0a 0d 0a 53 45 4c 45 43 54 20 43 52   );....SELECT CR
3b00: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42  EATE VIRTUAL TAB
3b10: 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e  LE my_table USIN
3b20: 47 20 56 69 72 74 75 61 6c 58 4c 20 28 20 78 6c  G VirtualXL ( xl
3b30: 73 5f 70 61 74 68 20 2c 20 77 6f 72 6b 73 68 65  s_path , workshe
3b40: 65 74 5f 69 6e 64 65 78 20 2c 20 66 69 72 73 74  et_index , first
3b50: 5f 72 6f 77 5f 61 73 5f 74 69 74 6c 65 73 20 29  _row_as_titles )
3b60: 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a  ;..</verbatim>..
3b70: 53 75 70 70 6f 72 74 65 64 20 61 72 67 75 6d 65  Supported argume
3b80: 6e 74 73 20 61 6e 64 20 74 68 65 69 72 20 69 6e  nts and their in
3b90: 74 65 72 70 72 65 74 61 74 69 6f 6e 3a 0d 0a 3c  terpretation:..<
3ba0: 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 78 6c 73 5f  ul>..<li><b>xls_
3bb0: 70 61 74 68 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e  path</b> (<i><b>
3bc0: 6d 61 6e 64 61 74 6f 72 79 3c 2f 62 3e 3c 2f 69  mandatory</b></i
3bd0: 3e 29 3a 20 74 68 65 20 72 65 6c 61 74 69 76 65  >): the relative
3be0: 20 6f 72 20 61 62 73 6f 6c 75 74 65 20 70 61 74   or absolute pat
3bf0: 68 6e 61 6d 65 20 6c 65 61 64 69 6e 67 20 74 6f  hname leading to
3c00: 20 74 68 65 20 65 78 74 65 72 6e 61 6c 20 4d 53   the external MS
3c10: 20 45 78 63 65 6c 20 73 70 72 65 61 64 73 68 65   Excel spreadshe
3c20: 65 74 20 28 6f 6c 64 20 62 69 6e 61 72 79 20 66  et (old binary f
3c30: 6f 72 6d 61 74 20 3c 69 3e 2a 2e 78 6c 73 3c 2f  ormat <i>*.xls</
3c40: 69 3e 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c  i>).</li>..<li><
3c50: 62 3e 77 6f 72 6b 73 68 65 65 74 5f 69 6e 64 65  b>worksheet_inde
3c60: 78 3c 2f 62 3e 20 28 3c 69 3e 3c 62 3e 6f 70 74  x</b> (<i><b>opt
3c70: 69 6f 6e 61 6c 3c 2f 62 3e 3c 2f 69 3e 29 3a 20  ional</b></i>): 
3c80: 74 68 65 20 69 6e 64 65 78 20 69 64 65 6e 74 69  the index identi
3c90: 66 79 69 6e 67 20 6f 6e 65 20 6f 66 20 74 68 65  fying one of the
3ca0: 20 77 6f 72 6b 73 68 65 65 74 73 20 77 69 74 68   worksheets with
3cb0: 69 6e 20 74 68 65 20 45 78 63 65 6c 20 64 6f 63  in the Excel doc
3cc0: 75 6d 65 6e 74 2e 3c 62 72 3e 0d 0a 4d 53 20 45  ument.<br>..MS E
3cd0: 78 63 65 6c 20 6d 61 79 20 63 6f 6e 74 61 69 6e  xcel may contain
3ce0: 20 6d 6f 72 65 20 77 6f 72 6b 73 68 65 65 74 73   more worksheets
3cf0: 2c 20 61 6e 64 20 65 61 63 68 20 69 6e 64 69 76  , and each indiv
3d00: 69 64 75 61 6c 20 77 6f 72 6b 73 68 65 65 74 20  idual worksheet 
3d10: 69 73 20 69 64 65 6e 74 69 66 69 65 64 20 62 79  is identified by
3d20: 20 69 74 73 20 6f 77 6e 20 69 6e 64 65 78 20 28   its own index (
3d30: 3c 62 3e 7a 65 72 6f 2d 62 61 73 65 64 3c 2f 62  <b>zero-based</b
3d40: 3e 20 69 6e 64 65 78 3b 20 74 68 65 20 66 69 72  > index; the fir
3d50: 73 74 20 77 6f 72 6b 73 68 65 65 74 20 61 6c 77  st worksheet alw
3d60: 61 79 73 20 68 61 73 20 3c 62 3e 69 6e 64 65 78  ays has <b>index
3d70: 3d 30 3c 2f 62 3e 29 2e 3c 62 72 3e 0d 0a 49 66  =0</b>).<br>..If
3d80: 20 6e 6f 74 20 65 78 70 6c 69 63 69 74 6c 79 20   not explicitly 
3d90: 73 70 65 63 69 66 69 65 64 20 74 68 65 20 66 69  specified the fi
3da0: 72 73 74 20 77 6f 72 6b 73 68 65 65 74 20 77 69  rst worksheet wi
3db0: 6c 6c 20 61 6c 77 61 79 73 20 62 65 20 61 73 73  ll always be ass
3dc0: 75 6d 65 64 20 28 64 65 66 61 75 6c 74 20 76 61  umed (default va
3dd0: 6c 75 65 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  lue).</li>..<li>
3de0: 3c 62 3e 66 69 72 73 74 5f 72 6f 77 5f 61 73 5f  <b>first_row_as_
3df0: 74 69 74 6c 65 73 3c 2f 62 3e 20 28 3c 69 3e 3c  titles</b> (<i><
3e00: 62 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 62 3e 3c 2f  b>optional</b></
3e10: 69 3e 29 3a 20 74 68 69 73 20 69 73 20 61 20 3c  i>): this is a <
3e20: 62 3e 42 4f 4f 4c 45 41 4e 3c 2f 62 3e 20 66 6c  b>BOOLEAN</b> fl
3e30: 61 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69  ag:..<ul>..<li>i
3e40: 66 20 73 65 74 20 74 6f 20 3c 62 3e 30 3c 2f 62  f set to <b>0</b
3e50: 3e 20 28 3c 62 3e 46 41 4c 53 45 3c 2f 62 3e 29  > (<b>FALSE</b>)
3e60: 20 61 6c 6c 20 63 6f 6c 75 6d 6e 20 6e 61 6d 65   all column name
3e70: 73 20 77 69 6c 6c 20 62 65 20 61 75 74 6f 6d 61  s will be automa
3e80: 74 69 63 61 6c 6c 79 20 73 65 74 20 62 79 20 75  tically set by u
3e90: 73 69 6e 67 20 61 20 70 72 6f 67 72 65 73 73 69  sing a progressi
3ea0: 76 65 20 73 65 71 75 65 6e 63 65 2e 3c 2f 6c 69  ve sequence.</li
3eb0: 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65 74 20 74 6f  >..<li>if set to
3ec0: 20 61 6e 79 20 6f 74 68 65 72 20 69 6e 74 65 67   any other integ
3ed0: 65 72 20 76 61 6c 75 65 20 28 3c 62 3e 54 52 55  er value (<b>TRU
3ee0: 45 3c 2f 62 3e 29 20 61 6c 6c 20 63 6f 6c 75 6d  E</b>) all colum
3ef0: 6e 20 6e 61 6d 65 73 20 77 69 6c 6c 20 62 79 20  n names will by 
3f00: 65 78 70 65 63 74 65 64 20 74 6f 20 62 65 20 64  expected to be d
3f10: 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 76 65  efined in the ve
3f20: 72 79 20 66 69 72 73 74 20 72 6f 77 20 6f 66 20  ry first row of 
3f30: 74 68 65 20 53 70 72 65 61 64 73 68 65 65 74 2e  the Spreadsheet.
3f40: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 66 20 6e 6f  </li>..<li>if no
3f50: 74 20 65 78 70 6c 69 63 69 74 6c 79 20 73 70 65  t explicitly spe
3f60: 63 69 66 69 65 64 2c 20 3c 62 3e 54 52 55 45 3c  cified, <b>TRUE<
3f70: 2f 62 3e 20 77 69 6c 6c 20 61 6c 77 61 79 73 20  /b> will always 
3f80: 62 65 20 61 73 73 75 6d 65 64 20 28 64 65 66 61  be assumed (defa
3f90: 75 6c 74 20 73 65 74 74 69 6e 67 29 2e 3c 2f 6c  ult setting).</l
3fa0: 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a  i>..</ul></li>..
3fb0: 3c 75 6c 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e  <ul>..</ul></li>
3fc0: 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 74 61  ..</ul><br>..<ta
3fd0: 62 6c 65 20 62 67 63 6f 6c 6f 72 3d 22 23 66 66  ble bgcolor="#ff
3fe0: 66 66 64 30 22 20 63 65 6c 6c 70 61 64 64 69 6e  ffd0" cellpaddin
3ff0: 67 3d 22 31 38 22 3e 3c 74 72 3e 3c 74 64 3e 0d  g="18"><tr><td>.
4000: 0a 3c 62 3e 4e 6f 74 65 3c 2f 62 3e 3a 20 71 75  .<b>Note</b>: qu
4010: 6f 74 69 6e 67 20 6f 72 20 6e 6f 74 20 61 6e 79  oting or not any
4020: 20 54 65 78 74 20 53 74 72 69 6e 67 20 77 68 65   Text String whe
4030: 6e 20 69 74 20 61 70 70 65 61 72 73 20 61 73 20  n it appears as 
4040: 61 20 56 69 72 74 75 61 6c 20 54 61 62 6c 65 20  a Virtual Table 
4050: 61 72 67 75 6d 65 6e 74 20 68 61 73 20 61 62 73  argument has abs
4060: 6f 6c 75 74 65 6c 79 20 6e 6f 20 65 66 66 65 63  olutely no effec
4070: 74 2e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a  t...<verbatim>..
4080: 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56 49  SELECT CREATE VI
4090: 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f 74  RTUAL TABLE my_t
40a0: 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74 75  able USING Virtu
40b0: 61 6c 58 4c 28 20 2f 68 6f 6d 65 2f 73 61 6e 64  alXL( /home/sand
40c0: 72 6f 2f 6d 79 73 70 72 65 61 64 73 68 65 65 74  ro/myspreadsheet
40d0: 2e 78 6c 73 20 2c 20 33 2c 20 31 20 29 3b 0d 0a  .xls , 3, 1 );..
40e0: 6f 72 0d 0a 53 45 4c 45 43 54 20 43 52 45 41 54  or..SELECT CREAT
40f0: 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20  E VIRTUAL TABLE 
4100: 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e 47 20 56  my_table USING V
4110: 69 72 74 75 61 6c 58 4c 28 20 27 2f 68 6f 6d 65  irtualXL( '/home
4120: 2f 73 61 6e 64 72 6f 2f 6d 79 73 70 72 65 61 64  /sandro/myspread
4130: 73 68 65 65 74 2e 78 6c 73 27 20 2c 20 33 2c 20  sheet.xls' , 3, 
4140: 31 20 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d  1 );..</verbatim
4150: 3e 0d 0a 42 6f 74 68 20 6e 6f 74 61 74 69 6f 6e  >..Both notation
4160: 73 20 77 69 6c 6c 20 70 72 6f 64 75 63 65 20 65  s will produce e
4170: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20  xactly the same 
4180: 69 64 65 6e 74 69 63 61 6c 20 72 65 73 75 6c 74  identical result
4190: 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74  ...</td></tr></t
41a0: 61 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 74 61  able>..<br>..<ta
41b0: 62 6c 65 20 62 67 63 6f 6c 6f 72 3d 22 23 64 30  ble bgcolor="#d0
41c0: 66 66 64 30 22 20 63 65 6c 6c 70 61 64 64 69 6e  ffd0" cellpaddin
41d0: 67 3d 22 31 38 22 3e 3c 74 72 3e 3c 74 64 3e 0d  g="18"><tr><td>.
41e0: 0a 3c 68 33 3e 42 65 73 74 20 70 72 61 63 74 69  .<h3>Best practi
41f0: 63 65 73 20 61 6e 64 20 6b 6e 6f 77 6e 20 6c 69  ces and known li
4200: 6d 69 74 61 74 69 6f 6e 73 3c 2f 68 33 3e 0d 0a  mitations</h3>..
4210: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 56 69 72 74 75 61  <ul>..<li>Virtua
4220: 6c 20 54 61 62 6c 65 73 20 61 72 65 20 6e 6f 74  l Tables are not
4230: 20 72 65 61 6c 6c 79 20 67 65 6e 75 69 6e 65 20   really genuine 
4240: 44 61 74 61 62 61 73 65 20 54 61 62 6c 65 73 2c  Database Tables,
4250: 20 74 68 65 79 20 61 72 65 20 6a 75 73 74 20 70   they are just p
4260: 72 65 74 65 6e 64 69 6e 67 20 74 6f 20 62 65 2e  retending to be.
4270: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 56 69 72 74 75  </li>..<li>Virtu
4280: 61 6c 20 54 61 62 6c 65 73 20 68 61 76 65 20 76  al Tables have v
4290: 65 72 79 20 70 6f 6f 72 20 73 70 65 65 64 20 70  ery poor speed p
42a0: 65 72 66 6f 72 6d 61 6e 63 65 73 20 77 68 65 6e  erformances when
42b0: 20 63 6f 6d 70 61 72 65 64 20 74 6f 20 67 65 6e   compared to gen
42c0: 75 69 6e 65 20 44 61 74 61 62 61 73 65 20 54 61  uine Database Ta
42d0: 62 6c 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  bles.</li>..<li>
42e0: 43 6f 6d 70 6c 65 78 20 53 51 4c 20 71 75 65 72  Complex SQL quer
42f0: 69 65 73 20 3c 62 3e 4a 4f 49 4e 3c 2f 62 3e 69  ies <b>JOIN</b>i
4300: 6e 67 20 73 65 76 65 72 61 6c 20 54 61 62 6c 65  ng several Table
4310: 73 20 63 61 6e 20 6f 66 74 65 6e 20 72 65 74 75  s can often retu
4320: 72 6e 20 6f 64 64 20 61 6e 64 20 6d 69 73 6c 65  rn odd and misle
4330: 61 64 69 6e 67 20 72 65 73 75 6c 74 73 65 74 73  ading resultsets
4340: 2c 20 69 66 20 6f 6e 65 20 6f 72 20 6d 6f 72 65  , if one or more
4350: 20 6f 66 20 74 68 65 20 3c 62 3e 4a 4f 49 4e 3c   of the <b>JOIN<
4360: 2f 62 3e 65 64 20 54 61 62 6c 65 73 20 61 72 65  /b>ed Tables are
4370: 20 6f 66 20 74 68 65 20 56 69 72 74 75 61 6c 20   of the Virtual 
4380: 74 79 70 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  type.</li>..<li>
4390: 54 68 65 20 62 65 73 74 20 75 73 61 67 65 20 79  The best usage y
43a0: 6f 75 20 63 61 6e 20 64 6f 20 6f 66 20 61 20 56  ou can do of a V
43b0: 69 72 74 75 61 6c 20 54 61 62 6c 65 20 69 73 20  irtual Table is 
43c0: 74 6f 20 6a 75 73 74 20 73 75 70 70 6f 72 74 20  to just support 
43d0: 62 61 73 69 63 20 64 61 74 61 20 69 6d 70 6f 72  basic data impor
43e0: 74 20 70 72 6f 63 65 73 73 65 73 2c 20 6f 72 20  t processes, or 
43f0: 74 6f 20 71 75 69 63 6b 6c 79 20 67 65 74 20 61  to quickly get a
4400: 6e 20 6f 76 65 72 61 6c 6c 20 67 6c 61 6e 63 65  n overall glance
4410: 20 61 74 20 61 20 66 75 6c 6c 20 64 61 74 61 73   at a full datas
4420: 65 74 20 77 69 74 68 6f 75 74 20 6e 65 63 65 73  et without neces
4430: 73 61 72 69 6c 79 20 69 6d 70 6f 72 74 69 6e 67  sarily importing
4440: 20 69 74 20 69 6e 74 6f 20 74 68 65 20 44 61 74   it into the Dat
4450: 61 62 61 73 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  abase.</li>..<li
4460: 3e 50 72 65 74 65 6e 64 69 6e 67 20 74 6f 20 75  >Pretending to u
4470: 73 65 20 61 20 56 69 72 74 75 61 6c 20 54 61 62  se a Virtual Tab
4480: 6c 65 20 61 73 20 61 20 66 75 6c 6c 20 72 65 70  le as a full rep
4490: 6c 61 63 65 6d 65 6e 74 20 6f 66 20 69 6d 70 6f  lacement of impo
44a0: 72 74 69 6e 67 20 61 6c 6c 20 64 61 74 61 20 77  rting all data w
44b0: 69 74 68 69 6e 20 61 20 67 65 6e 75 69 6e 65 20  ithin a genuine 
44c0: 44 61 74 61 62 61 73 65 20 54 61 62 6c 65 20 69  Database Table i
44d0: 73 20 73 74 72 6f 6e 67 6c 79 20 64 69 73 63 6f  s strongly disco
44e0: 75 72 61 67 65 64 2c 20 61 6e 64 20 6e 65 76 65  uraged, and neve
44f0: 72 20 69 73 20 61 20 73 6d 61 72 74 20 69 64 65  r is a smart ide
4500: 61 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62  a.</li>..</ul><b
4510: 72 3e 0d 0a 3c 62 3e 57 61 72 6e 69 6e 67 3c 2f  r>..<b>Warning</
4520: 62 3e 3a 20 56 69 72 74 75 61 6c 58 4c 20 54 61  b>: VirtualXL Ta
4530: 62 6c 65 73 20 61 72 65 20 61 6c 77 61 79 73 20  bles are always 
4540: 73 75 62 6a 65 63 74 20 74 6f 20 3c 62 3e 52 45  subject to <b>RE
4550: 41 44 2d 4f 4e 4c 59 3c 2f 62 3e 20 72 65 73 74  AD-ONLY</b> rest
4560: 72 69 63 74 69 6f 6e 73 2e 20 41 6e 79 20 61 74  rictions. Any at
4570: 74 65 6d 70 74 20 74 6f 20 74 6f 20 65 78 65 63  tempt to to exec
4580: 75 74 65 20 61 6e 20 3c 62 3e 49 4e 53 45 52 54  ute an <b>INSERT
4590: 3c 2f 62 3e 2c 20 3c 62 3e 55 50 44 41 54 45 3c  </b>, <b>UPDATE<
45a0: 2f 62 3e 20 6f 72 20 3c 62 3e 44 45 4c 45 54 45  /b> or <b>DELETE
45b0: 3c 2f 62 3e 20 73 74 61 74 65 6d 65 6e 74 20 77  </b> statement w
45c0: 69 6c 6c 20 61 6c 77 61 79 73 20 72 65 74 75 72  ill always retur
45d0: 6e 20 61 6e 20 65 72 72 6f 72 2e 3c 62 72 3e 0d  n an error.<br>.
45e0: 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62  .</td></tr></tab
45f0: 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 74 61 62 6c  le>..<br>..<tabl
4600: 65 20 62 67 63 6f 6c 6f 72 3d 22 23 65 30 65 30  e bgcolor="#e0e0
4610: 65 30 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d  e0" cellpadding=
4620: 22 31 38 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c  "18"><tr><td>..<
4630: 68 33 3e 52 65 6c 61 74 65 64 20 54 6f 70 69 63  h3>Related Topic
4640: 73 3c 2f 68 33 3e 0d 0a 54 68 65 20 3c 62 3e 49  s</h3>..The <b>I
4650: 6d 70 6f 72 74 58 4c 53 28 29 3c 2f 62 3e 20 53  mportXLS()</b> S
4660: 51 4c 20 66 75 6e 63 74 69 6f 6e 20 61 6c 6c 6f  QL function allo
4670: 77 73 20 74 6f 20 63 72 65 61 74 65 20 61 6e 64  ws to create and
4680: 20 70 6f 70 75 6c 61 74 65 20 61 20 67 65 6e 75   populate a genu
4690: 69 6e 65 20 44 61 74 61 62 61 73 65 20 54 61 62  ine Database Tab
46a0: 6c 65 20 62 79 20 69 6d 70 6f 72 74 69 6e 67 20  le by importing 
46b0: 61 6e 20 65 78 74 65 72 6e 61 6c 20 4d 53 20 45  an external MS E
46c0: 78 63 65 6c 20 73 70 72 65 61 64 73 68 65 65 74  xcel spreadsheet
46d0: 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74  ...</td></tr></t
46e0: 61 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 68 72  able>..<br>..<hr
46f0: 3e 0d 0a 3c 68 31 3e 3c 61 20 69 64 3d 22 56 69  >..<h1><a id="Vi
4700: 72 74 75 61 6c 46 44 4f 22 3e 56 69 72 74 75 61  rtualFDO">Virtua
4710: 6c 46 44 4f 3c 2f 61 3e 3c 2f 68 31 3e 0d 0a 54  lFDO</a></h1>..T
4720: 68 65 20 3c 62 3e 56 69 72 74 75 61 6c 46 44 4f  he <b>VirtualFDO
4730: 3c 2f 62 3e 20 49 6e 74 65 72 66 61 63 65 20 61  </b> Interface a
4740: 6c 6c 6f 77 73 20 74 6f 20 64 69 72 65 63 74 6c  llows to directl
4750: 79 20 61 63 63 65 73 73 20 61 20 53 70 61 74 69  y access a Spati
4760: 61 6c 20 54 61 62 6c 65 20 63 6f 6e 74 61 69 6e  al Table contain
4770: 69 6e 67 20 3c 62 3e 46 44 4f 20 62 69 6e 61 72  ing <b>FDO binar
4780: 79 20 47 65 6f 6d 65 74 72 69 65 73 3c 2f 62 3e  y Geometries</b>
4790: 20 65 78 61 63 74 6c 79 20 61 73 20 69 66 20 77   exactly as if w
47a0: 61 73 20 61 20 53 70 61 74 69 61 4c 69 74 65 27  as a SpatiaLite'
47b0: 73 20 6f 77 6e 20 6e 61 74 69 76 65 20 54 61 62  s own native Tab
47c0: 6c 65 2e 3c 62 72 3e 0d 0a 46 44 4f 20 69 73 20  le.<br>..FDO is 
47d0: 61 6e 20 61 6c 74 65 72 6e 61 74 69 76 65 20 62  an alternative b
47e0: 69 6e 61 72 79 20 66 6f 72 6d 61 74 20 66 6f 72  inary format for
47f0: 20 47 65 6f 6d 65 74 72 69 65 73 20 73 74 6f 72   Geometries stor
4800: 65 64 20 77 69 74 68 69 6e 20 61 20 53 51 4c 69  ed within a SQLi
4810: 74 65 20 44 61 74 61 62 61 73 65 3b 20 79 6f 75  te Database; you
4820: 20 63 61 6e 20 65 76 65 6e 74 75 61 6c 6c 79 20   can eventually 
4830: 72 65 61 64 20 74 68 65 20 3c 61 20 68 72 65 66  read the <a href
4840: 3d 22 68 74 74 70 73 3a 2f 2f 74 72 61 63 2e 6f  ="https://trac.o
4850: 73 67 65 6f 2e 6f 72 67 2f 66 64 6f 2f 77 69 6b  sgeo.org/fdo/wik
4860: 69 2f 46 44 4f 52 66 63 31 36 22 3e 52 46 43 20  i/FDORfc16">RFC 
4870: 31 36 3c 2f 61 3e 20 73 70 65 63 69 66 69 63 61  16</a> specifica
4880: 74 69 6f 6e 20 66 6f 72 20 6d 6f 72 65 20 64 65  tion for more de
4890: 74 61 69 6c 73 2e 3c 62 72 3e 0d 0a 53 79 6e 74  tails.<br>..Synt
48a0: 61 78 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20  ax for creating 
48b0: 61 20 56 69 72 74 75 61 6c 46 44 4f 20 54 61 62  a VirtualFDO Tab
48c0: 6c 65 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d  le:..<verbatim>.
48d0: 0a 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56  .SELECT CREATE V
48e0: 49 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f  IRTUAL TABLE my_
48f0: 74 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74  table USING Virt
4900: 75 61 6c 46 64 6f 20 28 20 74 61 62 6c 65 5f 6e  ualFdo ( table_n
4910: 61 6d 65 20 29 3b 0d 0a 3c 2f 76 65 72 62 61 74  ame );..</verbat
4920: 69 6d 3e 0d 0a 53 75 70 70 6f 72 74 65 64 20 61  im>..Supported a
4930: 72 67 75 6d 65 6e 74 20 61 6e 64 20 69 74 73 20  rgument and its 
4940: 69 6e 74 65 72 70 72 65 74 61 74 69 6f 6e 3a 0d  interpretation:.
4950: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74 61  .<ul>..<li><b>ta
4960: 62 6c 65 5f 6e 61 6d 65 3c 2f 62 3e 20 28 3c 69  ble_name</b> (<i
4970: 3e 3c 62 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f 62  ><b>mandatory</b
4980: 3e 3c 2f 69 3e 29 3a 20 74 68 65 20 6e 61 6d 65  ></i>): the name
4990: 20 6f 66 20 74 68 65 20 54 61 62 6c 65 20 69 6e   of the Table in
49a0: 20 74 68 65 20 63 75 72 72 65 6e 74 20 44 61 74   the current Dat
49b0: 61 62 61 73 65 20 63 6f 6e 74 61 69 6e 69 6e 67  abase containing
49c0: 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 46 44 4f   one or more FDO
49d0: 20 47 65 6f 6d 65 74 72 79 20 43 6f 6c 75 6d 6e   Geometry Column
49e0: 73 20 74 6f 20 62 65 20 61 75 74 6f 6d 61 74 69  s to be automati
49f0: 63 61 6c 6c 79 20 74 72 61 6e 73 6c 61 74 65 64  cally translated
4a00: 20 74 6f 2f 66 72 6f 6d 20 53 70 61 74 69 61 4c   to/from SpatiaL
4a10: 69 74 65 27 73 20 6f 77 6e 20 6e 61 74 69 76 65  ite's own native
4a20: 20 62 69 6e 61 72 79 20 42 4c 4f 42 2d 66 6f 72   binary BLOB-for
4a30: 6d 61 74 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  mat.</li>..</ul>
4a40: 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 62 67 63  <br>..<table bgc
4a50: 6f 6c 6f 72 3d 22 23 66 66 66 66 64 30 22 20 63  olor="#ffffd0" c
4a60: 65 6c 6c 70 61 64 64 69 6e 67 3d 22 31 38 22 3e  ellpadding="18">
4a70: 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 62 3e 4e 6f 74  <tr><td>..<b>Not
4a80: 65 3c 2f 62 3e 3a 20 71 75 6f 74 69 6e 67 20 6f  e</b>: quoting o
4a90: 72 20 6e 6f 74 20 61 6e 79 20 54 65 78 74 20 53  r not any Text S
4aa0: 74 72 69 6e 67 20 77 68 65 6e 20 69 74 20 61 70  tring when it ap
4ab0: 70 65 61 72 73 20 61 73 20 61 20 56 69 72 74 75  pears as a Virtu
4ac0: 61 6c 20 54 61 62 6c 65 20 61 72 67 75 6d 65 6e  al Table argumen
4ad0: 74 20 68 61 73 20 61 62 73 6f 6c 75 74 65 6c 79  t has absolutely
4ae0: 20 6e 6f 20 65 66 66 65 63 74 2e 0d 0a 3c 76 65   no effect...<ve
4af0: 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20  rbatim>..SELECT 
4b00: 43 52 45 41 54 45 20 56 49 52 54 55 41 4c 20 54  CREATE VIRTUAL T
4b10: 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20 55 53  ABLE my_table US
4b20: 49 4e 47 20 56 69 72 74 75 61 6c 46 64 6f 28 20  ING VirtualFdo( 
4b30: 6d 79 5f 70 61 72 63 65 6c 73 20 29 3b 0d 0a 6f  my_parcels );..o
4b40: 72 0d 0a 53 45 4c 45 43 54 20 43 52 45 41 54 45  r..SELECT CREATE
4b50: 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 6d   VIRTUAL TABLE m
4b60: 79 5f 74 61 62 6c 65 20 55 53 49 4e 47 20 56 69  y_table USING Vi
4b70: 72 74 75 61 6c 46 64 6f 28 20 27 6d 79 5f 70 61  rtualFdo( 'my_pa
4b80: 72 63 65 6c 73 27 20 29 3b 0d 0a 3c 2f 76 65 72  rcels' );..</ver
4b90: 62 61 74 69 6d 3e 0d 0a 42 6f 74 68 20 6e 6f 74  batim>..Both not
4ba0: 61 74 69 6f 6e 73 20 77 69 6c 6c 20 70 72 6f 64  ations will prod
4bb0: 75 63 65 20 65 78 61 63 74 6c 79 20 74 68 65 20  uce exactly the 
4bc0: 73 61 6d 65 20 69 64 65 6e 74 69 63 61 6c 20 72  same identical r
4bd0: 65 73 75 6c 74 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74  esult...</td></t
4be0: 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e  r></table>..<br>
4bf0: 0d 0a 3c 74 61 62 6c 65 20 62 67 63 6f 6c 6f 72  ..<table bgcolor
4c00: 3d 22 23 64 30 66 66 64 30 22 20 63 65 6c 6c 70  ="#d0ffd0" cellp
4c10: 61 64 64 69 6e 67 3d 22 31 38 22 3e 3c 74 72 3e  adding="18"><tr>
4c20: 3c 74 64 3e 0d 0a 3c 68 33 3e 42 65 73 74 20 70  <td>..<h3>Best p
4c30: 72 61 63 74 69 63 65 73 20 61 6e 64 20 6b 6e 6f  ractices and kno
4c40: 77 6e 20 6c 69 6d 69 74 61 74 69 6f 6e 73 3c 2f  wn limitations</
4c50: 68 33 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 56  h3>..<ul>..<li>V
4c60: 69 72 74 75 61 6c 20 54 61 62 6c 65 73 20 61 72  irtual Tables ar
4c70: 65 20 6e 6f 74 20 72 65 61 6c 6c 79 20 67 65 6e  e not really gen
4c80: 75 69 6e 65 20 44 61 74 61 62 61 73 65 20 54 61  uine Database Ta
4c90: 62 6c 65 73 2c 20 74 68 65 79 20 61 72 65 20 6a  bles, they are j
4ca0: 75 73 74 20 70 72 65 74 65 6e 64 69 6e 67 20 74  ust pretending t
4cb0: 6f 20 62 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  o be.</li>..<li>
4cc0: 56 69 72 74 75 61 6c 20 54 61 62 6c 65 73 20 68  Virtual Tables h
4cd0: 61 76 65 20 76 65 72 79 20 70 6f 6f 72 20 73 70  ave very poor sp
4ce0: 65 65 64 20 70 65 72 66 6f 72 6d 61 6e 63 65 73  eed performances
4cf0: 20 77 68 65 6e 20 63 6f 6d 70 61 72 65 64 20 74   when compared t
4d00: 6f 20 67 65 6e 75 69 6e 65 20 44 61 74 61 62 61  o genuine Databa
4d10: 73 65 20 54 61 62 6c 65 73 2e 3c 2f 6c 69 3e 0d  se Tables.</li>.
4d20: 0a 3c 6c 69 3e 43 6f 6d 70 6c 65 78 20 53 51 4c  .<li>Complex SQL
4d30: 20 71 75 65 72 69 65 73 20 3c 62 3e 4a 4f 49 4e   queries <b>JOIN
4d40: 3c 2f 62 3e 69 6e 67 20 73 65 76 65 72 61 6c 20  </b>ing several 
4d50: 54 61 62 6c 65 73 20 63 61 6e 20 6f 66 74 65 6e  Tables can often
4d60: 20 72 65 74 75 72 6e 20 6f 64 64 20 61 6e 64 20   return odd and 
4d70: 6d 69 73 6c 65 61 64 69 6e 67 20 72 65 73 75 6c  misleading resul
4d80: 74 73 65 74 73 2c 20 69 66 20 6f 6e 65 20 6f 72  tsets, if one or
4d90: 20 6d 6f 72 65 20 6f 66 20 74 68 65 20 3c 62 3e   more of the <b>
4da0: 4a 4f 49 4e 3c 2f 62 3e 65 64 20 54 61 62 6c 65  JOIN</b>ed Table
4db0: 73 20 61 72 65 20 6f 66 20 74 68 65 20 56 69 72  s are of the Vir
4dc0: 74 75 61 6c 20 74 79 70 65 2e 3c 2f 6c 69 3e 0d  tual type.</li>.
4dd0: 0a 3c 6c 69 3e 54 68 65 20 62 65 73 74 20 75 73  .<li>The best us
4de0: 61 67 65 20 79 6f 75 20 63 61 6e 20 64 6f 20 6f  age you can do o
4df0: 66 20 61 20 56 69 72 74 75 61 6c 20 54 61 62 6c  f a Virtual Tabl
4e00: 65 20 69 73 20 74 6f 20 6a 75 73 74 20 73 75 70  e is to just sup
4e10: 70 6f 72 74 20 62 61 73 69 63 20 64 61 74 61 20  port basic data 
4e20: 69 6d 70 6f 72 74 20 70 72 6f 63 65 73 73 65 73  import processes
4e30: 2c 20 6f 72 20 74 6f 20 71 75 69 63 6b 6c 79 20  , or to quickly 
4e40: 67 65 74 20 61 6e 20 6f 76 65 72 61 6c 6c 20 67  get an overall g
4e50: 6c 61 6e 63 65 20 61 74 20 61 20 66 75 6c 6c 20  lance at a full 
4e60: 64 61 74 61 73 65 74 20 77 69 74 68 6f 75 74 20  dataset without 
4e70: 6e 65 63 65 73 73 61 72 69 6c 79 20 69 6d 70 6f  necessarily impo
4e80: 72 74 69 6e 67 20 69 74 20 69 6e 74 6f 20 74 68  rting it into th
4e90: 65 20 44 61 74 61 62 61 73 65 2e 3c 2f 6c 69 3e  e Database.</li>
4ea0: 0d 0a 3c 6c 69 3e 50 72 65 74 65 6e 64 69 6e 67  ..<li>Pretending
4eb0: 20 74 6f 20 75 73 65 20 61 20 56 69 72 74 75 61   to use a Virtua
4ec0: 6c 20 54 61 62 6c 65 20 61 73 20 61 20 66 75 6c  l Table as a ful
4ed0: 6c 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 6f 66  l replacement of
4ee0: 20 69 6d 70 6f 72 74 69 6e 67 20 61 6c 6c 20 64   importing all d
4ef0: 61 74 61 20 77 69 74 68 69 6e 20 61 20 67 65 6e  ata within a gen
4f00: 75 69 6e 65 20 44 61 74 61 62 61 73 65 20 54 61  uine Database Ta
4f10: 62 6c 65 20 69 73 20 73 74 72 6f 6e 67 6c 79 20  ble is strongly 
4f20: 64 69 73 63 6f 75 72 61 67 65 64 2c 20 61 6e 64  discouraged, and
4f30: 20 6e 65 76 65 72 20 69 73 20 61 20 73 6d 61 72   never is a smar
4f40: 74 20 69 64 65 61 2e 3c 2f 6c 69 3e 0d 0a 3c 2f  t idea.</li>..</
4f50: 75 6c 3e 3c 62 72 3e 0d 0a 3c 62 3e 4e 6f 74 65  ul><br>..<b>Note
4f60: 3c 2f 62 3e 3a 20 56 69 72 74 75 61 6c 46 44 4f  </b>: VirtualFDO
4f70: 20 54 61 62 6c 65 73 20 73 75 70 70 6f 72 74 20   Tables support 
4f80: 75 6e 72 65 73 74 72 69 63 74 65 64 20 3c 62 3e  unrestricted <b>
4f90: 52 45 41 44 2d 57 52 49 54 45 3c 2f 62 3e 20 6f  READ-WRITE</b> o
4fa0: 70 65 72 61 74 69 6f 6e 73 2c 20 74 68 69 73 20  perations, this 
4fb0: 69 6e 63 6c 75 64 69 6e 67 20 65 78 65 63 75 74  including execut
4fc0: 69 6e 67 20 3c 62 3e 49 4e 53 45 52 54 3c 2f 62  ing <b>INSERT</b
4fd0: 3e 2c 20 3c 62 3e 55 50 44 41 54 45 3c 2f 62 3e  >, <b>UPDATE</b>
4fe0: 20 61 6e 64 20 3c 62 3e 44 45 4c 45 54 45 3c 2f   and <b>DELETE</
4ff0: 62 3e 20 73 74 61 74 65 6d 65 6e 74 73 2e 3c 62  b> statements.<b
5000: 72 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f  r>..</td></tr></
5010: 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 68  table>..<br>..<h
5020: 72 3e 0d 0a 3c 68 31 3e 3c 61 20 69 64 3d 22 56  r>..<h1><a id="V
5030: 69 72 74 75 61 6c 47 50 4b 47 22 3e 56 69 72 74  irtualGPKG">Virt
5040: 75 61 6c 47 50 4b 47 3c 2f 61 3e 3c 2f 68 31 3e  ualGPKG</a></h1>
5050: 0d 0a 54 68 65 20 3c 62 3e 56 69 72 74 75 61 6c  ..The <b>Virtual
5060: 47 50 4b 47 3c 2f 62 3e 20 49 6e 74 65 72 66 61  GPKG</b> Interfa
5070: 63 65 20 61 6c 6c 6f 77 73 20 74 6f 20 64 69 72  ce allows to dir
5080: 65 63 74 6c 79 20 61 63 63 65 73 73 20 53 70 61  ectly access Spa
5090: 74 69 61 6c 20 54 61 62 6c 65 73 20 66 72 6f 6d  tial Tables from
50a0: 20 61 20 3c 62 3e 47 65 6f 50 61 63 6b 61 67 65   a <b>GeoPackage
50b0: 20 44 61 74 61 62 61 73 65 3c 2f 62 3e 20 65 78   Database</b> ex
50c0: 61 63 74 6c 79 20 61 73 20 69 66 20 77 61 73 20  actly as if was 
50d0: 61 20 53 70 61 74 69 61 4c 69 74 65 27 73 20 6f  a SpatiaLite's o
50e0: 77 6e 20 6e 61 74 69 76 65 20 44 61 74 61 62 61  wn native Databa
50f0: 73 65 2e 3c 62 72 3e 0d 0a 47 65 6f 50 61 63 6b  se.<br>..GeoPack
5100: 61 67 65 20 28 3c 69 3e 61 6b 61 3c 2f 69 3e 20  age (<i>aka</i> 
5110: 3c 62 3e 47 50 4b 47 3c 2f 62 3e 29 20 69 73 20  <b>GPKG</b>) is 
5120: 61 6e 20 61 6c 74 65 72 6e 61 74 69 76 65 20 53  an alternative S
5130: 70 61 74 69 61 6c 20 44 61 74 61 62 61 73 65 20  patial Database 
5140: 62 75 69 6c 74 20 6f 6e 20 74 68 65 20 74 6f 70  built on the top
5150: 20 6f 66 20 53 51 4c 69 74 65 3b 20 79 6f 75 20   of SQLite; you 
5160: 63 61 6e 20 65 76 65 6e 74 75 61 6c 6c 79 20 72  can eventually r
5170: 65 61 64 20 74 68 65 20 3c 61 20 68 72 65 66 3d  ead the <a href=
5180: 22 68 74 74 70 3a 2f 2f 77 77 77 2e 67 65 6f 70  "http://www.geop
5190: 61 63 6b 61 67 65 2e 6f 72 67 2f 67 75 69 64 61  ackage.org/guida
51a0: 6e 63 65 2f 67 65 74 74 69 6e 67 2d 73 74 61 72  nce/getting-star
51b0: 74 65 64 2e 68 74 6d 6c 22 3e 6f 66 66 69 63 69  ted.html">offici
51c0: 61 6c 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e  al specification
51d0: 3c 2f 61 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65  </a> for more de
51e0: 74 61 69 6c 73 2e 3c 62 72 3e 0d 0a 53 79 6e 74  tails.<br>..Synt
51f0: 61 78 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20  ax for creating 
5200: 61 20 56 69 72 74 75 61 6c 46 44 4f 20 54 61 62  a VirtualFDO Tab
5210: 6c 65 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d  le:..<verbatim>.
5220: 0a 53 45 4c 45 43 54 20 43 52 45 41 54 45 20 56  .SELECT CREATE V
5230: 49 52 54 55 41 4c 20 54 41 42 4c 45 20 6d 79 5f  IRTUAL TABLE my_
5240: 74 61 62 6c 65 20 55 53 49 4e 47 20 56 69 72 74  table USING Virt
5250: 75 61 6c 47 70 6b 67 20 28 20 74 61 62 6c 65 5f  ualGpkg ( table_
5260: 6e 61 6d 65 20 29 3b 0d 0a 3c 2f 76 65 72 62 61  name );..</verba
5270: 74 69 6d 3e 0d 0a 53 75 70 70 6f 72 74 65 64 20  tim>..Supported 
5280: 61 72 67 75 6d 65 6e 74 20 61 6e 64 20 69 74 73  argument and its
5290: 20 69 6e 74 65 72 70 72 65 74 61 74 69 6f 6e 3a   interpretation:
52a0: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74  ..<ul>..<li><b>t
52b0: 61 62 6c 65 5f 6e 61 6d 65 3c 2f 62 3e 20 28 3c  able_name</b> (<
52c0: 69 3e 3c 62 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f  i><b>mandatory</
52d0: 62 3e 3c 2f 69 3e 29 3a 20 74 68 65 20 6e 61 6d  b></i>): the nam
52e0: 65 20 6f 66 20 74 68 65 20 54 61 62 6c 65 20 69  e of the Table i
52f0: 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 44 61  n the current Da
5300: 74 61 62 61 73 65 20 63 6f 6e 74 61 69 6e 69 6e  tabase containin
5310: 67 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 47 50  g one or more GP
5320: 4b 47 20 47 65 6f 6d 65 74 72 79 20 43 6f 6c 75  KG Geometry Colu
5330: 6d 6e 73 20 74 6f 20 62 65 20 61 75 74 6f 6d 61  mns to be automa
5340: 74 69 63 61 6c 6c 79 20 74 72 61 6e 73 6c 61 74  tically translat
5350: 65 64 20 74 6f 2f 66 72 6f 6d 20 53 70 61 74 69  ed to/from Spati
5360: 61 4c 69 74 65 27 73 20 6f 77 6e 20 6e 61 74 69  aLite's own nati
5370: 76 65 20 62 69 6e 61 72 79 20 42 4c 4f 42 2d 66  ve binary BLOB-f
5380: 6f 72 6d 61 74 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75  ormat.</li>..</u
5390: 6c 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 62  l><br>..<table b
53a0: 67 63 6f 6c 6f 72 3d 22 23 66 66 66 66 64 30 22  gcolor="#ffffd0"
53b0: 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 31 38   cellpadding="18
53c0: 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 62 3e 4e  "><tr><td>..<b>N
53d0: 6f 74 65 3c 2f 62 3e 3a 20 71 75 6f 74 69 6e 67  ote</b>: quoting
53e0: 20 6f 72 20 6e 6f 74 20 61 6e 79 20 54 65 78 74   or not any Text
53f0: 20 53 74 72 69 6e 67 20 77 68 65 6e 20 69 74 20   String when it 
5400: 61 70 70 65 61 72 73 20 61 73 20 61 20 56 69 72  appears as a Vir
5410: 74 75 61 6c 20 54 61 62 6c 65 20 61 72 67 75 6d  tual Table argum
5420: 65 6e 74 20 68 61 73 20 61 62 73 6f 6c 75 74 65  ent has absolute
5430: 6c 79 20 6e 6f 20 65 66 66 65 63 74 2e 0d 0a 3c  ly no effect...<
5440: 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43  verbatim>..SELEC
5450: 54 20 43 52 45 41 54 45 20 56 49 52 54 55 41 4c  T CREATE VIRTUAL
5460: 20 54 41 42 4c 45 20 6d 79 5f 74 61 62 6c 65 20   TABLE my_table 
5470: 55 53 49 4e 47 20 56 69 72 74 75 61 6c 47 70 6b  USING VirtualGpk
5480: 73 28 20 6d 79 5f 70 61 72 63 65 6c 73 20 29 3b  s( my_parcels );
5490: 0d 0a 6f 72 0d 0a 53 45 4c 45 43 54 20 43 52 45  ..or..SELECT CRE
54a0: 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c  ATE VIRTUAL TABL
54b0: 45 20 6d 79 5f 74 61 62 6c 65 20 55 53 49 4e 47  E my_table USING
54c0: 20 56 69 72 74 75 61 6c 47 70 6b 67 28 20 27 6d   VirtualGpkg( 'm
54d0: 79 5f 70 61 72 63 65 6c 73 27 20 29 3b 0d 0a 3c  y_parcels' );..<
54e0: 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 42 6f 74 68  /verbatim>..Both
54f0: 20 6e 6f 74 61 74 69 6f 6e 73 20 77 69 6c 6c 20   notations will 
5500: 70 72 6f 64 75 63 65 20 65 78 61 63 74 6c 79 20  produce exactly 
5510: 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74 69 63  the same identic
5520: 61 6c 20 72 65 73 75 6c 74 2e 0d 0a 3c 2f 74 64  al result...</td
5530: 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a  ></tr></table>..
5540: 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 62 67 63  <br>..<table bgc
5550: 6f 6c 6f 72 3d 22 23 64 30 66 66 64 30 22 20 63  olor="#d0ffd0" c
5560: 65 6c 6c 70 61 64 64 69 6e 67 3d 22 31 38 22 3e  ellpadding="18">
5570: 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 42 65  <tr><td>..<h3>Be
5580: 73 74 20 70 72 61 63 74 69 63 65 73 20 61 6e 64  st practices and
5590: 20 6b 6e 6f 77 6e 20 6c 69 6d 69 74 61 74 69 6f   known limitatio
55a0: 6e 73 3c 2f 68 33 3e 0d 0a 3c 75 6c 3e 0d 0a 3c  ns</h3>..<ul>..<
55b0: 6c 69 3e 56 69 72 74 75 61 6c 20 54 61 62 6c 65  li>Virtual Table
55c0: 73 20 61 72 65 20 6e 6f 74 20 72 65 61 6c 6c 79  s are not really
55d0: 20 67 65 6e 75 69 6e 65 20 44 61 74 61 62 61 73   genuine Databas
55e0: 65 20 54 61 62 6c 65 73 2c 20 74 68 65 79 20 61  e Tables, they a
55f0: 72 65 20 6a 75 73 74 20 70 72 65 74 65 6e 64 69  re just pretendi
5600: 6e 67 20 74 6f 20 62 65 2e 3c 2f 6c 69 3e 0d 0a  ng to be.</li>..
5610: 3c 6c 69 3e 56 69 72 74 75 61 6c 20 54 61 62 6c  <li>Virtual Tabl
5620: 65 73 20 68 61 76 65 20 76 65 72 79 20 70 6f 6f  es have very poo
5630: 72 20 73 70 65 65 64 20 70 65 72 66 6f 72 6d 61  r speed performa
5640: 6e 63 65 73 20 77 68 65 6e 20 63 6f 6d 70 61 72  nces when compar
5650: 65 64 20 74 6f 20 67 65 6e 75 69 6e 65 20 44 61  ed to genuine Da
5660: 74 61 62 61 73 65 20 54 61 62 6c 65 73 2e 3c 2f  tabase Tables.</
5670: 6c 69 3e 0d 0a 3c 6c 69 3e 43 6f 6d 70 6c 65 78  li>..<li>Complex
5680: 20 53 51 4c 20 71 75 65 72 69 65 73 20 3c 62 3e   SQL queries <b>
5690: 4a 4f 49 4e 3c 2f 62 3e 69 6e 67 20 73 65 76 65  JOIN</b>ing seve
56a0: 72 61 6c 20 54 61 62 6c 65 73 20 63 61 6e 20 6f  ral Tables can o
56b0: 66 74 65 6e 20 72 65 74 75 72 6e 20 6f 64 64 20  ften return odd 
56c0: 61 6e 64 20 6d 69 73 6c 65 61 64 69 6e 67 20 72  and misleading r
56d0: 65 73 75 6c 74 73 65 74 73 2c 20 69 66 20 6f 6e  esultsets, if on
56e0: 65 20 6f 72 20 6d 6f 72 65 20 6f 66 20 74 68 65  e or more of the
56f0: 20 3c 62 3e 4a 4f 49 4e 3c 2f 62 3e 65 64 20 54   <b>JOIN</b>ed T
5700: 61 62 6c 65 73 20 61 72 65 20 6f 66 20 74 68 65  ables are of the
5710: 20 56 69 72 74 75 61 6c 20 74 79 70 65 2e 3c 2f   Virtual type.</
5720: 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 62 65 73  li>..<li>The bes
5730: 74 20 75 73 61 67 65 20 79 6f 75 20 63 61 6e 20  t usage you can 
5740: 64 6f 20 6f 66 20 61 20 56 69 72 74 75 61 6c 20  do of a Virtual 
5750: 54 61 62 6c 65 20 69 73 20 74 6f 20 6a 75 73 74  Table is to just
5760: 20 73 75 70 70 6f 72 74 20 62 61 73 69 63 20 64   support basic d
5770: 61 74 61 20 69 6d 70 6f 72 74 20 70 72 6f 63 65  ata import proce
5780: 73 73 65 73 2c 20 6f 72 20 74 6f 20 71 75 69 63  sses, or to quic
5790: 6b 6c 79 20 67 65 74 20 61 6e 20 6f 76 65 72 61  kly get an overa
57a0: 6c 6c 20 67 6c 61 6e 63 65 20 61 74 20 61 20 66  ll glance at a f
57b0: 75 6c 6c 20 64 61 74 61 73 65 74 20 77 69 74 68  ull dataset with
57c0: 6f 75 74 20 6e 65 63 65 73 73 61 72 69 6c 79 20  out necessarily 
57d0: 69 6d 70 6f 72 74 69 6e 67 20 69 74 20 69 6e 74  importing it int
57e0: 6f 20 74 68 65 20 44 61 74 61 62 61 73 65 2e 3c  o the Database.<
57f0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 72 65 74 65 6e  /li>..<li>Preten
5800: 64 69 6e 67 20 74 6f 20 75 73 65 20 61 20 56 69  ding to use a Vi
5810: 72 74 75 61 6c 20 54 61 62 6c 65 20 61 73 20 61  rtual Table as a
5820: 20 66 75 6c 6c 20 72 65 70 6c 61 63 65 6d 65 6e   full replacemen
5830: 74 20 6f 66 20 69 6d 70 6f 72 74 69 6e 67 20 61  t of importing a
5840: 6c 6c 20 64 61 74 61 20 77 69 74 68 69 6e 20 61  ll data within a
5850: 20 67 65 6e 75 69 6e 65 20 44 61 74 61 62 61 73   genuine Databas
5860: 65 20 54 61 62 6c 65 20 69 73 20 73 74 72 6f 6e  e Table is stron
5870: 67 6c 79 20 64 69 73 63 6f 75 72 61 67 65 64 2c  gly discouraged,
5880: 20 61 6e 64 20 6e 65 76 65 72 20 69 73 20 61 20   and never is a 
5890: 73 6d 61 72 74 20 69 64 65 61 2e 3c 2f 6c 69 3e  smart idea.</li>
58a0: 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 62 3e  ..</ul><br>..<b>
58b0: 4e 6f 74 65 3c 2f 62 3e 3a 20 56 69 72 74 75 61  Note</b>: Virtua
58c0: 6c 47 50 4b 47 20 54 61 62 6c 65 73 20 73 75 70  lGPKG Tables sup
58d0: 70 6f 72 74 20 75 6e 72 65 73 74 72 69 63 74 65  port unrestricte
58e0: 64 20 3c 62 3e 52 45 41 44 2d 57 52 49 54 45 3c  d <b>READ-WRITE<
58f0: 2f 62 3e 20 6f 70 65 72 61 74 69 6f 6e 73 2c 20  /b> operations, 
5900: 74 68 69 73 20 69 6e 63 6c 75 64 69 6e 67 20 65  this including e
5910: 78 65 63 75 74 69 6e 67 20 3c 62 3e 49 4e 53 45  xecuting <b>INSE
5920: 52 54 3c 2f 62 3e 2c 20 3c 62 3e 55 50 44 41 54  RT</b>, <b>UPDAT
5930: 45 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 44 45 4c  E</b> and <b>DEL
5940: 45 54 45 3c 2f 62 3e 20 73 74 61 74 65 6d 65 6e  ETE</b> statemen
5950: 74 73 2e 3c 62 72 3e 0d 0a 3c 2f 74 64 3e 3c 2f  ts.<br>..</td></
5960: 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62 72  tr></table>..<br
5970: 3e 0d 0a 3c 68 72 3e 0d 0a 3c 62 72 3e 0d 0a 3c  >..<hr>..<br>..<
5980: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f  a href="https://
5990: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
59a0: 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 61  fossil/libspatia
59b0: 6c 69 74 65 2f 68 6f 6d 65 22 3e 62 61 63 6b 20  lite/home">back 
59c0: 74 6f 20 6d 61 69 6e 20 70 61 67 65 3c 2f 61 3e  to main page</a>
59d0: 0a 5a 20 62 35 33 62 36 65 39 33 38 36 32 65 31  .Z b53b6e93862e1
59e0: 36 66 35 32 30 64 65 64 33 31 30 31 33 62 30 31  6f520ded31013b01
59f0: 61 34 64 0a                                      a4d.