**fScan Reference Manual, Chapter 2 (CmdLineOptions): table_query** ===== Table query -- Performing a table query===== **Usage:** -table query TBLNAME FLAG NEWNAME COL [VALUE1] [VALUE2]\\ NEWNAME is where to store the results if FLAG & 3, or if NEWNAME is not a column name in TBLNAME. COL can be a column index number (1-NCols) or a column name. (To find column index from column name, use FLAG 16.) VALUE1 is the value to search for in COL, or if FLAG&4 VALUE1 is the index number (1-NRows) of the row to return. Note: you can also find the value for a single table cell using the syntax "$tblname(col,row)" where COL and ROW indices, 1-NCols and 1-NRows, respectively.\\ If VALUE1 is omitted and !FLAG&24, all of COL is returned. VALUE2: if FLAG&64, VALUE2 is a binary mask value ANDed with COL values before comparison to VALUE1; otherwise VALUE2 is the column number whose value(s) should be returned when COL matches VALUE1. If VALUE2 is omitted and !FLAG&24, whole matching rows are returned. FLAG: Option flags (combine by adding):\\ * 1 - store into uservarb NEWNAME\\ * 2 - store into table NEWNAME\\ * 4 - VALUE1 is a row number\\ * 8 - only return row number(s)\\ * 16 - only return column number\\ * 32 - only find first instance\\ * 64 - VALUE2 is a binary mask to use for COL value\\ * 128 - inverse query; search for COL values that don't match; this is automatic if VALUE1 is preceded by '!'\\ * 256 - don't display error message on query failure\\ * 512 - find COL with missing value (assumed if VALUE1 = 'NULL')\\ * 1024 - do not convert 'NULL' in VALUE1 to missing value\\ **See Also:**\\ [[jvs:fscan:manual:chapter2:table|Table]], [[jvs:fscan:manual:chapter2:browse|Browse]] [[jvs:fscan|fScan Home]], [[jvs:fscan:manual|fScan Manual]], [[jvs:fscan:manual:chapter2|CmdLineOptions]], [[jvs:fscan:manual:help|Manual Help]]