Questions tagged [vsql]

vsql is a Vertica front-end client utility for Unix-based systems that provides meta-commands and various shell-like features that facilitate writing scripts and automating a variety of tasks related to SQL.

vsql can be installed on Unix-based systems such as Solaris, HP-UX, AIX and Mac OSX. It is typically installed as part of the HP Vertica server rpm (Red Hat Package Manager).

See using vsql for more information.

54 questions
0
votes
0 answers

Vertica query returns empty result set at SSRS

We are creating SSRS reports using Vertica Data Source. Vertica query does not return any result set when we using Temp tables on it. Pleas find below sample query, DROP TABLE IF EXISTS Employee; CREATE LOCAL TEMPORARY TABLE IF NOT EXISTS…
San
  • 11
  • 2
0
votes
4 answers

Dealing with overlapping conditions in CASE statement

SELECT (CASE WHEN ymd BETWEEN CURRENT_DATE -4 AND CURRENT_DATE -1 THEN '3day total' WHEN ymd BETWEEN CURRENT_DATE -11 AND CURRENT_DATE -1 THEN '10day total' WHEN ymd BETWEEN CURRENT_DATE -31 AND CURRENT_DATE -1 THEN '30day total' END) AS…
ChrisArmstrong
  • 2,491
  • 8
  • 37
  • 60
0
votes
2 answers

vsql slower than Squirrel SQL

I'm executing a SQL like below in a Vertica database (running on a single node) on a table which has about 258 million rows. I get the output in about 17 secs in SQuirrel SQL, but it takes several minutes to get the output of the same query in vsql…
museshad
  • 498
  • 1
  • 8
  • 18
-1
votes
1 answer

VSQL is generating output file using perl script but not in cronjob

i have created the perl script in which i am connecting to vsql and running queries. when i run the script mannually, it is creating output files as expected. but when i set this script in crontab then output file is not generating. perl script is…
-1
votes
1 answer

Return list of tables and count in single query

I know about the describe command \d and select count(*) from my_schema_1.my_table_1;. However I'd like to get a neat list of the entire database, I have quite a few tables. Something like below would be nice. my_schema_1 | mytable_1 |…
basickarl
  • 37,187
  • 64
  • 214
  • 335
-1
votes
1 answer

How do i convert row.names to a column using R

This is what I get when I P<- unique(sqlQuery(ch, "Select * FROM TABLE")) rownames Maths Science English Art Chinese 1 Hazel 1 1 1 0 1 2 Haley 0 1 0 1 1 3 Shawn 1 1 1 1 …
xavier
  • 31
  • 1
  • 5
-1
votes
2 answers

Efficiently group by column aggregate

SELECT date, id, sum(revenue) FROM table WHERE date between '2013-01-01' and '2013-01-08' GROUP BY date, id HAVING sum(revenue)>1000 Returns rows that have revenue>1000. SELECT date, id, sum(revenue) FROM table WHERE date between '2013-01-01' and…
ChrisArmstrong
  • 2,491
  • 8
  • 37
  • 60
-2
votes
1 answer

How to read data from columns not having the same number of rows in HP vertica DB?

I am creating a C++ transform function with the HP Vertica database and I want to read data from 2 columns from 2 different tables and store them into 2 vectors. Then it will output the number of occurences of each element of one vector in the…
BM. Hamza
  • 1
  • 2
-2
votes
2 answers

How do you remove time component from a timestamp?

How do you remove the time component from a timestamp for instance: 2014-01-01 12:00:01 To become 2014-01-01 00:00:00
c 2
  • 1,127
  • 3
  • 13
  • 21
1 2 3
4