173 | 18 Nov 2008 @ 04:32 PST | UDA | Reply | Is 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... |
172 | 18 Nov 2008 @ 04:27 PST | UDA | Reply | ARRAY Structure in Teradata Stored Procedure | Hello,No, built-in there is no object for arrays, but as Dieter suggested, it can be done using temporary tables.Regards,Adeel |
171 | 16 Nov 2008 @ 11:10 PST | Tools | Reply | How to Bteq RUN FILE from windows | Hello,Have a look at link below:http://www.teradata.com/teradataforum/Topic11431-11-1.aspxHTH.Regards,Adeel |
170 | 12 Nov 2008 @ 07:37 PST | Analytics | Reply | Bad character in format or data | Hello,Can you give an example?Regards,Adeel |
169 | 12 Nov 2008 @ 03:51 PST | Analytics | Reply | Translate Oracle Syntax to Teradata | Hello,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,... |
168 | 12 Nov 2008 @ 03:06 PST | Database | Reply | Convert string 13/10/1974 into 13-10-1974 format | Hello,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 ... |
167 | 12 Nov 2008 @ 02:52 PST | Database | Reply | PPI 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... |
166 | 12 Nov 2008 @ 02:42 PST | Tools | Reply | mask part of a numeric field | Hello,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 |
165 | 11 Nov 2008 @ 07:05 PST | Analytics | Reply | Dynamic Cursor For | Unfortunately, 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... |
164 | 11 Nov 2008 @ 06:16 PST | Training | Reply | timestamp conversion | Hello,There is no builtin way of doing it, but you can surely do this by using SQL or a UDF.Regards,Adeel |
163 | 11 Nov 2008 @ 06:00 PST | Analytics | Reply | Remove '-' from a column | Well 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(... |
162 | 11 Nov 2008 @ 05:47 PST | Database | Reply | one column, of string data type, having different date formates, how to transforms it to one formate | You can get Oracle UDFs for Teradata from:http://www.teradata.com/DownloadCenter/Topic9228-137-1.aspxHTH.Regards,Adeel |
161 | 11 Nov 2008 @ 05:46 PST | Database | Reply | one column, of string data type, having different date formates, how to transforms it to one formate | Hello,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... |
160 | 11 Nov 2008 @ 05:43 PST | Analytics | Reply | Dynamic Cursor For | Hello,Search the forum and documentation for dynamic sql or DBC.SysEXECSQL.Regards,Adeel |
159 | 11 Nov 2008 @ 05:40 PST | Analytics | Reply | Remove '-' from a column | Hello,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... |
158 | 10 Nov 2008 @ 05:34 PST | Database | Reply | increase size of teraData database | Thanks for the ultra-trimmed output, but its of no use unless it is exact output of the query...without trimming offcourse! |
157 | 10 Nov 2008 @ 05:10 PST | Database | Reply | increase size of teraData database | Hello,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... |
156 | 10 Nov 2008 @ 12:08 PST | Database | Reply | taraData substring function | Hello,Do you know the names of all the cities which may be present in the data?Regards,Adeel |
155 | 22 Oct 2008 @ 12:26 PDT | Database | Reply | How to Wait, Pause or Sleep | For 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 (... |
154 | 21 Oct 2008 @ 11:51 PDT | Database | Reply | How to Wait, Pause or Sleep | Can you also provide the part of SP code in which you are inserting a row? |
153 | 21 Oct 2008 @ 11:50 PDT | Database | Reply | How to Wait, Pause or Sleep | couple 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 |
152 | 21 Oct 2008 @ 11:15 PDT | Database | Reply | How to Wait, Pause or Sleep | Hello,You can also try UDF with a sleep function in it.But again, whats the purpose for such activity?Regards,Adeel |
151 | 13 Oct 2008 @ 11:47 PDT | Database | Reply | evaluate expression | Hello,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 |
150 | 10 Oct 2008 @ 06:09 PDT | Database | Reply | Update command error 3706 | Hello,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 |
149 | 08 Oct 2008 @ 03:51 PDT | Connectivity | Reply | Create UDF with SQL code | Hello,Till Teradata 12 SQL can not be used in user defined functions. Perhaps, it will be available in later versions.Regards,Adeel |