#DateForumTypeThreadPost
25321 Nov 2007 @ 07:36 PSTDatabaseReplyHow to cast the timestampHi Fred,is the session time zone is set, then he'd better use TIMESTAMP WITH TIME ZONE :-)Casts to time normalize the time, but you can de-normalize it, too:SET TIME ZONE INTERVAL '03:00' HOUR TO M...
25221 Nov 2007 @ 07:13 PSTUDAReplyHow to create a Macro passing table names as the parameterYou can't pass any database/table/column-name as parameter to macros.The only way is a Stored Procedure using Dynamic SQL.Dieter
25121 Nov 2007 @ 07:11 PSTUDAReplyHow to cast the timestamp?Hi Rahul,WHERE CAST(start_tmstp AS TIME(0)) BETWEEN TIME '00:00:00' AND TIME '04:59:59'Dieter
25021 Nov 2007 @ 07:09 PSTUDAReplyderived tableInstead of three Derived Tables you can rewrite it using a single DT:Select z.acct_id,da1.last_month,da1.two_mths_ago,da1.three_mths_agoFrom CE1393_Join_AC zLeft Join(Select acct_id,Sum(case when c...
24920 Nov 2007 @ 08:40 PSTAnalyticsReplyIp address of ServerHi Praneet,within hosts there must be an entry like this for a logical name XXX:ip-address1 XXXcop1ip-address2 XXXcop2...Dieter
24820 Nov 2007 @ 08:36 PSTAnalyticsReplyRegarding Space Management In TeradataHi Praneet,dbc.databasespace is the base table used by dbc.tablesize, dbc.diskspace and dbc.allspaceThe ALL table is a dummy and represents all tables within a database -> dbc.diskspaceIt's a bi...
24719 Nov 2007 @ 03:02 PSTAnalyticsReplyRegarding Space Management In TeradataHi Praneet,DBC.TableSize accessed in your third query reports currentperm per table per AMP.So those 10132992 Bytes on AMP 50 are used by the largest table within that database, because you used M...
24619 Nov 2007 @ 02:50 PSTAnalyticsReplyIp address of ServerHi Praneet,there's no system table for that. IP-addresses are resolved by CLI/ODBC using the network's name resolution facility, e.g. DNS, WINS, hosts-file.COP1 is added to the system's logical nam...
24519 Nov 2007 @ 02:45 PSTAnalyticsReplyAmp SharingHi,what do you mean by "share the amps across different platforms"?Different hardware generations, e.g. 5400 and 5450 within a system?Mixing OSes, Windows and Unix, within a system?Nodes within a c...
24417 Nov 2007 @ 08:57 PSTDatabaseReplyCannot start Teradata 6.1Check the windows eventlog for Teradata related errors within the application branch (and post them).Dieter
24317 Nov 2007 @ 08:55 PSTDatabaseReplyHow to schedular job(such as procedure,function,macro) in teradataJob scheduling is usually done using a Unix cron-job.It can also be done using Teradata Manager.Dieter
24217 Nov 2007 @ 08:53 PSTDatabaseReplycomparing the date with 11 monthsHi Rahul,i didn't understand exactly what you want, but it looks like:delete from table driver where insert_dt > add_months(insert_dt, -11)Of course this will delete all the rows, so you probabl...
24117 Nov 2007 @ 08:47 PSTAnalyticsReplyDate ValidationHi John,CHR_VAL_CD might be an invalid date, even when CHR_CD field is 'RETIREDT'?Is there just one date format, e.g. yyyymmdd?You can't use a typecast, because "We do not want to abend the code in...
24014 Nov 2007 @ 07:01 PSTAnalyticsReplyVersion Related Infoselect * from dbc.dbcinfo;Dieter
23914 Nov 2007 @ 07:00 PSTDatabaseReplyDynamic SQL with TerdataYou probably submit your query as a multistatement request, but within any request there might be only a single DDL statementIf you run it within QueryMan using F5 it's send step by step.If you sub...
23809 Nov 2007 @ 05:39 PSTAnalyticsReplyOverlapping Date SQLThis time i actually tested the query :-)   select comm_cnt, count(*) from ( select CustomerID, max(overlap) as comm_cnt from ( select CustomerID, Dat, ...
23709 Nov 2007 @ 04:46 PSTAnalyticsReplyOverlapping Date SQLOoops, i can't delete that previous post.I just recognized that it will not work, i'll have to think about another solution.Dieter
23609 Nov 2007 @ 04:42 PSTAnalyticsReplyOverlapping Date SQLIf the number of rows per CustomerID is low there's a simple solution:select cnt, count(*)from ( select t1.CustomerID, count(*) as cnt from tab t1 join tab t2 on t1.CustomerID = t2.CustomerID ...
23508 Nov 2007 @ 07:17 PSTAnalyticsReplystring surch problumHi Rahul,you could use where col not like any ('%A%','%B%','%C%',...), but this is quite ugly, too.If there's the Oracle Translate function installed on your system, it's easy:compare the string wi...
23408 Nov 2007 @ 07:10 PSTDatabaseReplyWhat is Multi-Level Partitioning in TD 12The new manuals for TD12 are available for download since a few days, you'll find all the details within the Database Design manual.Dieter
23308 Nov 2007 @ 07:07 PSTAnalyticsReplyQUANTILE(100) x 50 times...Hi Tim,"I thought I could perfrom QUANTILE(100, ) upon the 50 columns in a single statement. Running the analysis against just one column gives me a result in 30 secs. EXPLAIN for 50 columns qu...
23206 Nov 2007 @ 07:08 PSTDatabaseReplySoft Referential IntegrityNo and no :-)There's a lot of info about that in the DDL manual: Create TableDieter
23106 Nov 2007 @ 07:01 PSTDatabaseReplyCollect Stats on Primary IndexesIf the stats are collected on all PI columns as multicolumn stats there's no difference between index or column stats. It's just easier to write "Collect stats on tablename index indexname" than "C...
23006 Nov 2007 @ 06:57 PSTDatabaseReplysub queriesTeradata performs a query rewrite and replaces any kind of [correlated] subquery with joins.Thus in many cases there will be no difference between Subquery and Join, just check Explain.You just hav...
22906 Nov 2007 @ 06:52 PSTToolsReplyTeradata Manager internal queriesIf i want to know about queries submitted by an application i simply switch on Access Logging for that user.But some of the manager queries can be found in the SQL subfolder, e.g. the *.hst are the...

Pages