#DateForumTypeThreadPost
65304 Feb 2010 @ 03:33 PSTDatabaseReplyANSI and BTETHi Raja,just try to change mode and watch the error message :-)Dieter
65204 Feb 2010 @ 03:30 PSTAnalyticsReplyAlternate 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."...
65103 Feb 2010 @ 04:57 PSTDatabaseReplyGROUP BY with analytic functionsHi 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_...
65003 Feb 2010 @ 04:50 PSTDatabaseReplyrownum in teradataHow 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
64903 Feb 2010 @ 04:45 PSTDatabaseReplyBirthdaysThe 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...
64803 Feb 2010 @ 04:35 PSTDatabaseReplycheck for numeric values in a stringHi Nanda,this only works for characters 'a'..'z', but fails for anything else,e.g. '"§$%&/('The only reliable way is a UDF.Dieter
64703 Feb 2010 @ 04:31 PSTDatabaseReplyANSI and BTETHi 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 ...
64603 Feb 2010 @ 04:27 PSTDatabaseReplyuser defined functionsOf 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
64503 Feb 2010 @ 04:21 PSTAnalyticsReplyQuartile fnHi 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 ...
64403 Feb 2010 @ 04:12 PSTAnalyticsReplySearch Test String for Column ValuesHi 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...
64303 Feb 2010 @ 03:58 PSTAnalyticsReplyGetting the sum without using the columns in group byThis 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...
64203 Feb 2010 @ 03:45 PSTAnalyticsReplyAlternate for 'Qualify ' analytical functionWhy 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...
64103 Feb 2010 @ 12:31 PSTDatabaseReplyFast Export - Fast Load issueHi 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...
64003 Feb 2010 @ 02:40 PSTDatabaseReplyFast Export - Fast Load issueHi 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...
63922 Jan 2010 @ 01:29 PSTAnalyticsReplyHow to identify PPI columnsdbc.indexconstraints contains a CHECK with the partition expression.Dieter
63808 Jan 2010 @ 08:22 PSTUDAReplyneed help - list of 'constant' values in a joinHi Banán,aaah, WAVE, i remember that :-)You can always write me directly, i usually try to answer...Dieter
63708 Jan 2010 @ 05:08 PSTDatabaseReplyWay 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
63608 Jan 2010 @ 05:02 PSTDatabaseReplyCSUM ISSUECould 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...
63508 Jan 2010 @ 04:54 PSTDatabaseReplyAll rows issueYou 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...
63408 Jan 2010 @ 04:46 PSTUDAReplyneed help - list of 'constant' values in a joinThere'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 ...
63308 Jan 2010 @ 04:42 PSTDatabaseReplyall-amp and group-amp operations in Explain planCheck the Database Design manual for details:Chapter 17: Design Issues for Tactical QueriesLocalizing the WorkDieter
63208 Jan 2010 @ 04:07 PSTToolsReplyCase Statement in Fast Export Utility ScriptLENGTH 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...
63104 Dec 2009 @ 02:55 PSTCloud ComputingReplyTD 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
63001 Dec 2009 @ 11:39 PSTDatabaseReplyUse of BTQ Insert Using with a PACK factorNot using PACK ;-) A PACKed group of inserts is processed exactly as a Multistatement Request, i.e. all or nothing. Dieter
62922 Nov 2009 @ 04:28 PSTCloud ComputingReplyTD 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...

Pages