Changes between Version 6 and Version 7 of FAQVector
- Timestamp:
- Jan 23, 2009, 7:21:10 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FAQVector
v6 v7 118 118 }}} 119 119 120 == How to quote command parameters for GDAL/OGR utilities in Microsoft Windows CLI == 120 121 122 When working with Windows [http://en.wikipedia.org/wiki/Command_line_interface CLI], it's helpful to remember that quoting rules are different to those used on Unix. 123 Here is example of properly quoted SQL statement passed to [http://www.gdal.org/ogrinfo.html ogrinfo] (or [http://www.gdal.org/ogr2ogr.html ogr2ogr]) with ''-sql'' option: 124 {{{ 125 ogrinfo . -sql "SELECT * FROM 'B_Major Cities 1' WHERE FID = 49" 126 }}} 121 127 128 The whole SQL statement is wrapped with '''double quotes''', but not single quotes. 129 The name of table (here it works against ESRI Shapefile in current directory, note the dot) includes spaces, so it must be wrapped with single quotes. 130 131 For contrast, these two variants present ''incorrect'' command: 132 {{{ 133 ogrinfo . -sql 'SELECT * FROM 'B_Major Cities 1' WHERE FID = 49' 134 ogrinfo . -sql 'SELECT * FROM "B_Major Cities 1" WHERE FID = 49' 135 }}}