Search found 20 matches
- Thu Jul 30, 2015 2:42 pm
- Forum: New to Vertica SQL
- Topic: Encapsulation in Vertica
- Replies: 0
- Views: 13314
Encapsulation in Vertica
I'm using a Vertica SQL client DBVisualizer to run queries on Vertica. I would like to encapsulate my code. I would want users to just enter couple parameters on my queries and get the results. I read and got 2 options.. 1 UDF's.. since the code returns tables of records and involves temp tables. I ...
- Sat Jul 25, 2015 9:57 pm
- Forum: Vertica SQL
- Topic: Joining and Grouping 2 column set
- Replies: 7
- Views: 14118
Re: Joining and Grouping 2 column set
Stored result set in a temp table and then used it in formatting. It's all good now. thanks!
- Sat Jul 25, 2015 8:01 pm
- Forum: Vertica SQL
- Topic: Joining and Grouping 2 column set
- Replies: 7
- Views: 14118
Re: Joining and Grouping 2 column set
I never challenged you for a solution. You took it wrong. challenge was noun there not verb.. Anyways leaving grammar away.. the reason I can't do that brute force is that the result set comes after 2-3 joins on 2 tables so I can't afford to run that same thing 5 more times :( I don't have a solutio...
- Fri Jul 24, 2015 10:38 pm
- Forum: Vertica SQL
- Topic: Joining and Grouping 2 column set
- Replies: 7
- Views: 14118
Re: Joining and Grouping 2 column set
Need to distinct from both columns and for my first result column and then do a count for respective rows (number of times they are in first place or second).
- Fri Jul 24, 2015 10:35 pm
- Forum: Vertica SQL
- Topic: Joining and Grouping 2 column set
- Replies: 7
- Views: 14118
Re: Joining and Grouping 2 column set
The challenge in my situation is that the First place Values and Second place values can change depending on the where clause. So I cannot hard code them using Decode.
- Fri Jul 24, 2015 8:57 pm
- Forum: Vertica SQL
- Topic: Joining and Grouping 2 column set
- Replies: 7
- Views: 14118
Joining and Grouping 2 column set
Hello guys,
Does Vertica support Pivot command?
I was looking to do the following
first Place Second
A A
B B
A B
C A
D C
Transformed to
Places First Second
A 2 2
B 1 1
C 1 0
D 1 0
Any suggestions?
Does Vertica support Pivot command?
I was looking to do the following
first Place Second
A A
B B
A B
C A
D C
Transformed to
Places First Second
A 2 2
B 1 1
C 1 0
D 1 0
Any suggestions?