Search found 45 matches

by piglet
Wed Dec 19, 2012 9:17 pm
Forum: Vertica SQL
Topic: Random Number (Between Negative and Positive)
Replies: 4
Views: 10796

Random Number (Between Negative and Positive)

Hey, Is it possible to generate a random number that falls somewhere in between a negative number as the lower bound and a positive number for the upper bound? I want to generate a random number that falls between -100 and 100? It seems the randomint function can only work with positive numbers: dba...
by piglet
Sat Dec 08, 2012 2:12 pm
Forum: SQL Workbench/J
Topic: Another Client Tool!
Replies: 2
Views: 60210

Re: Another Client Tool!

Thanks, knicely87!

How do I set this up to connect to Vertica? None of the drivers are for Vertica. Or should we just use the ODBC/JDBC bridge option?
by piglet
Sat Dec 08, 2012 2:04 pm
Forum: New to Vertica
Topic: Cannot convert column from "varchar" to "int"
Replies: 2
Views: 12869

Re: Cannot convert column from "varchar" to "int"

OK. Thank you, skwa. Now I see that bad news in the docs. But is there a technical reason why Vertica can't convert a varchar to an int? I can understand if there was data in the column, but even when the column contains only nulls they still can't make that simple change? :roll: Weak!
by piglet
Thu Dec 06, 2012 2:18 pm
Forum: New to Vertica
Topic: Cannot convert column from "varchar" to "int"
Replies: 2
Views: 12869

Cannot convert column from "varchar" to "int"

Hello, Is it possible to change the data type of a varchar column to int? If I try I get an error: dbadmin=> alter table inv.transaction2 alter column inv_status_key set data type int; ROLLBACK 2377: Cannot convert column "inv_status_key" from "varchar(1)" to type "int" But I don't understand why be...
by piglet
Tue Nov 27, 2012 3:30 pm
Forum: New to Vertica SQL
Topic: How do I list my savepoints?
Replies: 2
Views: 6288

Re: How do I list my savepoints?

Thanks, Jim. It'd be cool if save point info was stored in a system table so that we could access it. But I don't think there is any database out there that gives us that.
by piglet
Thu Nov 15, 2012 8:32 pm
Forum: New to Vertica SQL
Topic: How do I list my savepoints?
Replies: 2
Views: 6288

How do I list my savepoints?

Hi guys, I'm running a bunch of transactions separated by save points. Is there a way that I can list what save points are active? dbadmin=> insert into t values (1); OUTPUT -------- 1 (1 row) dbadmin=> savepoint t1; SAVEPOINT dbadmin=> insert into t values (2); OUTPUT -------- 1 (1 row) dbadmin=> s...
by piglet
Thu Sep 27, 2012 12:54 pm
Forum: Vertica SQL
Topic: Division by zero?
Replies: 3
Views: 24916

Division by zero?

Hi, I hope everyone is doing well! I have a question about division by zero. In the SQL Reference Manual on page 115 it states: For INTEGER data types, dividing zero by zero returns zero: => SELECT 0/0; ?column? ---------- 0 (1 row) Dividing anything else by zero returns a run-time error. => SELECT ...

Go to advanced search