#DateForumTypeThreadPost
5011 Feb 2008 @ 09:26 PSTDatabaseReplyTranspose a Table, Using possible nested select statements, Working in SQL-Server But won't work in Teradatais this what you need? added SUM, so you end up with one row per yearselect year, case when (quarter = 1 and q.year = year ) then (sum(coalesce(qtrsales,0))) else 0 end as Q1, case when (quarter = ...
4907 Feb 2008 @ 09:58 PSTDatabaseReplyVerifying timestamp and integer datatypesYou can create a user defined function if you are running V2R6. Teradata provides source code for this - search this site for UDF Oracle.Otherwise you have to check the entire string. select * fro...
4807 Feb 2008 @ 09:48 PSTUDAReplyDATA CONVERSION (%)Looks like something is casting as integer. You must have left something out of the code you included - calculating a percent would result in .58 and not 58.0. Are you multiplying by 100? If so b...
4715 Jan 2008 @ 08:41 PSTToolsReplysql assistant menu corruptionsadly, a search of my hard drive does not find this file. I guess I will reinstall.
4610 Jan 2008 @ 07:44 PSTToolsTopicsql assistant menu corruptionRecently my SQL Assistant menus have reverted to abbreviations. I've tried reseting these using tools custom reset. All this does is caused SQL ***. to crash. Short of reinstalling does anybody k...
4502 Nov 2007 @ 02:11 PDTAnalyticsTopicspool variation questionI am comparing two queries for performance. Version "A" is the old one and version "B" is new and improved.I've run version "A" 10 times and version "B" ten times. All the runs from version "A" ar...
4412 Oct 2007 @ 07:41 PDTDatabaseReplyFind position of a substringYou can also use recursive SQL if you are on V2R6. Search this forum for RECURSIVE.Good luck!
4306 Jul 2007 @ 08:56 PDTUDAReplyFast/Multi Load & Control CharactersIn the ideal world there would never be delimiters or control (unprintable) characters imbedded in your data. Since we live in the real world you have to deal with this issue. As already stated y...
4206 Jul 2007 @ 08:08 PDTUDAReplyCASE StatementI'd guess you need to parenthesis the nested case statements and the coalesce. example:select case when foo is not null then ( case when bar ='x' then ( case when blah=1 then ...
4105 Jul 2007 @ 07:23 PDTDatabaseReplyTeradata stored procedure compilation:- Warning: 5527 Stored Procedure Created with Warnings.I believe these are just warnings "table does not exist". This shouldn't stop the SP from compiling. Try dropping the SP and then creating it and see if it works that way.
4005 Jul 2007 @ 01:02 PDTDatabaseReplyUsing the 'Right' Keyword in a query?RIGHT and LEFT are keywords for joing tables not for substrings. You may have a UDF installed on your system that also defines string functions. As far as I know there is not a Teradata defined f...
3905 Jul 2007 @ 12:46 PDTToolsReplyDate conversionselect cast(calendar_date as date format 'yyyymmdd') (char(8)) from sys_calendar.calendar where calendar_date=date
3813 Apr 2007 @ 09:11 PDTToolsReplyneed to Compare header date in file 1 with system date in file 2abort 'Dates do not match' where date not in (select other_date from mytable);
3707 Apr 2007 @ 09:35 PDTUDAReplybteqhere's a hack...http://www.teradata.com/teradataForum/shwmessage.aspx?forumid=1&messageid=5621#bm5689
3606 Apr 2007 @ 08:43 PDTDatabaseReplySelecting the previuos row in a table.you can try somthing along the lines of emulating the lag function. It would be more or less along the lines of this example:select * from foo a,(select acct_num, product_code, start_date, max(st...
3516 Feb 2007 @ 12:46 PSTToolsReplynew line characterIf you are using V2R6 then you can use the "WITH RECURSIVE" clause to update the character.Other option is to process the data in a file using perl or awk.
3407 Feb 2007 @ 08:23 PSTUDAReplyDrop Table "if exists"You could set ignore and then drop, then reset the level:.set maxerror 0;.set errorlevel 3807 severity 0;drop table foo;.set errorlevel 3807 severity 8;
3331 Oct 2006 @ 02:45 PSTToolsReplyViewing Fastload ErrorsThat's as close as you can get - unless you want to write a program that will convert binary values to ascii. I've done it before but it's an ugly time-consuming process.
3231 Oct 2006 @ 10:41 PSTToolsReplyViewing Fastload ErrorsIf you use SQL Assistant you can browse the records. SQL Assistant will place the data-parcel in a text file and open it when you click the data-parcel button. At least it does with the version w...
3130 Oct 2006 @ 01:57 PSTToolsReplyfastload: Ignoring Quote while importingAre you using Unix? If so then you can strip out the single quotes before the fastload is started. This example assumes you do NOT have quotes in the data itself. The original file is renamed myf...
3030 Oct 2006 @ 11:36 PSTUDAReplyGetting bteq to just return the resultLike the man said no can do, but here's one option you might try. Granted this is a hack but it avoids exporting. The perl ditty reads the stdout and prints just the value after the pattern you p...
2924 Oct 2006 @ 04:33 PDTDatabaseReplyUsing Sample Function.If you are using Unix this would be very simple using the HEREDOC form. For some reason the web-site is striping out some characters in the example - so where you see the two > signs as in >>EOF r...
2824 Oct 2006 @ 04:19 PDTConnectivityReplyPerl access from Linux (32 and 64) and solaris to TeradataNo idea -but I found this thread on the teradataforum.com. Maybe this will help you:http://www.teradataforum.com/teradata/20050510_212940.htm
2724 Oct 2006 @ 10:47 PDTTrainingReplyPublicly available Teradata Material (Other than Coffingdw n Teradata SiteI gave it a very quick glance - it appears to be current albeit brief. You other options are to slog through the NCR manuals http://www.info.ncr.com or try to find a copy of Coffing on Ebay.
2623 Oct 2006 @ 12:06 PDTDatabaseTopicRoundHalfwayMagUpWe are considering changing this system setting to TRUE in a new financial data-warehouse. Are there any known issues setting this to TRUE? I don't need a discussion on the benefits etc....I just ...

Pages