26 | 04 Feb 2015 @ 08:07 PST | Database | Topic | Java Function in Teradata is taking too long to execute | I've created a Java Function and imported it in TeraData
But after few thousand executions, the function becomes too slow.
You can find below output from TOP command.
USER &... |
25 | 30 Dec 2014 @ 10:36 PST | Database | Reply | using update with WITH clause | Hi,
I have 2 tables having same number of rows(UNIQUE).
1 table is having identity column and 2nd doesn't have.
I want to update column in 2nd table with 1st table(any row from 1st table)
&... |
24 | 30 Dec 2014 @ 10:32 PST | Database | Reply | GET DIAGNOSTICS v_Variable_Name = ROW_COUNT giving wrong output | Thanks for your response.
PFB procedure that i tested for this.
REPLACE procedure test()
dynamic result sets 1
begin
DECLARE dg_rowcnt integer;
&nb... |
23 | 28 Dec 2014 @ 11:07 PST | Database | Topic | using update with WITH clause | Hi,
I'm trying to do something like below, but its giving me syntax error,
can anyone please tell me what is the issue and how to fix this.
with cte0(ID,int_col1) as(
 ... |
22 | 24 Dec 2014 @ 01:35 PST | Database | Topic | GET DIAGNOSTICS v_Variable_Name = ROW_COUNT giving wrong output | Hi,
ROW_COUNT is returning wrong number.
i have a table having around 100K rows. In a procedure i'm updating all the rows and returning number of rows affected.
I'm using following query... |
21 | 28 Oct 2014 @ 10:25 PDT | Database | Reply | write SQL UDF in Teradata | thanks all
|
20 | 27 Oct 2014 @ 03:33 PDT | Database | Reply | write SQL UDF in Teradata | but i want to read data from database tables.
is this possible. if yes, will it hurt the performance?
|
19 | 26 Oct 2014 @ 10:48 PDT | Database | Topic | write SQL UDF in Teradata | Hi,
I want to write SQL UDF with Multiple Lines:
1. Declare variables.
2. Set those variables with select into statement.
3. some if conditions on Variables
4. return some value.
What... |
18 | 07 Oct 2014 @ 09:08 PDT | Database | Reply | An owner referenced by user does not have REFERENCES access | USER DBC has created that Procedure and even that Table.
do i need to explicitly grant reference permission to user dbc for every table.
|
17 | 07 Oct 2014 @ 12:24 PDT | Database | Topic | An owner referenced by user does not have REFERENCES access | Hi,
I'm logged in with dbc user.
I'm ALTERing a table to add Foreign Key Constraint with Following statement
ALTER TABLE testdb.Master2 ADD CONSTRAINT fk_Master1 FOREIGN KEY (Mas... |
16 | 25 Sep 2014 @ 12:33 PDT | Database | Reply | Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key) | that was myTableNameToMask || '_0' in above comment.
Spell Mistake
Parth |
15 | 25 Sep 2014 @ 12:32 PDT | Database | Reply | Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key) | Thanks
I Have Created a Seapare Procedure which will Drop All Tables having myTableNameToMask || '
0' before Adding Constraint.
Thanks all.
Parth
|
14 | 24 Sep 2014 @ 04:54 PDT | Database | Reply | Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key) | Thanks for this valuable info.
Should i Check for this table every time when i'm altering table, And delete it if exists?
Or is there any setting that will delete this automatically i... |
13 | 24 Sep 2014 @ 03:50 PDT | Database | Reply | Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key) | i verified all the statements.
penultimate ALTER Statement is working fine. it dropped only Constraint from compositeForeignKey, But it did not drop table "compositeForeignKey_0".
When ... |
12 | 24 Sep 2014 @ 02:53 PDT | Database | Reply | Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key) | Hi,
Now some other problem with same issue.
There are some composite keys in my DB.
When i drop and Recreate them, i get error.
Following is the simple sample script which will ... |
11 | 24 Sep 2014 @ 02:51 PDT | Database | Reply | Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key) | I again ran the same command after restarting my Studio and it works.
I don't know why.
thanks.
Parth
|
10 | 23 Sep 2014 @ 10:51 PDT | Database | Reply | Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key) | Thanks for information.
Actually i'm doing this in a loop.
So i need to drop them dynamically.
The problem is the following statement, which is not working.But even its not giving an... |
9 | 23 Sep 2014 @ 04:48 PDT | Database | Topic | Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key) | Hi,
I want to Update a table. But before that i want disable foreign key\check Constraint\Unique Key on some tables.
After update, i want to enable those disables constraint again.
 ... |
8 | 23 Sep 2014 @ 04:43 PDT | Database | Reply | No room available in Database testdb. | thanks for help.
I downloaded 40GB VM.
And it worked.
Thanks all.
|
7 | 19 Sep 2014 @ 01:21 PDT | Database | Reply | No room available in Database testdb. | Following are the results of Both Views:
DBC.TableSize :
1 SQLJ DBC ALTER_JAVA_PATH 3072 3072
1 transportation DBC Frequent_Flyers 1536 1536
0 SQLJ DBC REPLACE_JAR 3072 3072
0 transportation... |
6 | 18 Sep 2014 @ 04:14 PDT | Database | Topic | No room available in Database testdb. | Hi,
i'm getting error of "no room available in Database testdb".
Even in dbc, there's no space left.
Now i want to add space in dbc. so that i can move that space to my testdb ... |
5 | 17 Sep 2014 @ 01:07 PDT | Database | Reply | Use While loop in Stored Procedure in Teradata | Hi Vijay,
I found solution for Affected Rows Count.
Paste this right after your update Query.
GET DIAGNOSTICS t_dups = ROW_COUNT;
Here t_dups is the variable name which you can replace ... |
4 | 17 Sep 2014 @ 12:28 PDT | Database | Reply | Use While loop in Stored Procedure in Teradata | hi vijay,
I tried ACTIVITY_COUNT in Procedure, but got error "Cannot resolve column 'ACTIVITY_COUNT'".
I am running this in TeraData Studio (Query Manager) not in BTEQ.
Parth
|
3 | 17 Sep 2014 @ 12:25 PDT | Database | Reply | Use While loop in Stored Procedure in Teradata | i just got one more issue;
Problem #3:
Can we call dbc.SysExecSQL outside of Stored Procedure.(as a single statement).
i'm getting error "Stored Procedure dbc.SysExecSQL does not exist&... |
2 | 16 Sep 2014 @ 11:48 PDT | Database | Reply | Use While loop in Stored Procedure in Teradata | thanks for quick reply.
Can you please help me in one more issue.
I want to get no of rows affected from last Query. How can i do that.
for instance :
DECLARE v_RowsAffected integer;
update ta... |