odbc - provide ODBC-based database access |
odbc [-v] [-R RS] [-F FS] [-h] DRVC stmt |
Odbc prints the results of an SQL select command run on any database for which an appropriate data source has been defined. Two arguments must always be specified as part of the odbc invocation: the data source driver connection string, and an SQL select statement. All data types are currently output as text according to the default driver-supplied data conversions. By default fields are separated by the tab character and records by a newline. The select statement specified must conform to the syntax and conventions used by the database being accessed. The driver connection string can either specify a
registered data source driver name, as in: |
-R RS |
Specify the record separator used to delimit records on output. The default record separator is a newline. |
||
-F FS |
Specify the field separator used to delimit fields on output. The default field separator is a tab. |
||
-h |
The first line of the output will contain the name of each database field. |
mail ‘odbc DSN=userDB "select email from
users"‘ <message |
D. Spinellis. Outwit: Unix tool-based programming meets
the Windows world. In USENIX 2000 Technical Conference
Proceedings, San Diego, CA, USA, June 2000, USENIX
Association. |
(C) Copyright 1999-2003 Diomidis Spinellis. All rights reserved. Permission to use, copy, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. THIS SOFTWARE IS PROVIDED ‘‘AS IS’’ AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
The presentation of results in textual format depends on the implementation of the ODBC driver. |