Exploring Vertica's INTERPOLATE predicate

Vertica has a special feature to join tables and fill in the last available values where values would otherwise be null. I had a similar use case and wanted to test how I could make the best use of it. I played with simple examples and got it right, but with a slightly more complex one, I was stuck or maybe I just couldn’t understand what was happening. So I posted a question at Stackoverflow

June 18, 2013 · 1 min · 75 words

Vertica - Calendar table with dates from a start date to an end date using analytical SQL

I had a problem creating a table with just SQL that is supported by Vertica. Most of the solutions that I came across online were using procedures. But after a lot of playing around and reading vertica documentation I found a solution to my problem. read more about the problem and the solution at Stackoverflow

June 18, 2013 · 1 min · 55 words

Viewing function definitions in Vertica

I don’t know if you have tried this. But I did try to read function definition from the system tables in Vertica. I used the table called USER_FUNCTIONS which is a table in the V_CATALOG system schema. More details can be found here: https://my.vertica.com/docs/6.1.x/HTML/index.htm#15021.htm But unfortunately when I try and do something like this: vertdeva01:20130604-113434 > select function\_definition from v\_catalog.user\_functions where schema\_name='calc' and function\_name='getCYForDate'; \---------------------------------------------------------------------------------------------------------------------------------- RETURN to\_date(concat(((((date\_part('year', (processDate)::timestamp))::int - CASE WHEN ((date\_part('month', (processDate)::time (1 row) If you notice the function definition is only partly visible....

June 5, 2013 · 2 min · 267 words

Setup DBVisualizer with an HP Vertica DB connection

Download your free copy of DBVisualizer from http://www.dbvis.com/download/ I am going to give you the steps to setup vertica connection to DB Visualizer on a windows 7. Our windows might look different. But I suppose the terms used on the GUI would match that on any operating system. I know this might be a big assumption as I don’t work for DBVisualizer and I haven’t installed it on any other platform....

June 5, 2013 · 4 min · 798 words

Vertica DELETE columns from one table using data from another

My colleague had an issue in Vertica. He had a set of values in table 1 to be deleted based on the records in a table table2. I didn’t think this would be easy considering VERTICA didn’t support joins when doing deletes unlike MYSQL. But they do have something else. Let me take you through the steps I followed. I created the following table in which I have records create table eakan (sec\_id int, nameid int, date date); insert into public....

May 30, 2013 · 2 min · 275 words