#DateForumTypeThreadPost
220328 Aug 2013 @ 02:03 PDTTeradata StudioReplyhow to define columns to read decimals like lat and long?DECIMAL(8) doesn't have any fractional part, you should use 3 digits plus fractional digits, e.g. DEC(11,8)    Dieter
220228 Aug 2013 @ 01:59 PDTDatabaseReplyNot getting expected results through time(6) Hi Nishant, do a SELECT FORMAT(table.timecol) or a SHOW/HELP TABLE to check if it's actually a TIME and no INTEGER (based on some settings ODBC might replace TIME with INT)   Dieter
220127 Aug 2013 @ 01:31 PDTDatabaseReplyPropagate row data until next date is encounteredHi Harry, there's an event_dt equal to current_date and the basic rule for periods is: end > begin. You might have to change the COALESCE to CURRENT_DATE + 1.   Dieter
220027 Aug 2013 @ 05:15 PDTDatabaseReplyINSERT query of view column data typesHi Nolan, you can try to resolve the view down to the base table, e.g.  http://developer.teradata.com/blog/ulrich/2011/11/extract-and-analyse-database-object-dependencies but this is a huge...
219927 Aug 2013 @ 05:00 PDTDatabaseReply5738 Partition Violation Error occurs while am trying to insert dataThere's probably a NULL in your data and there's no UNKNOWN partition.   Dieter
219827 Aug 2013 @ 04:57 PDTDatabaseReplyMONITORQUERYBAND Open API IssueThe RunVProcNo parameter must be an existing PE number, but neither NULL nor 0 exist. Remove the offending NULL: WHERE RunVprocNo IS NOT NULL or use COALESCE(RunVprocNo ,LogonPENo)...
219726 Aug 2013 @ 10:43 PDTDatabaseReplyLooping in Teradata sqlYou need to create a Stored Procedure to be able to use loops, of course most DBA's don't like end users to create SPs. What are you trying to achieve? Maybe it's possible in plan SQL....
219626 Aug 2013 @ 10:41 PDTDatabaseReplyExtracting Domain Names from EMAIL_TXT Field You might try: trim(leading '.' from substring(email_address from char_length(x) -2))   Dieter
219526 Aug 2013 @ 10:07 PDTGeneralReplyOREPLACE FUNCTION FAILS: FUNCTION DOES NOT EXISTS@yam: this works fine for me, what's your release? @reethi.s: oTRANSLATE(emp_name, '.', '')   Dieter
219426 Aug 2013 @ 10:05 PDTDatabaseReplyPropagate row data until next date is encounteredHi Harry, when you're on TD13.10 you can use EXPAND ON: SELECT name, BEGIN(pd2) AS newdate, amt FROM ( SELECT name, datecol, amt, PERIOD(datecol, COALE...
219323 Aug 2013 @ 12:42 PDTDatabaseReplyLocking Within Stored ProcedureI don't know why it doesn't work as expected, but you should check if t's possible to change your code to get rid of the BT/ET:  BEGIN REQUEST; SELECT col2 FROM table1 WHERE col...
219223 Aug 2013 @ 12:34 PDTDatabaseReplyRefreshing View?Do a SHOW QUALIFIED SELECT * FROM view and you'll see what source code actually stored.   Dieter
219123 Aug 2013 @ 12:33 PDTDatabaseReplyvolatile table as select..with data - not loading dataDid you read the thread? Just add ON COMMIT PRESERVE ROWS, as the default is ON COMMIT DELETE ROWS.   Dieter
219022 Aug 2013 @ 01:04 PDTDatabaseReplyCASE Statement -- CASE <expression>Hi Jackson, i really don't understand what you actually want. What data is in your column and what data should be reruned by the CASE? '0' replaced by blanks? CASE WHEN columA = ...
218922 Aug 2013 @ 09:24 PDTDatabaseReplyDistinct in Case clauseCould you format your data, it's not readable.   Dieter
218822 Aug 2013 @ 08:17 PDTDatabaseReplyQUERY REWRITEDON'T SHOUT!!! No, there's no other way to avoid the product join besides rewriting as a UNION or improving your data model :-)   Dieter
218722 Aug 2013 @ 08:14 PDTGeneralReplyNeed a function in Teradata which accepts a string and returns a integer listWhich TD release is running on your system? In TD14 there's a built-in STRTOK_SPLIT_TO_TABLE...   Dieter
218622 Aug 2013 @ 08:12 PDTDatabaseReplyRefreshing View?This is Standard SQL behaviour. The columns returned by a view are resolved when the view is created. A SELECT * represents the existing columns at that point in time.   Dieter
218522 Aug 2013 @ 08:10 PDTDatabaseReplyIF/THEN Statement not working (Stored Procedure)Posting a MySQL error message in a Teradata forum is probably not the right place :-) Dieter
218422 Aug 2013 @ 08:03 PDTDatabaseReplyDistinct in Case clause  count(distinct case when Sales_Trx_Tm time < '12:00:00' then Sales_Trx_Tm end) Dieter  
218321 Aug 2013 @ 01:14 PDTDatabaseReplyWeekday and Time functionThere's no built-in function for weekday, but besides a calendar you might do a simple calculation, e.g. this will return monday as 1: REPLACE FUNCTION day_of_week(cdate DATE) RETURNS BYTEIN...
218221 Aug 2013 @ 06:05 PDTDatabaseReplyCollecting statisticsAre the estimated numbers close to the actual ones? How many nodes does your system have? What statistics exist? -> HELP STATS tablename What are the PIs of your tables?   Dieter
218121 Aug 2013 @ 04:34 PDTGeneralReplyUpdate statement with recursive functionThis will not work because the 2nd update will also find the first 'the'. If this is a one time update you can only replace 'the' with an expression which doesn't exist in Colu...
218021 Aug 2013 @ 03:54 PDTDatabaseReplyConverting CONNECT_BY_ROOT function in Oracle to TeradataHi Ajay, CONNECT_BY_ROOT is usually the same as a column from the seed query. There's an old article on IBM's DeveloperWork showing how to port from CONNECT BY to WITH RECURSIVE, most can...
217921 Aug 2013 @ 03:37 PDTDatabaseReplyDisctribution of rows in Fall back AMPs  Hi Mahesh, you'll find all Teradata manuals at http://www.info.teradata.com Database Design Or better get the full set: Teradata 14.10 User Documentation CD-ROM No need to reg...

Pages