#DateForumTypeThreadPost
17318 Nov 2008 @ 04:32 PSTUDAReplyIs INSTR type function available in Teradata...Hello,This can be done in three ways, which are as follows:- Write custom UDF which returns number of occurences within a string- Use UDF INSTR from http://www.teradata.com/DownloadCenter/Topic9228...
17218 Nov 2008 @ 04:27 PSTUDAReplyARRAY Structure in Teradata Stored ProcedureHello,No, built-in there is no object for arrays, but as Dieter suggested, it can be done using temporary tables.Regards,Adeel
17116 Nov 2008 @ 11:10 PSTToolsReplyHow to Bteq RUN FILE from windowsHello,Have a look at link below:http://www.teradata.com/teradataforum/Topic11431-11-1.aspxHTH.Regards,Adeel
17012 Nov 2008 @ 07:37 PSTAnalyticsReplyBad character in format or dataHello,Can you give an example?Regards,Adeel
16912 Nov 2008 @ 03:51 PSTAnalyticsReplyTranslate Oracle Syntax to TeradataHello,Following is your solution, next time try doing it yourself, and ask what issue you are facing, not for the solution itself:DROP TABLE table1;CREATE VOLATILE TABLE Table1 (Pay_Period_Num INT,...
16812 Nov 2008 @ 03:06 PSTDatabaseReplyConvert string 13/10/1974 into 13-10-1974 formatHello,Following examples can be used to solve most of the issues you mentioned:SELECT CAST('13/10/1974' AS DATE FORMAT'DD-MM-YYYY');SELECT CAST(CAST('14/July/1974' AS DATE FORMAT'DD/MMMM/YYYY') AS ...
16712 Nov 2008 @ 02:52 PSTDatabaseReplyPPI on varchar or char field: Possible?Hello,It can also be done on non-numeric fields such as date but "if the data type for the result of partitioning_expression is not INTEGER, then the system implicitly casts the value to the INTEGE...
16612 Nov 2008 @ 02:42 PSTToolsReplymask part of a numeric fieldHello,What I understood, following should be helpful:SELECT CAST('1234567890' AS VARCHAR(10)) AS A, LENGTH(A) AS B, SUBSTR(A, 1, B - 4) || 'xxxx';Regards,Adeel
16511 Nov 2008 @ 07:05 PSTAnalyticsReplyDynamic Cursor ForUnfortunately, I do know SELECT cannot be used with CALL. They are the keywords to be searched for. Because dynamic SQL is to be used for that, and for dynamic sql you have to use a stored-procedur...
16411 Nov 2008 @ 06:16 PSTTrainingReplytimestamp conversionHello,There is no builtin way of doing it, but you can surely do this by using SQL or a UDF.Regards,Adeel
16311 Nov 2008 @ 06:00 PSTAnalyticsReplyRemove '-' from a columnWell for two "-", you can use following:SELECTB AS PhoneNumberFROM(SELECTSUBSTR('111-222-333', 1, INDEX('111-222-333', '-') - 1) || SUBSTR('111-222-333', INDEX('111-222-333', '-') + 1) AS A,SUBSTR(...
16211 Nov 2008 @ 05:47 PSTDatabaseReplyone column, of string data type, having different date formates, how to transforms it to one formateYou can get Oracle UDFs for Teradata from:http://www.teradata.com/DownloadCenter/Topic9228-137-1.aspxHTH.Regards,Adeel
16111 Nov 2008 @ 05:46 PSTDatabaseReplyone column, of string data type, having different date formates, how to transforms it to one formateHello,I remember such question being asked couple days back...but wasn't able to find it.Once again the same answer is: Your best option will be to implement a UDF or get the is_date or to_date UDF...
16011 Nov 2008 @ 05:43 PSTAnalyticsReplyDynamic Cursor ForHello,Search the forum and documentation for dynamic sql or DBC.SysEXECSQL.Regards,Adeel
15911 Nov 2008 @ 05:40 PSTAnalyticsReplyRemove '-' from a columnHello,You can use SUBSTR and concatenation to get the desired output. Example:SELECT SUBSTR('111-222-333', 1, 3) || SUBSTR('111-222-333', 5, 3) || SUBSTR('111-222-333', 9, 3);Output: 111222333HTH.R...
15810 Nov 2008 @ 05:34 PSTDatabaseReplyincrease size of teraData databaseThanks for the ultra-trimmed output, but its of no use unless it is exact output of the query...without trimming offcourse!
15710 Nov 2008 @ 05:10 PSTDatabaseReplyincrease size of teraData databaseHello,Can you please execute the following query on your teradata system and reply back with the output?SELECT databasename , SUM ((((MaxPerm) / 1024) /1024) / 1024) AS Maximum_Space_GB , SUM...
15610 Nov 2008 @ 12:08 PSTDatabaseReplytaraData substring functionHello,Do you know the names of all the cities which may be present in the data?Regards,Adeel
15522 Oct 2008 @ 12:26 PDTDatabaseReplyHow to Wait, Pause or SleepFor such case you dont need to have sleep functionality, i'll suggest you to have a timestamp parameter for the SP and in the recursive call simply add 1 second to it or add 0.000001 second to it (...
15421 Oct 2008 @ 11:51 PDTDatabaseReplyHow to Wait, Pause or SleepCan you also provide the part of SP code in which you are inserting a row?
15321 Oct 2008 @ 11:50 PDTDatabaseReplyHow to Wait, Pause or Sleepcouple of questions...one from where SPs are being called, some sort of front-end application or bteq etc? second why UDFs are not supported/recommended....this one is for my knowledge.Regards,Adeel
15221 Oct 2008 @ 11:15 PDTDatabaseReplyHow to Wait, Pause or SleepHello,You can also try UDF with a sleep function in it.But again, whats the purpose for such activity?Regards,Adeel
15113 Oct 2008 @ 11:47 PDTDatabaseReplyevaluate expressionHello,Perhaps, you can use dynamic SQL for this or you can use CASE statement and check for variable value and perform the task.Regards,Adeel
15010 Oct 2008 @ 06:09 PDTDatabaseReplyUpdate command error 3706Hello,Please put AND or OR in the WHERE clause expressions.E.g.SELECT * FROM TABLE1WHERE Col1 = 1 AND Col2 = 2 AND Col3 <> 4 OR Col4 <> 5;HTH!Regards,Adeel
14908 Oct 2008 @ 03:51 PDTConnectivityReplyCreate UDF with SQL codeHello,Till Teradata 12 SQL can not be used in user defined functions. Perhaps, it will be available in later versions.Regards,Adeel

Pages