---
title: "Working with Documents"
description: "A platform which holds attachments, scans or images returns them as a column like any other, of a binary type."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-query-tool/working-with-documents
original: https://documentation.invantive.eu/en/docs/invantive-query-tool/working-with-documents
updated: 2026-09-04T00:00:00Z
license: https://documentation.invantive.eu/en/
---

A platform which holds attachments, scans or images returns them as a column like any other, of a binary type. The grid shows such a column as its size rather than as its contents, and what is done with it is decided in the statement.

## Reading One
A binary column is selected as any other column is. The [[Invantive Query Tool/Sample Database|sample database]] has `DmsDocuments@dummy` for exactly this purpose, so the shape of such a statement can be tried without a platform.

Writing the contents to a file is the work of [[Invantive Script/Invantive Script|Invantive Script]], which has the statements for it, or of the `Os` driver of [[Invantive Query Tool/Built-in Drivers|Built-in Drivers]]. Neither needs a program around it: a statement which reads the documents of a platform and writes them into a folder is a script of a few lines.

## What It Costs
A document is bytes, and bytes travel. A statement which selects a binary column over a thousand rows moves those thousand documents whether or not anything is done with them, which the [[Invantive Query Tool/Connection Monitor|Connection Monitor]] reports under "Bytes Received".

Two habits follow:

- leave the binary column out of the statement while the rest of it is being written, and add it once the `where` is right;
- fetch the documents in a run of their own rather than as part of a report which is looked at every morning.

## Uploading
Where a platform accepts documents, they are inserted as a binary value like any other column; see [[Invantive Query Tool/Changing Data|Changing Data]] for what an insert against a cloud platform costs and why a large upload is planned rather than started.

## Where the Types Are Documented
Which types are binary, how they convert and which functions apply to them is documented under [[Invantive UniversalSQL/General/SQL Data Type|SQL Data Type]].

## Release Notes

- [Invantive Query Tool for Windows](/en/release-notes/products/invantive-query-tool)
  - [26.0 to 27.0](/en/release-notes/products/invantive-query-tool?step=26.0-to-27.0)
  - [25.0 to 26.0](/en/release-notes/products/invantive-query-tool?step=25.0-to-26.0)

