#DateForumTypeThreadPost
7514 Jul 2008 @ 08:58 PDTAnalyticsReplyI want to extract number from StringSimple way assuming all numbers are preceded by _ or _s:select case when substr(col_1, index(col_1 '_') +1, character_length(col_1)) from mytableunionselect case when substr(col_1, index(col_1 '_s'...
7411 Jul 2008 @ 08:13 PDTDatabaseReplyVERTICAL STRING CONCATENATIONRecursive SQL is your best option and you can search this forum for many examples.Also, you could use Informatica to handle it, or write a stored procedure with a cursor.
7307 Jul 2008 @ 10:00 PDTUDAReplydatatype checkThis might be one wayinsert into foo select case when type(my_col) = 'FLOAT' then my_col else null end from my_table;
7203 Jul 2008 @ 11:46 PDTToolsReplyConnectivity to bteq through Perl ScriptHere are your free choices:1. Use the open source from CPAN http://search.cpan.org/~grommel/Teradata-SQL-0.05/SQL.pm2. Write your own by piping to BTEQ. Something like: open("BFH","|bteq") ||...
7101 Jul 2008 @ 03:58 PDTAnalyticsReplyCounting the number of occurrences of a character within a character stringThree ways I can think of:1. Write an UDF to evaluate2. Write a SP to count them like you would in UDF3. Use recursive SQL to iterate through each character and insert the character into a table. ...
7027 Jun 2008 @ 03:50 PDTUDAReplyHow does teradata's db modeling style differ from the rest?Your question is pretty broad. In a nutshell Teradata is massively parallel and linearly scalable.Suggest you read this paper on reasons why to use Teradata.http://www.teradata.com/t/pdf.aspx?a=836...
6927 Jun 2008 @ 08:52 PDTToolsReplyBTEQ - interactive vs. batch mode - ssh access to windows workstationYes - but you can't open a Windows window from cygwin. So, the interactive logon never appears.
6827 Jun 2008 @ 08:33 PDTDatabaseReplyIs there a way to know if a table is being modified?For real-time you can use PMON, but the odds are you will never get the permission to use it! PMON will let you see what step an sql statement is in.There are also several audit tables you can use...
6727 Jun 2008 @ 08:23 PDTToolsReplyBTEQ - interactive vs. batch mode - ssh access to windows workstationDon't forget that cygwin is a linux emulator. The bteq for windows is compiled to run interactivley if no logon is provided. I find that providing the login in a file and use the .run file command...
6626 Jun 2008 @ 02:53 PDTDatabaseReplyAdding time feildsUse INTERVALselect cast('05:50:31' as interval hour to second) + cast('01:12:30' as interval hour to second)result 7:03:01.000000
6526 Jun 2008 @ 02:49 PDTDatabaseReplyHow does the function 'not in' perform with a column has null valueyou should always use WHERE COL IS NOT NULL in the sub-select when doing a NOT IN. NULLs are unknown data so NOT IN(select * from foo) will return nothing if there are nulls in the sub-select resul...
6426 Jun 2008 @ 02:38 PDTUDAReplyTeradata as active dataware house?Teradata is most certainly an Active Dataware House. Teradata coined the phrase. Read this link http://www.teradata.com/t/page/148873/
6328 Apr 2008 @ 10:28 PDTDatabaseReplyRecursive viewI am not sure why this rule is enforced. You can work around it by capturing the results of the recursive view into a new table and then using a view (recursive or regular) on that table.
6225 Apr 2008 @ 08:02 PDTDatabaseReplyRecursive viewCORRECTIONHere is an example of a recursive view. Once you create the view you can insert FROM the view to a table.-- create a test tableCREATE SET TABLE foo (myname VARCHAR(100),id integer)PRIMARY...
6125 Apr 2008 @ 07:56 PDTDatabaseReplyRecursive viewHere is an example of a recursive view. Once you create the view you can insert FROM the view to a table.-- create a test tableCREATE SET TABLE foo (myname VARCHAR(100),id integer)PRIMARY INDEX ( ...
6024 Apr 2008 @ 11:02 PDTDatabaseReplyRecursive viewLook in the Teradata Message manual. You have a with within a recursive with.
5904 Mar 2008 @ 09:28 PSTUDAReplyDate rangeworks for me. Are you sure your table has data for the range given?
5804 Mar 2008 @ 08:39 PSTDatabaseReplyIdentity column not allowed in a Join Indexin my doc SQL reference chapter 3 page 548: An identity column may not be part of any of the following types of index: .... Join index etc
5704 Mar 2008 @ 08:23 PSTDatabaseReplyutl_file in ORACLEthese are stored procedure functions. Teradata does not support displaying values from within a stored procedure (except for the output parameters). You can insert into a work table to capture out...
5604 Mar 2008 @ 08:20 PSTDatabaseReplyCollect statscollect statistics on mytable column(col1, col2);
5522 Feb 2008 @ 12:15 PSTAnalyticsReplyconversion of oracle code into TeradataHow much will you pay me? ;)
5421 Feb 2008 @ 02:25 PSTDatabaseReplyINDENTIFY GLOBAL TEMPORARY TABLESYou can use select * from AllTempTables but this is only materialized tables. You can use select * from dbc.temptables if you have access.
5321 Feb 2008 @ 02:11 PSTAnalyticsReplyconversion of oracle code into TeradataYou need to use FastExport for large extracts. If your extract is small you can use BTEQ or SQL Assistant.Since you are using parameters you would have to place them in a file that could be read b...
5214 Feb 2008 @ 11:50 PSTAnalyticsReplySelect wholly number values from a varchar columnUse an UDF to create an Is_Numeric() function. http://www.teradata.com/t/go.aspx/index.html?id=130959
5111 Feb 2008 @ 09:30 PSTDatabaseReplyTranspose a Table, Using possible nested select statements, Working in SQL-Server But won't work in Teradataactually the sum would go around the entire case

Pages