Unpack Function | Teradata Vantage - Unpack - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢

The Unpack function unpacks data from a single packed column into multiple columns. The packed column is composed of multiple virtual columns, which become the output columns. To determine the virtual columns, the function must have either the delimiter that separates them in the packed column or their lengths.

Use the Unpack function to unpack data from a source column into multiple target columns. It is commonly used to separate a single column of data into multiple columns based on a specific delimiter or separator. The Unpack function complements the Pack function, but you can use it on any packed column that meets the input requirements.

For example, if you have a column containing a full name, you can use unpack function to parse the name into separate columns for first name and last name.

You can also use the Unpack function to extract specific characters or substrings from a column based on a particular position or length. This is useful when working with data that is stored in a fixed-width format.The Unpack function is a tool for manipulating and extracting data. Its flexibility and ease of use make it a valuable tool for data analysts and database administrators.