653 | 04 Feb 2010 @ 03:33 PST | Database | Reply | ANSI and BTET | Hi Raja,just try to change mode and watch the error message :-)Dieter |
652 | 04 Feb 2010 @ 03:30 PST | Analytics | Reply | Alternate for 'Qualify ' analytical function | "The exact error message is " 3706 : Synatax error : Expected something between 'QUALIFY' and ';'.And our DBA said that QUALIFY is not going to work in our teradata Systems because of some issues."... |
651 | 03 Feb 2010 @ 04:57 PST | Database | Reply | GROUP BY with analytic functions | Hi Krishna,this query uses an old deprecated version of RANK.Rewrite it moving the GROUP BY into a PARTITION BY:SELECT DISTINCT '200812' AS BASE_MONTH, amth.accs_meth_id, amth.accs_meth_type_start_... |
650 | 03 Feb 2010 @ 04:50 PST | Database | Reply | rownum in teradata | How is "latest record" defined on your system?Based on the time of insert, but without a TIMESTAMP column? This will probably fail in most DBMSes.Dieter |
649 | 03 Feb 2010 @ 04:45 PST | Database | Reply | Birthdays | The best algorithm for that checks if the age changed between CURRENT_DATE and CURRENT_DATE + x:WHERE ((CURRENT_DATE (INT)) - (birthdate (INT))) / 10000 <> ((CURRENT_DATE + 7 (INT)) - (birt... |
648 | 03 Feb 2010 @ 04:35 PST | Database | Reply | check for numeric values in a string | Hi Nanda,this only works for characters 'a'..'z', but fails for anything else,e.g. '"§$%&/('The only reliable way is a UDF.Dieter |
647 | 03 Feb 2010 @ 04:31 PST | Database | Reply | ANSI and BTET | Hi Raja,you could logoff after the first part, then specify the new session mode and logon again.But why do you think you need to mix BTET and ANSI in the same batch?IMHO there's nothing you can't ... |
646 | 03 Feb 2010 @ 04:27 PST | Database | Reply | user defined functions | Of course it works, so the actual error code/message would be helpful.You probably got an overloaded function, thus you have to write SHOW SPECIFIC FUNCTION ....Dieter |
645 | 03 Feb 2010 @ 04:21 PST | Analytics | Reply | Quartile fn | Hi adash,there's a QUANTILE function, but it's outdated and should be replaced by ANSI syntax.And the nth region can be calculated using MOD, e.g. for 48 quantiles:SELECT 48 * (RANK() OVER (ORDER ... |
644 | 03 Feb 2010 @ 04:12 PST | Analytics | Reply | Search Test String for Column Values | Hi Bob,your syntax is already close: select text_stringfrom table1where text_string like any (select '%' || trim(empnum) || '%' from table2)But of course this will result in a CROSS JOIN.But the ma... |
643 | 03 Feb 2010 @ 03:58 PST | Analytics | Reply | Getting the sum without using the columns in group by | This is exactly what those GROUP BY-extendens are ment for:SELECT CASE WHEN GROUPING (level_code) = 1 THEN 'Total' ELSE level_code END, SUM(sum_field) FROM level_groups GROUP BY GROUPIN... |
642 | 03 Feb 2010 @ 03:45 PST | Analytics | Reply | Alternate for 'Qualify ' analytical function | Why don't you post the actual error?"is not working" is not very meaningful, but "5478 Aggregates are allowed only with WindowFunctions."You can't mix old-style OLAP functions with aggregates, so s... |
641 | 03 Feb 2010 @ 12:31 PST | Database | Reply | Fast Export - Fast Load issue | Hi Karam,
strange, the scripts use matching layout definitions.
Just a shot in the dark:
Could it be caused by different character set definitions?
Maybe set in a configuration files or as a... |
640 | 03 Feb 2010 @ 02:40 PST | Database | Reply | Fast Export - Fast Load issue | Hi Karam,
i don't see indicator mode in your scripts?
FastExport:
.EXPORT ...
MODE INDICATOR -- default in FastExport
FORMAT FASTLOAD -- default in FastExport
FastLoad:
.BEGIN LOA... |
639 | 22 Jan 2010 @ 01:29 PST | Analytics | Reply | How to identify PPI columns | dbc.indexconstraints contains a CHECK with the partition expression.Dieter |
638 | 08 Jan 2010 @ 08:22 PST | UDA | Reply | need help - list of 'constant' values in a join | Hi Banán,aaah, WAVE, i remember that :-)You can always write me directly, i usually try to answer...Dieter |
637 | 08 Jan 2010 @ 05:08 PST | Database | Reply | Way to deal with procedure in teradata? | Hi Egon,if i understand you correctly, it's easy:DECLARE i INTEGER;SELECT count(*) INTO iFROM tab;Just check the Stored Procedures and the DDL manual, there are lots of examples in it.Dieter |
636 | 08 Jan 2010 @ 05:02 PST | Database | Reply | CSUM ISSUE | Could you please post the actual source code, because both queries are not valid SQL.The different result sets might be correct based on some scoping rules in SQL.Btw, if you remove that deprecated... |
635 | 08 Jan 2010 @ 04:54 PST | Database | Reply | All rows issue | You probably need another cross join to a table containing the different room types followed by a left join to the details:select hotel_id, hotel_date, week_id mth_id, coalesce(cnt,0)from hote... |
634 | 08 Jan 2010 @ 04:46 PST | UDA | Reply | need help - list of 'constant' values in a join | There's a workaround:select *from (select * from (select 1 as b1, 2 as b2) x union all select * from (select 3 as b1, 4 as b2) x ) dt But in your example the join could be easily replaced with a ... |
633 | 08 Jan 2010 @ 04:42 PST | Database | Reply | all-amp and group-amp operations in Explain plan | Check the Database Design manual for details:Chapter 17: Design Issues for Tactical QueriesLocalizing the WorkDieter |
632 | 08 Jan 2010 @ 04:07 PST | Tools | Reply | Case Statement in Fast Export Utility Script | LENGTH is ODBC-SQL syntax, it only works if the "Allow use of ODBC SQL extensions in queries" checkbox in Tools -> Options -> Query is checked.It's always recommended to switch it off, becaus... |
631 | 04 Dec 2009 @ 02:55 PST | Cloud Computing | Reply | TD Express on MacBook Pro | I just tried the 40GB TD13 image and i don't have any problems getting a second IP-address over a WAP2 protected WLAN.
Maybe it depends on some router settings.
Dieter |
630 | 01 Dec 2009 @ 11:39 PST | Database | Reply | Use of BTQ Insert Using with a PACK factor | Not using PACK ;-)
A PACKed group of inserts is processed exactly as a Multistatement Request, i.e. all or nothing.
Dieter |
629 | 22 Nov 2009 @ 04:28 PST | Cloud Computing | Reply | TD Express on MacBook Pro | How did you setup the networking?
Host only: Only your Mac can access the virtual machine.
NAT: You have to define port forwarding (port 1025 for Teradata, some other for Teradata Manager Serve... |