# | Date | Forum | Type | Thread | Post |
8 | 09 Aug 2016 @ 01:38 PDT | Database | Topic | Numeric overflow occurred during computation in Teradata Stored procedure |
INSERT INTO TGT
SELECT
DECIMAL_C1,
DECIMAL_C2,
MAX(CAST(DATE_C3 AS DATE)) AS MAX_DATE_C3,
MAX(CAST(TIMETSAMP_C4 AS TIMESTAMP(6))) AS MAX_TIMETSAMP_C4
(
SELECT&nb... |
7 | 20 Jun 2016 @ 11:40 PDT | UDA | Reply | How to create a Macro passing table names as the parameter | Hi Dieter,
I am having requirement where I want to use database_name and table_name as parameterized in stored procedure.
In procedure I will be performing below DML operations :
INSERT ... |
6 | 20 Jun 2016 @ 09:50 PDT | Database | Reply | Dynamically select TOP N rows from table | Thanks for helping to resolve the issue...!! :)
|
5 | 20 Jun 2016 @ 06:47 PDT | Database | Topic | Dynamically select TOP N rows from table | Hi All,
I need to perform dynamically select TOP N row from table.
SELECT TOP (10-4) COLUMNNAME
FROM DBC.COLUMNS
WHERE DATABASENAME='DATABASE_NAME'
AND TABLENAME ='TABLE_NAME';... |
4 | 20 May 2016 @ 06:04 PDT | Database | Reply | Column value is refered as Column_Name in another table | Hi All,
I am getting spool space issue. Is there any other way to optimize the SQL for it?
Thank you in advance.!
|
3 | 18 May 2016 @ 10:01 PDT | Database | Reply | Column value is refered as Column_Name in another table | Thanks for your reply..!!
I thought we can do it dynamic way to fetch required field name.
But as you said, there will not be any performance issues with huge CASE statements, I can go with this ... |
2 | 18 May 2016 @ 06:10 PDT | Database | Reply | Column value is refered as Column_Name in another table | Hi dnoeth,
There are C1 to C99 columns.
I want to avoid writing CASE statement for 99 times.
Can we perform it dynamic way? or using WITH RECURSIVE.
Thanks for your reply.
|
1 | 18 May 2016 @ 05:05 PDT | Database | Topic | Column value is refered as Column_Name in another table | Hi,
I am working on below requirement :
In source table A there is field with XYZ.
There is another source B table which is joined with A table on ID column.
Now value pre... |
|
|