# merge hdb

**URL:** <https://forum.kx.com/t/merge-hdb/10722>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [January 6, 2016, 6:04am UTC](https://forum.kx.com/t/merge-hdb/10722 "2016-01-06T06:04:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isaac](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@Isaac](https://forum.kx.com/u/Isaac)\
**Post date:** [January 6, 2016, 6:04am UTC](https://forum.kx.com/t/merge-hdb/10722/1 "2016-01-06T06:04:00Z")

</div>

Hi,  
&nbsp; &nbsp;Is there a way to merge sym files, which are for hdb data. &nbsp; &nbsp; I have two hdb folders, they are same except the date.

---

<div class="post-metadata">

**Author:** ![kuentang](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kuentang](https://forum.kx.com/u/kuentang)\
**Post date:** [January 6, 2016, 9:28am UTC](https://forum.kx.com/t/merge-hdb/10722/2 "2016-01-06T09:28:00Z")

</div>

Here is a link http://code.kx.com/wiki/Contrib/CompactingHdbSym to help you get started. It will not solve your problem directly but you will get some ideas from this script. \<o:p\>\</o:p\>

\<o:p\> \</o:p\>

HTH,\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

Kim\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

**Von:** [personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com) [[mailto:personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)] **Im Auftrag von** Isaac  
**Gesendet:** Mittwoch, 6. Januar 2016 07:04  
**An:** Kdb+ Personal Developers  
**Betreff:** [personal kdb+] merge hdb\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

Hi,\<o:p\>\</o:p\>

&nbsp; &nbsp;Is there a way to merge sym files, which are for hdb data. &nbsp; &nbsp; I have two hdb folders, they are same except the date.\<o:p\>\</o:p\>

–  
Submitted via Google Groups

---

<div class="post-metadata">

**Author:** ![Aaron\_Davies](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@Aaron\_Davies](https://forum.kx.com/u/Aaron_Davies)\
**Post date:** [January 11, 2016, 12:49am UTC](https://forum.kx.com/t/merge-hdb/10722/3 "2016-01-11T00:49:00Z")

</div>

basically, re-enumerate one by the other’s symfile, then you can  
manipulate the data as you like

should be something like

\l hdb2  
\l dbmaint.q  
{fncol’[`:.;x;exec c from meta x where t="s";`:/path/to/hdb1/sym?get@]}each{x where -1h=(type .Q.qp get@)each  
x}tables
