Every result grid in SQL DATA LENS can be exported, not just the one in the SQL editor. Wherever a grid appears — a query result, a table in the Table Viewer, a management view — the same export options apply.
Supported formats
- Text files (CSV)
- XML
- HTML
- SQL (
INSERT,UPDATE, orDELETEfollowed byINSERT) - JSON
- Excel (XLS and XLSX)
Save result
Right-click in any result table and choose Save result. The data in the grid is written to disk in the format you pick.
The dialogue that follows exposes the export parameters, so the output matches whatever is going to read it next: delimiter and quoting for CSV, encoding, whether to include a header row, how NULL is written, and for the SQL format which statement type to generate.
Large result sets: use direct to file
Save result exports what the grid holds, which means the rows have to be fetched into the grid first. For a large export, use the direct to file feature instead: rows are streamed from the result set to the file as they arrive, so memory use stays flat regardless of how many rows there are.
As a rule of thumb, use Save result for anything you were going to look at anyway, and direct to file for a full-table extract or a scheduled hand-off. Direct to file also keeps going when a value cannot be read, rather than abandoning the export part-way through — useful on legacy data where a few cells do not match their metadata, as described in detecting metadata inconsistencies.
Exports work the same way against non-IRIS connections — see beyond IRIS. The user’s guide has the full parameter reference.