<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Vsql on Software Craftsperson</title>
    <link>https://www.softwarecraftsperson.com/tags/vsql/</link>
    <description>Recent content in Vsql on Software Craftsperson</description>
    <image>
      <title>Software Craftsperson</title>
      <url>https://www.softwarecraftsperson.com/logos/web/png/Color%20logo%20-%20no%20background.png</url>
      <link>https://www.softwarecraftsperson.com/logos/web/png/Color%20logo%20-%20no%20background.png</link>
    </image>
    <generator>Hugo -- 0.147.1</generator>
    <language>en</language>
    <lastBuildDate>Wed, 05 Jun 2013 09:28:00 +0100</lastBuildDate>
    <atom:link href="https://www.softwarecraftsperson.com/tags/vsql/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Viewing function definitions in Vertica</title>
      <link>https://www.softwarecraftsperson.com/posts/2013-06-05-viewing-function-definitions-in-vertica/</link>
      <pubDate>Wed, 05 Jun 2013 09:28:00 +0100</pubDate>
      <guid>https://www.softwarecraftsperson.com/posts/2013-06-05-viewing-function-definitions-in-vertica/</guid>
      <description>&lt;p&gt;I don&amp;rsquo;t know if you have tried this. But I did try to read function definition from the system tables in Vertica.&lt;/p&gt;
&lt;p&gt;I used the table called USER_FUNCTIONS which is a table in the V_CATALOG system schema. More details can be found here: &lt;a href=&#34;https://my.vertica.com/docs/6.1.x/HTML/index.htm#15021.htm&#34;&gt;https://my.vertica.com/docs/6.1.x/HTML/index.htm#15021.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But unfortunately when I try and do something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vertdeva01:20130604-113434 &amp;gt; &lt;span class=&#34;k&#34;&gt;select&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\_&lt;/span&gt;definition from v&lt;span class=&#34;se&#34;&gt;\_&lt;/span&gt;catalog.user&lt;span class=&#34;se&#34;&gt;\_&lt;/span&gt;functions where schema&lt;span class=&#34;se&#34;&gt;\_&lt;/span&gt;name&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;calc&amp;#39;&lt;/span&gt; and &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\_&lt;/span&gt;name&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;getCYForDate&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;\-&lt;/span&gt;---------------------------------------------------------------------------------------------------------------------------------  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;RETURN to&lt;span class=&#34;se&#34;&gt;\_&lt;/span&gt;date&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;concat&lt;span class=&#34;o&#34;&gt;(((((&lt;/span&gt;date&lt;span class=&#34;se&#34;&gt;\_&lt;/span&gt;part&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;year&amp;#39;&lt;/span&gt;, &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;processDate&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;::timestamp&lt;span class=&#34;o&#34;&gt;))&lt;/span&gt;::int - CASE WHEN &lt;span class=&#34;o&#34;&gt;((&lt;/span&gt;date&lt;span class=&#34;se&#34;&gt;\_&lt;/span&gt;part&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;month&amp;#39;&lt;/span&gt;, &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;processDate&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;::time  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; row&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you notice the function definition is only partly visible. The rest of it gets truncated. I don&amp;rsquo;t know how to set it right. If you know how, feel free to comment on this post.&lt;/p&gt;</description>
    </item>
    <item>
      <title>VSQL extract data into file</title>
      <link>https://www.softwarecraftsperson.com/posts/2013-05-30-vsql-extract-data-into-file/</link>
      <pubDate>Thu, 30 May 2013 17:34:00 +0100</pubDate>
      <guid>https://www.softwarecraftsperson.com/posts/2013-05-30-vsql-extract-data-into-file/</guid>
      <description>&lt;p&gt;Hey there! So you use Vertica and vsql to interact with your tables. Ever had those times when you wanted to take stuff from your table and paste it into Microsoft Excel for sending it off to someone not so technically acquainted with Vertica?&lt;br&gt;
You could write a script to do that for you. But if you just had to do it within a vsql session you also have options to do it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vertica DELETE columns from one table using data from another</title>
      <link>https://www.softwarecraftsperson.com/posts/2013-05-30-vertica-delete-columns-from-one-table/</link>
      <pubDate>Thu, 30 May 2013 16:34:00 +0100</pubDate>
      <guid>https://www.softwarecraftsperson.com/posts/2013-05-30-vertica-delete-columns-from-one-table/</guid>
      <description>How to delete columns from one table using data from another</description>
    </item>
  </channel>
</rss>
