# columns with the same values

**URL:** <https://forum.kx.com/t/columns-with-the-same-values/7991>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [November 8, 2012, 8:20am UTC](https://forum.kx.com/t/columns-with-the-same-values/7991 "2012-11-08T08:20:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![finmayer](https://avatars.discourse-cdn.com/v4/letter/f/a9adbd/32.png) [@finmayer](https://forum.kx.com/u/finmayer)\
**Post date:** [November 8, 2012, 8:20am UTC](https://forum.kx.com/t/columns-with-the-same-values/7991/1 "2012-11-08T08:20:00Z")

</div>

My table has the following data:

date &nbsp; &nbsp; &nbsp; | color

2012.11.06 | light green

2012.11.06 | light green \<- in any single date color is the same

…

2012.11.06 | light green

2012.11.07 | green

2012.11.07 | green

…

2012.11.07 | green

There are two such columns. When I saved this partitioned table its columns had full length.&nbsp;Is it possible to save this two columns in the compressed form? For example,&nbsp;10000 (cnt), 2 (enumeration, value for light green)

---

<div class="post-metadata">

**Author:** ![TerryLynch1](https://avatars.discourse-cdn.com/v4/letter/t/9e8a1a/32.png) [@TerryLynch1](https://forum.kx.com/u/TerryLynch1)\
**Post date:** [November 12, 2012, 8:14pm UTC](https://forum.kx.com/t/columns-with-the-same-values/7991/2 "2012-11-12T20:14:00Z")

</div>

If the columns are of type symbol, they will automatically be enumerated using .Q.dpft for example. The unique values (say light-green, green) will be stored once in the sym file, and will be referenced by index from the relevant columns.&nbsp;

The columns must have full-length, otherwise you’d have a length error. But since you’d just be storing indices it’s not a problem.&nbsp;

See&nbsp;http://code.kx.com/wiki/Cookbook/SplayedTables#Enumeratingvarcharcolumnsinatable
