#DateForumTypeThreadPost
192821 May 2013 @ 10:51 PDTDatabaseReplyMinute Difference Between Time DatatypesOps, the INTERVAL is not needed, just remove it: (SEC.CALL_START_TM-PRI.CALL_END_TM) day(4) to second AS TIME_DIFF   Dieter
192721 May 2013 @ 02:41 PDTDatabaseReplyDDL/DML Version ControlHi Pawan, there's no built-in version control, Teradata doesn't store "previous" versions. To achieve your goal you might use some external version control software like Subvers...
192621 May 2013 @ 02:39 PDTPrivate Forum
192521 May 2013 @ 02:31 PDTDatabaseReplyView columns explicitly titled - where are the titles stored?Hi Simon, it's not stored in any easily accessible way, just in dbc.tvm's RequestText or CreateText. It's parsing time :-(   Dieter 
192421 May 2013 @ 02:23 PDTToolsReplyFind record position for FastloadFastLoad doesn't store any information about the record number. If you need it you might switch to MLoad instead.   Dieter
192321 May 2013 @ 02:19 PDTDatabaseReplyRestrict User view of DBC.TablesRevoke the access rights for dbc.Tables etc. and tell the users to use the X-versions, e.g. there's dbc.Tables and dbc.TablesX. dbc.Tables returns rows for all objects within the system, while...
192221 May 2013 @ 02:08 PDTDatabaseReplyMinute Difference Between Time DatatypesThe difference between two timestamps is an interval: (SEC.CALL_START_TM-PRI.CALL_END_TM) interval day(4) to second AS TIME_DIFF WHERE TIME_DIFF <= interval '5' minute Dieter
192118 May 2013 @ 10:48 PDTDatabaseReplyAverage of volume by weekday and hour over rangeYou group both times by the same columns, if i understodd you correctly you have to group by date/hour first and then by weekday: SELECT creation_dt (FORMAT 'eee') (CHAR(3)) ,AV...
192017 May 2013 @ 04:39 PDTGeneralReplyReg.Teradata FeaturesFor each release there's a Release Summary with all the new features: http://www.info.teradata.com/edownload.cfm?itemid=113480006   Dieter
191917 May 2013 @ 12:26 PDTDatabaseReplyReturning a Results from Stored ProcedureDo you actually need to access the result several times? Then you should materialize it in a Global Temporary Table. When you only want to return it to the client, it's  replace proce...
191816 May 2013 @ 09:19 PDTDatabaseReplySUBSTR without explicitly coding the length parmIt's exceeding the maximum row size because the column is defined as LATIN and your session character set is UNICODE and/or you ORDER BY some of those columns. The calculation is based on the p...
191708 May 2013 @ 03:51 PDTDatabaseReplyWarning message when using Dynamic cursor -Hi Ganesan, sorry, i was wrong, of course you can't handle that specific warning within the SP itself. But when you set the ERRORLEVEL to zero the BTEQ job will also report a zero return code...
191603 May 2013 @ 08:25 PDTDatabaseReplyHow to Use Round Function In TeradataHi Mahesh, there's ROUND in TD14... In your case you don't need ROUND as a CAST AS DECIIMAL(xx,0) should return the same result.   But i assume W_ORDER_D.X_ATTRIB_27 is a...
191503 May 2013 @ 08:12 PDTDatabaseReplyUsing FLOOR() function over a Bigint ColumnsWhen you got BIGINTs the result should be 1. Looks like you actually got DECIMALs. SEL TYPE(1734567890123), TYPE(1000000000000); SEL CAST(1734567890123 AS BIGINT)/CAST(1000000000000 AS BIGINT)...
191402 May 2013 @ 11:28 PDTDatabaseReplyWarning message when using Dynamic cursor -Hi Ganesan, in a SP simply add a CONTINUE HANDLER.   Dieter
191302 May 2013 @ 12:05 PDTDatabaseReplytuning the Skewed joinsHi Suresh,  a typical solution would duplicate the query, the first with a condition "WHERE col = skewed_value" and the other "WHERE col <> skewed_value" and UNION A...
191202 May 2013 @ 12:01 PDTDatabaseReplyLocking of the DBC tablesThere's no information about locks in DBQL, you need to enable Locking Logger for this. If you want to check the current locks you might use the PMON API UDFs in syslib like MonitorSessions. ...
191102 May 2013 @ 11:59 PDTDatabaseReplyTrying to round result of a computation to 2 digits of precisionWhat is the maximum values returned by that calculation? I would not use FLOAT as it's precision is limited to approx. 15 digits. Better use DECIMAL instead, which supports up to 38 digits. ...
191002 May 2013 @ 11:55 PDTDatabaseReplyUnique gapless ID:s from system - how to?The only way to get a gapless sequence is to do it on your own with ROW_NUMBER like select row_number() over (order by whatever) + coalesce((select min(seq) from tab), 0) as seq .... ...
190902 May 2013 @ 11:51 PDTDatabaseReplyHybrid columnar automatic formatI would suggest reading the manuals, there should be lots of details in the DDL and the Database Design manuals plus the Columnar Orange Book. Dieter
190802 May 2013 @ 11:46 PDTToolsReplyProblem with title line when using .export reportWhat do you expect? There's only one column in your output, the column name is automatically created and the optimizer tends to add a lot of brackets. If you want the fieldnames you have to wr...
190702 May 2013 @ 11:43 PDTDatabaseReplyWarning message when using Dynamic cursor -Hi Ganesan, just switch it off if BTEQ returns an errorlevel greater zero to the shell: .SET ERRORLEVEL 3212 SEVERITY 0;   Dieter
190602 May 2013 @ 10:38 PDTDatabaseReplyQuery using the Sys_Calendar to return quarterly resultsWhat exactly are you looking for? There are already quarter_of_year and quarter_of_calendar columns in sys_calendar. And a calculation of start and edn of quarter as date would be somehing like ...
190502 May 2013 @ 09:39 PDTDatabaseReplyCase Statement on an Inline ViewHi Haarish, could you show the SQL?  Is there any RANDOM/SAMPLE/OLAP function in the Derived Table?   Dieter
190402 May 2013 @ 09:20 PDTDatabaseReplySQL to import string with comma (,) from a file using SQL AssistantI didn't test it, but did you try to set "enclose column data in" in options -> import/export to "single quotes"? Dieter

Pages