The contents of a named clipboard can be saved in XML or JSON format to a file using the syntax:
```
local save results clipboard <NAME> to "<FILENAME>" format (xml|json) [compression level <DIGIT>]
```
# Examples
The following samples runs a query, then memorizes the result and save them in XML and JSON format to disk (respectively uncompressed and compressed):
```
select sysdateutc
local memorize results clipboard DATA
local save results clipboard DATA to "c:\temp\data.json" format json
local save results clipboard DATA to "c:\temp\data.xml.gz" format xml compression level 9
```
The contents of `data.xml` are:
```xml
<?xml version="1.0" encoding="utf-16"?>
<!--
...
(C) Copyright 2004-2026 Invantive Software B.V., the Netherlands. All rights reserved.
...
Result set.
-->
<ResultSet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fields>
<EntityField>
<Id>0</Id>
<Name>SYSDATEUTC</Name>
<DotnetDataType>datetime</DotnetDataType>
<DatabaseDataType>datetime</DatabaseDataType>
<MaxLength xsi:nil="true" />
<FetchByDefault>true</FetchByDefault>
<DisplayControl>datetime</DisplayControl>
<Precision xsi:nil="true" />
<Scale xsi:nil="true" />
<Nullable>false</Nullable>
<DisplayLengthAverage xsi:nil="true" />
<DisplayLengthSD xsi:nil="true" />
<DerivedValue>false</DerivedValue>
<UserChangeable>false</UserChangeable>
<InfluencesInsert>false</InfluencesInsert>
<PresenceRequiredOnUpdate>false</PresenceRequiredOnUpdate>
<CheckSpelling>false</CheckSpelling>
<CanFilterServerSide>false</CanFilterServerSide>
<CanFilterServerSideLessThan xsi:nil="true" />
<CanFilterServerSideLessThanOrEqual xsi:nil="true" />
<CanFilterServerSideGreaterThan xsi:nil="true" />
<CanFilterServerSideGreaterThanOrEqual xsi:nil="true" />
<CanFilterServerSideEquals xsi:nil="true" />
<CanFilterServerSideNotEquals xsi:nil="true" />
<CanFilterServerSideContains xsi:nil="true" />
<CanFilterServerSideAdjacentTerms xsi:nil="true" />
<CanFilterServerSideAllTerms xsi:nil="true" />
<CanFilterServerSideAnyTerm xsi:nil="true" />
<CanScanServerSide xsi:nil="true" />
<CanSortServerSide xsi:nil="true" />
<DisplayInFilter>false</DisplayInFilter>
<DisplayInLOV>false</DisplayInLOV>
<DisplayInRecord>false</DisplayInRecord>
<DisplayInResults>false</DisplayInResults>
<DisplayOrder xsi:nil="true" />
<MinimumLength>0</MinimumLength>
<MinimumLengthPadding>None</MinimumLengthPadding>
</EntityField>
</Fields>
<Data>
<ArrayOfAnyType>
<anyType xsi:type="xsd:dateTime">2026-04-28T13:32:55.3948031Z</anyType>
</ArrayOfAnyType>
</Data>
<OriginCode>itgencmr574</OriginCode>
<AuditInformation>
<Id>d9fb302b-57ab-46cd-b494-1d397d67bb15</Id>
<ActionConnectionFullName>Various - Dummy</ActionConnectionFullName>
<ActiveConnectionProviderName>Invantive SQL 25.0.205-PROD+5751</ActiveConnectionProviderName>
<UserInformation>
<FullName />
<CompanyFullTimeEmployees xsi:nil="true" />
<CompanyDateEstablished xsi:nil="true" />
<LastLogon xsi:nil="true" />
</UserInformation>
<SqlExecutionSteps>
<Children>
<Children>
<Children>
<Children>
<Children>
<Id>6</Id>
<ParentId>5</ParentId>
<Depth>6</Depth>
<Description>Data container I/O on '' ()</Description>
<EndedUtc>2026-04-28T13:32:55.4229336Z</EndedUtc>
<RowsIn>1</RowsIn>
<RowsOut>1</RowsOut>
<BytesIn>0</BytesIn>
<BytesOut>0</BytesOut>
<ColumnsIn>0</ColumnsIn>
<ColumnsOut>0</ColumnsOut>
<ApiCallsActual>0</ApiCallsActual>
<ApiCallsFromMemoryCache>0</ApiCallsFromMemoryCache>
<ApiCallsFromDiskCache>0</ApiCallsFromDiskCache>
<ApiRowsActual>0</ApiRowsActual>
<ApiRowsFromMemoryCache>0</ApiRowsFromMemoryCache>
<ApiRowsFromDiskCache>0</ApiRowsFromDiskCache>
<StartedUtc>2026-04-28T13:32:55.4124164Z</StartedUtc>
<ManagedThreadId>25</ManagedThreadId>
<TaskId xsi:nil="true" />
<ExecutionOptionsId>f092973f-47ae-4dc9-bf2c-4edd0a9173aa</ExecutionOptionsId>
<DurationCpuMs>10</DurationCpuMs>
<DurationIoMs>0</DurationIoMs>
<DurationSleepMs>0</DurationSleepMs>
<StepDurationClockMs>10</StepDurationClockMs>
<StepDurationCpuMs>10</StepDurationCpuMs>
<StepDurationIoMs>0</StepDurationIoMs>
<StepDurationSleepMs>0</StepDurationSleepMs>
<Sleeps />
</Children>
<Id>5</Id>
<ParentId>4</ParentId>
<Depth>5</Depth>
<Description>Data container low-cost I/O on ''</Description>
<EndedUtc>2026-04-28T13:32:55.4249404Z</EndedUtc>
<RowsIn>1</RowsIn>
<RowsOut>1</RowsOut>
<BytesIn>0</BytesIn>
<BytesOut>0</BytesOut>
<ColumnsIn>0</ColumnsIn>
<ColumnsOut>0</ColumnsOut>
<ApiCallsActual>0</ApiCallsActual>
<ApiCallsFromMemoryCache>0</ApiCallsFromMemoryCache>
<ApiCallsFromDiskCache>0</ApiCallsFromDiskCache>
<ApiRowsActual>0</ApiRowsActual>
<ApiRowsFromMemoryCache>0</ApiRowsFromMemoryCache>
<ApiRowsFromDiskCache>0</ApiRowsFromDiskCache>
<StartedUtc>2026-04-28T13:32:55.4124164Z</StartedUtc>
<ManagedThreadId>25</ManagedThreadId>
<TaskId xsi:nil="true" />
<ExecutionOptionsId>f092973f-47ae-4dc9-bf2c-4edd0a9173aa</ExecutionOptionsId>
<DurationCpuMs>12</DurationCpuMs>
<DurationIoMs>0</DurationIoMs>
<DurationSleepMs>0</DurationSleepMs>
<StepDurationClockMs>12</StepDurationClockMs>
<StepDurationCpuMs>2</StepDurationCpuMs>
<StepDurationIoMs>0</StepDurationIoMs>
<StepDurationSleepMs>0</StepDurationSleepMs>
<Sleeps />
</Children>
<Id>4</Id>
<ParentId>3</ParentId>
<Depth>4</Depth>
<Description>Column chaining into wider list</Description>
<EndedUtc>2026-04-28T13:32:55.4249404Z</EndedUtc>
<RowsIn>1</RowsIn>
<RowsOut>1</RowsOut>
<BytesIn>80</BytesIn>
<BytesOut>80</BytesOut>
<ColumnsIn>1</ColumnsIn>
<ColumnsOut>1</ColumnsOut>
<ApiCallsActual>0</ApiCallsActual>
<ApiCallsFromMemoryCache>0</ApiCallsFromMemoryCache>
<ApiCallsFromDiskCache>0</ApiCallsFromDiskCache>
<ApiRowsActual>0</ApiRowsActual>
<ApiRowsFromMemoryCache>0</ApiRowsFromMemoryCache>
<ApiRowsFromDiskCache>0</ApiRowsFromDiskCache>
<StartedUtc>2026-04-28T13:32:55.4124164Z</StartedUtc>
<ManagedThreadId>25</ManagedThreadId>
<TaskId xsi:nil="true" />
<ExecutionOptionsId>f092973f-47ae-4dc9-bf2c-4edd0a9173aa</ExecutionOptionsId>
<DurationCpuMs>12</DurationCpuMs>
<DurationIoMs>0</DurationIoMs>
<DurationSleepMs>0</DurationSleepMs>
<StepDurationClockMs>12</StepDurationClockMs>
<StepDurationCpuMs>0</StepDurationCpuMs>
<StepDurationIoMs>0</StepDurationIoMs>
<StepDurationSleepMs>0</StepDurationSleepMs>
<Sleeps />
</Children>
<Id>3</Id>
<ParentId>2</ParentId>
<Depth>3</Depth>
<Parameters>1 columns</Parameters>
<Description>Select columns</Description>
<EndedUtc>2026-04-28T13:32:55.4249404Z</EndedUtc>
<RowsIn>1</RowsIn>
<RowsOut>1</RowsOut>
<BytesIn>80</BytesIn>
<BytesOut>80</BytesOut>
<ColumnsIn>1</ColumnsIn>
<ColumnsOut>1</ColumnsOut>
<ApiCallsActual>0</ApiCallsActual>
<ApiCallsFromMemoryCache>0</ApiCallsFromMemoryCache>
<ApiCallsFromDiskCache>0</ApiCallsFromDiskCache>
<ApiRowsActual>0</ApiRowsActual>
<ApiRowsFromMemoryCache>0</ApiRowsFromMemoryCache>
<ApiRowsFromDiskCache>0</ApiRowsFromDiskCache>
<StartedUtc>2026-04-28T13:32:55.4124164Z</StartedUtc>
<ManagedThreadId>25</ManagedThreadId>
<TaskId xsi:nil="true" />
<ExecutionOptionsId>f092973f-47ae-4dc9-bf2c-4edd0a9173aa</ExecutionOptionsId>
<DurationCpuMs>12</DurationCpuMs>
<DurationIoMs>0</DurationIoMs>
<DurationSleepMs>0</DurationSleepMs>
<StepDurationClockMs>12</StepDurationClockMs>
<StepDurationCpuMs>0</StepDurationCpuMs>
<StepDurationIoMs>0</StepDurationIoMs>
<StepDurationSleepMs>0</StepDurationSleepMs>
<Sleeps />
</Children>
<Id>2</Id>
<ParentId>1</ParentId>
<Depth>2</Depth>
<Description>Data container low-cost I/O on ''</Description>
<EndedUtc>2026-04-28T13:32:55.4249404Z</EndedUtc>
<RowsIn>1</RowsIn>
<RowsOut>1</RowsOut>
<BytesIn>80</BytesIn>
<BytesOut>80</BytesOut>
<ColumnsIn>1</ColumnsIn>
<ColumnsOut>1</ColumnsOut>
<ApiCallsActual>0</ApiCallsActual>
<ApiCallsFromMemoryCache>0</ApiCallsFromMemoryCache>
<ApiCallsFromDiskCache>0</ApiCallsFromDiskCache>
<ApiRowsActual>0</ApiRowsActual>
<ApiRowsFromMemoryCache>0</ApiRowsFromMemoryCache>
<ApiRowsFromDiskCache>0</ApiRowsFromDiskCache>
<StartedUtc>2026-04-28T13:32:55.4094042Z</StartedUtc>
<ManagedThreadId>25</ManagedThreadId>
<TaskId xsi:nil="true" />
<ExecutionOptionsId>f092973f-47ae-4dc9-bf2c-4edd0a9173aa</ExecutionOptionsId>
<DurationCpuMs>15</DurationCpuMs>
<DurationIoMs>0</DurationIoMs>
<DurationSleepMs>0</DurationSleepMs>
<StepDurationClockMs>15</StepDurationClockMs>
<StepDurationCpuMs>3</StepDurationCpuMs>
<StepDurationIoMs>0</StepDurationIoMs>
<StepDurationSleepMs>0</StepDurationSleepMs>
<Sleeps />
</Children>
<Id>1</Id>
<ParentId xsi:nil="true" />
<Depth>1</Depth>
<Parameters>select sysdateutc</Parameters>
<Description>Root</Description>
<EndedUtc>2026-04-28T13:32:55.4339479Z</EndedUtc>
<RowsIn xsi:nil="true" />
<RowsOut xsi:nil="true" />
<BytesIn xsi:nil="true" />
<BytesOut xsi:nil="true" />
<ColumnsIn xsi:nil="true" />
<ColumnsOut xsi:nil="true" />
<ApiCallsActual>0</ApiCallsActual>
<ApiCallsFromMemoryCache>0</ApiCallsFromMemoryCache>
<ApiCallsFromDiskCache>0</ApiCallsFromDiskCache>
<ApiRowsActual>0</ApiRowsActual>
<ApiRowsFromMemoryCache>0</ApiRowsFromMemoryCache>
<ApiRowsFromDiskCache>0</ApiRowsFromDiskCache>
<StartedUtc>2026-04-28T13:32:55.3897742Z</StartedUtc>
<ManagedThreadId>25</ManagedThreadId>
<TaskId xsi:nil="true" />
<ExecutionOptionsId>f092973f-47ae-4dc9-bf2c-4edd0a9173aa</ExecutionOptionsId>
<DurationCpuMs>44</DurationCpuMs>
<DurationIoMs>0</DurationIoMs>
<DurationSleepMs>0</DurationSleepMs>
<StepDurationClockMs>44</StepDurationClockMs>
<StepDurationCpuMs>29</StepDurationCpuMs>
<StepDurationIoMs>0</StepDurationIoMs>
<StepDurationSleepMs>0</StepDurationSleepMs>
<Sleeps />
</SqlExecutionSteps>
<DataContainerId />
<SqlStatement>select sysdateutc</SqlStatement>
<CreationDateTime>2026-04-28T13:32:55.4054124Z</CreationDateTime>
<SessionStartDateTime>2026-04-28T13:32:29.1422846Z</SessionStartDateTime>
<SessionId>6E2E61B162292E1C35F31D3FAB908DE6</SessionId>
<Show xsi:nil="true" />
<RowCount>1</RowCount>
<FillBufferGetBytes xsi:nil="true" />
<FillDiskReadBytes xsi:nil="true" />
<FillCpuTimeMs xsi:nil="true" />
<GuiExternalIpV6Address>1.2.3.4</GuiExternalIpV6Address>
<GuiExternalIpV6Port xsi:nil="true" />
<StartFetchUtc>2026-04-28T13:32:55.3882592Z</StartFetchUtc>
<EndFetchUtc>2026-04-28T13:32:55.4269402Z</EndFetchUtc>
<FillElapsedTimeMs>38</FillElapsedTimeMs>
<ManagedThreadId>25</ManagedThreadId>
<TaskId xsi:nil="true" />
</AuditInformation>
</ResultSet>
```
The contents in JSON format are:
```json
{
"MetadataType": "Invantive.Data.ResultSet",
"OriginCode": "itgencmr574",
"AuditInformation": {
"Id": "d9fb302b-57ab-46cd-b494-1d397d67bb15",
"ActionDatabaseFullName": "Various - Dummy",
"ActiveDataContainerProviderName": "Invantive SQL 25.0.205-PROD+5751",
"UserInformation": {
"MetadataType": "Invantive.Basics.UserInformation",
"FullName": ""
},
"SqlExecutionSteps": [
{
"MetadataType": "Invantive.Basics.SqlExecutionStep",
"TotalRowsIn": 5,
"TotalRowsOut": 5,
"TotalBytesIn": 240,
"TotalBytesOut": 240,
"Id": 1,
"Depth": 1,
"ManagedThreadId": 25,
"ExecutionOptionsId": "f092973f-47ae-4dc9-bf2c-4edd0a9173aa",
"Description": "Root",
"StartedUtc": "2026-04-28T13:32:55.3897742Z",
"EndedUtc": "2026-04-28T13:32:55.4339479Z",
"DurationMs": 44,
"DurationTicks": 441737,
"DurationCpuMs": 44,
"DurationIoMs": 0,
"DurationSleepMs": 0,
"StepDurationClockMs": 44,
"StepDurationCpuMs": 29,
"StepDurationIoMs": 0,
"StepDurationSleepMs": 0,
"Parameters": "select sysdateutc",
"LoggedSessionIOs": [],
"Sleeps": [],
"Children": [
{
"MetadataType": "Invantive.Basics.SqlExecutionStep",
"TotalRowsIn": 4,
"TotalRowsOut": 4,
"TotalBytesIn": 160,
"TotalBytesOut": 160,
"Id": 2,
"ParentId": 1,
"Depth": 2,
"ManagedThreadId": 25,
"ExecutionOptionsId": "f092973f-47ae-4dc9-bf2c-4edd0a9173aa",
"Description": "Data container low-cost I/O on ''",
"StartedUtc": "2026-04-28T13:32:55.4094042Z",
"EndedUtc": "2026-04-28T13:32:55.4249404Z",
"RowsIn": 1,
"RowsOut": 1,
"BytesIn": 80,
"BytesOut": 80,
"ColumnsIn": 1,
"ColumnsOut": 1,
"DurationMs": 15,
"DurationTicks": 155362,
"DurationCpuMs": 15,
"DurationIoMs": 0,
"DurationSleepMs": 0,
"StepDurationClockMs": 15,
"StepDurationCpuMs": 3,
"StepDurationIoMs": 0,
"StepDurationSleepMs": 0,
"LoggedSessionIOs": [],
"Sleeps": [],
"Children": [
{
"MetadataType": "Invantive.Basics.SqlExecutionStep",
"TotalRowsIn": 3,
"TotalRowsOut": 3,
"TotalBytesIn": 80,
"TotalBytesOut": 80,
"Id": 3,
"ParentId": 2,
"Depth": 3,
"ManagedThreadId": 25,
"ExecutionOptionsId": "f092973f-47ae-4dc9-bf2c-4edd0a9173aa",
"Description": "Select columns",
"StartedUtc": "2026-04-28T13:32:55.4124164Z",
"EndedUtc": "2026-04-28T13:32:55.4249404Z",
"RowsIn": 1,
"RowsOut": 1,
"BytesIn": 80,
"BytesOut": 80,
"ColumnsIn": 1,
"ColumnsOut": 1,
"DurationMs": 12,
"DurationTicks": 125240,
"DurationCpuMs": 12,
"DurationIoMs": 0,
"DurationSleepMs": 0,
"StepDurationClockMs": 12,
"StepDurationCpuMs": 0,
"StepDurationIoMs": 0,
"StepDurationSleepMs": 0,
"Parameters": "1 columns",
"LoggedSessionIOs": [],
"Sleeps": [],
"Children": [
{
"MetadataType": "Invantive.Basics.SqlExecutionStep",
"TotalRowsIn": 2,
"TotalRowsOut": 2,
"Id": 4,
"ParentId": 3,
"Depth": 4,
"ManagedThreadId": 25,
"ExecutionOptionsId": "f092973f-47ae-4dc9-bf2c-4edd0a9173aa",
"Description": "Column chaining into wider list",
"StartedUtc": "2026-04-28T13:32:55.4124164Z",
"EndedUtc": "2026-04-28T13:32:55.4249404Z",
"RowsIn": 1,
"RowsOut": 1,
"BytesIn": 80,
"BytesOut": 80,
"ColumnsIn": 1,
"ColumnsOut": 1,
"DurationMs": 12,
"DurationTicks": 125240,
"DurationCpuMs": 12,
"DurationIoMs": 0,
"DurationSleepMs": 0,
"StepDurationClockMs": 12,
"StepDurationCpuMs": 0,
"StepDurationIoMs": 0,
"StepDurationSleepMs": 0,
"LoggedSessionIOs": [],
"Sleeps": [],
"Children": [
{
"MetadataType": "Invantive.Basics.SqlExecutionStep",
"TotalRowsIn": 1,
"TotalRowsOut": 1,
"Id": 5,
"ParentId": 4,
"Depth": 5,
"ManagedThreadId": 25,
"ExecutionOptionsId": "f092973f-47ae-4dc9-bf2c-4edd0a9173aa",
"Description": "Data container low-cost I/O on ''",
"StartedUtc": "2026-04-28T13:32:55.4124164Z",
"EndedUtc": "2026-04-28T13:32:55.4249404Z",
"RowsIn": 1,
"RowsOut": 1,
"BytesIn": 0,
"BytesOut": 0,
"ColumnsIn": 0,
"ColumnsOut": 0,
"DurationMs": 12,
"DurationTicks": 125240,
"DurationCpuMs": 12,
"DurationIoMs": 0,
"DurationSleepMs": 0,
"StepDurationClockMs": 12,
"StepDurationCpuMs": 2,
"StepDurationIoMs": 0,
"StepDurationSleepMs": 0,
"LoggedSessionIOs": [],
"Sleeps": [],
"Children": [
{
"MetadataType": "Invantive.Basics.SqlExecutionStep",
"Id": 6,
"ParentId": 5,
"Depth": 6,
"ManagedThreadId": 25,
"ExecutionOptionsId": "f092973f-47ae-4dc9-bf2c-4edd0a9173aa",
"Description": "Data container I/O on '' ()",
"StartedUtc": "2026-04-28T13:32:55.4124164Z",
"EndedUtc": "2026-04-28T13:32:55.4229336Z",
"RowsIn": 1,
"RowsOut": 1,
"BytesIn": 0,
"BytesOut": 0,
"ColumnsIn": 0,
"ColumnsOut": 0,
"DurationMs": 10,
"DurationTicks": 105172,
"DurationCpuMs": 10,
"DurationIoMs": 0,
"DurationSleepMs": 0,
"StepDurationClockMs": 10,
"StepDurationCpuMs": 10,
"StepDurationIoMs": 0,
"StepDurationSleepMs": 0,
"LoggedSessionIOs": [],
"Sleeps": [],
"Children": []
}
]
}
]
}
]
}
]
}
]
}
],
"DataContainerId": "",
"SqlStatement": "select sysdateutc",
"CreationDateTimeUtc": "2026-04-28T13:32:55.4054124Z",
"SessionStartDateTimeUtc": "2026-04-28T13:32:29.1422846Z",
"SessionId": "6E2E61B162292E1C35F31D3FAB908DE6",
"RowCount": 1,
"GuiExternalIpV6Address": "1.2.3.4",
"StartFetchUtc": "2026-04-28T13:32:55.3882592Z",
"EndFetchUtc": "2026-04-28T13:32:55.4269402Z",
"FillElapsedTimeMs": 38,
"ManagedThreadId": 25
},
"Fields": [
{
"MetadataType": "Invantive.Data.DatabaseColumn",
"FetchByDefault": true,
"Name": "SYSDATEUTC",
"DotnetDataType": "datetime",
"Nullable": false,
"DatabaseDataType": "datetime",
"MostUnqualifiedName": "SYSDATEUTC",
"DisplayControl": "datetime"
}
],
"Data": [
[
"2026-04-28T13:32:55.3948031Z"
]
]
}
```