# Sample

The sample prefix to a LOAD or SELECT statement is used for loading a random sample of records from the data source.

Syntax:

Sample p ( loadstatement | selectstatement )

Arguments:

Sample arguments

| Argument | Description |
| --- | --- |
| p | An arbitrary expression<br>which valuates to a number larger than 0 and lower or equal to 1. The<br>number indicates the probability for a given record to be read.<br><br>All records will be read but only some of them will be loaded into QlikView. |

Example:

`Sample 0.15 SQL  SELECT  * from Longtable;` `Sample(0.15) 
 LOAD * from Longtab.csv;`

Information note The parentheses are allowed but not required.

## Learn more

* [Load](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Load.htm)
* [Select](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Select.htm)