NoSQL: a non-SQL RDBMS
Recent Pages

Commands at a glance
edittable: trivial tabl ...
indextable: generate ta ...
NoSQL Utilities
Text Formatting Rules
Site SandBox
Change Management
Wiki Editor's How-To
Site Terms of Use
Site Copyright

Links

NoSQL Home
Table of Contents
Wiki Editor's How-To
Text Formatting Rules
Wiki SandBox

www.strozzi.it on Twitter


GeoURL

Google Ads

Please Support NoSQL !


Session

User ID
Password



Campaigns

stopsoftwarepatents.eu petition banner

Reading Data

The following shows some examples of how the system is usually used, which involves a combinations of operators. Using the table named 'sample.table' (see Table structure) the command:

 
       column NAME AMT TYP < sample.table | sorttable TYP | justify

gives the output:

 
                 NAME     AMT  TYP 
                 ------  ----  --- 
                 Bush     133  A 
                 Hansen    23  A 
                 Perry    244  B 
                 Hart    1111  D 
                 Holmes  1111  D 
                 Jones     77  X

Note that the column COUNT was excluded by the 'column' operator, and that the order of the selected columns was changed from that in the input table. To save the output in a file (redirection of STDOUT into a file), use something like the following:

 
       column ... < sample.table | sorttable TYP | justify > file.out

An example using the operator 'row' on the table 'sample.table' is:

 
       row 'AMT < 900' < sample.table | column NAME AMT TYP | 
             sorttable NAME | justify

Note how the row selection expression is surrounded by single quotes to prevent its interpretation by the shell. Here we select some rows using 'row,' select some columns using 'column,' sort what we have with 'sorttable,' and print with 'justify.' The output is:

 
                 NAME    AMT  TYP 
                 ------  ---  --- 
                 Bush    133  A 
                 Hansen   23  A 
                 Jones    77  X 
                 Perry   244  B

Trackbacks (1) | New trackback | Comments (0) | Print

This Web Site is Copyright © 2007,2008,2009,2010 Carlo Strozzi, Some Rights Reserved
site map | recent changes | terms of use