Quantcast
Channel: Teradata Forums - Database
Browsing all 14773 articles
Browse latest View live

Find new tables created in last month - topic by teradatauser2

Hi, I have a requirement to find out "new" tables that we created in one DB-say abc, in last one month. I querried dbc.tables and listed down the tables based on createtimestamp field that are in...

View Article


Find new tables created in last month - response (1) by mohan.mscss

Hi , As per my knowledge once we dropped existing table, it will automatically removes all the information from the data dictionary. So once we dropped and recreated the table with the same name , the...

View Article


How to transpose rows to columns without the use of .sql and Bteqs - topic by...

Hi,   read more

View Article

Find new tables created in last month - response (2) by Qaisar Aftab Kiani

That is correct because data dictionary keeps track of what exists in the DB. Once the tables are dropped the dictionary entried are removed. If you want to keep an AUDIT of tables then probably you...

View Article

Find new tables created in last month - response (3) by teradatauser2

thanks qaisar. Now is it possible to get those details from dbql ? for a long term solution, what we can do is, before dropping any table . i will create a metadata table and insert a row with the...

View Article


Need Suggestions - response (1) by Qaisar Aftab Kiani

This is logical. If there is one value in lookup table and there are 15 values in joining tables then you get the 15 records. If you need only single record from the main table then you can use the...

View Article

How to transpose rows to columns without the use of .sql and Bteqs - response...

SELECT Acct_num , Acct_type,           MAX(CASE WHEN Alt_id_type = 'C_id' THEN Alt_id END) AS C_id,           MAX(CASE WHEN Alt_id_type = 'D_id' THEN Alt_id END)  AS D_id,           MAX(CASE WHEN...

View Article

Cursors in stored procedures - topic by mithunk

Hi,   I have to create a stored procedure which returns resultset. Common answer to this was the usage of cursor inside the stored proc. I have few questions on using cursors inside stored procedure....

View Article


How to transpose rows to columns without the use of .sql and Bteqs - response...

Hi Sachin, I tried execute your query with the below inputs it seems you picked the max value for particular Alt_id_type.   Here for 1234, i have just changed C_id instead of D_id and it seems getting...

View Article


How to store a field value of a table column into variables in Stored...

Aha, that's probably one problem. It did not work. I tried another way -  the clause "FROM" contains 'tablename' which was a variable. That does not work too. Many thanks! Dan

View Article

Need Suggestions - response (4) by MBR

Thanks Aftab for replying Actually we are implementing scd type2 mechanism , we are loading the data into targets from different tables that too from each table once at a time lets say suppose party is...

View Article

Is it possible to invoke the Utilities inside a SP? - response (2) by...

Thanks Dieter :) Is it possible to achieve those functionality  using UDF's??

View Article

How to transpose rows to columns without the use of .sql and Bteqs - response...

Mohan, The sql I provided was based on the premise that there would be unique Alt_id_type for Acct_num, Acct_type combination.

View Article


Find new tables created in last month - response (4) by Qaisar Aftab Kiani

There is a DBQLOGTBL you can refer to. See the column QueryText - this contains all the sqls that have been executed. You need to filter out the records by selecting only CREATE and DROP table...

View Article

How to transpose rows to columns without the use of .sql and Bteqs - response...

Yes there will be only one ALT_ID under a ALT_ID_TYPE_CODE for an ACCOUNT..   Thanks, Sachin. But under my requirements I am not allowed to use a group by on over all select. So this is were it gets...

View Article


Perforamnce due to Skew during Execution - topic by m.tahoon

The following query taked very long time during execution. total CPUSec consumed is not very high; but i'v noticed very high session skew factor from Viewpoint (CPU 80 % - io 97%) HOwever Data...

View Article

Help required on the query using analytic function - topic by BalaAG

Hi All, read more

View Article


select FirstRespTime ,* from DBC.DBQLogTbl - topic by cloghin

This is more of a convenience to frontshow some columns, maybe expressions, but still show all columns in the result set if needed. Is there some special syntax to achieve this? I have been able to run...

View Article

select FirstRespTime ,* from DBC.DBQLogTbl - response (1) by mohan.mscss

yes we can in TD also, select FirstRespTime, DBQLogTBL.* from DBQLogTbl Regards, Mohan K    

View Article

Cursors in stored procedures - response (2) by dnoeth

Hi Mithun, the syntax for returning result set is based on Standard SQL, but it's not an actual cursor (only those you actually process rows using fetch or FOR are sequential). A cursor for a DYNAMIC...

View Article
Browsing all 14773 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>