#DateForumTypeThreadPost
13729 Oct 2012 @ 03:08 PDTDatabaseReplyhow to write Year(Date(Days({fn CURDATE()})-32)) in TeradataIf you want to extract year from the date - 32 days then this is the query SELECT EXTRACT(YEAR FROM (CURRENT_DATE - INTERVAL '32' DAY))
13619 Oct 2012 @ 12:22 PDTDatabaseReplyTearadata SQL Help - Very much UrgentHi, I don't  think there is an efficient way of getting what you want as all the tables joined together (OOFERATTRIBUTE, T_PROD_X_OTHER_HIER_PROD, T_PROD_DEF etc) are dependent on each ot...
13519 Oct 2012 @ 03:02 PDTDatabaseReplyTearadata SQL Help - Very much UrgentDid you try the solution which I suggested earlier? What is missing in it?
13418 Oct 2012 @ 04:16 PDTDatabaseReplyTearadata SQL Help - Very much UrgentYou can UNION multiple SELECT statements to transform the results from rows into columns like Considering PROD_LVL_NM is a unique random value generated against each row... SELECT KEY, ROW_NUMB...
13318 Oct 2012 @ 04:08 PDTDatabaseReplyTearadata SQL Help - Very much UrgentWhat is PROD_LVL_NM? Can you share the sample input data and the expected output data to help understand the problem more clearly.
13218 Oct 2012 @ 03:59 PDTGeneralReplyFailure 2646 No more spool space inFor new topics kindly start a new thread!
13118 Oct 2012 @ 03:56 PDTGeneralReplyFailure 2646 No more spool space inYou can output in a csv file and then open it in EXCEL. This could give you a head start, rest you can figure out in the utility manual .logtable log_tbl .logon <hostfileentry>/<usern...
13018 Oct 2012 @ 03:48 PDTAnalyticsReplyPassing parameter in macro/procedureYou can do that for macros. See this link http://forums.teradata.com/forum/database/macro-default-value-0  
12918 Oct 2012 @ 03:30 PDTDatabaseReplyDiff btw hard and soft RIYou get the performance gains while loading or maintaining the tables because in case of child table the database engine doesn't look for the related parent table key rather load the table assu...
12818 Oct 2012 @ 11:58 PDTAnalyticsReplyCase statement returning "Bad character in format or data...."I think I put the condition wrong. When udf_isnumeric() returns 1, does it mean the data is numeric or non-numeric. The code is assuming that return code ZERO represents the NUMERIC content. In th...
12718 Oct 2012 @ 11:42 PDTDatabaseReplyDoes the order of columns matter in SQL statement Hi Jyo, No the sequence of columns doesn't matter as long as they are in the same SQL scope. Your query should run fine. Regards, Qaisar Aftab Kiani.
12618 Oct 2012 @ 07:02 PDTAnalyticsReplyCase statement returning "Bad character in format or data...."You will always get an error if you you are casting a character data into numeric INTEGER/DECIMAL. You should check whether the content is numeric is or not before casting it. I guess your UDF udf...
12518 Oct 2012 @ 03:55 PDTDatabaseReplyDate ConversionHi Mallesh, You can simple check the length of incoming date string and based on that you can concatenate 0 in the start and make the string in a standard format for your rest of the code, like ...
12417 Oct 2012 @ 04:15 PDTAnalyticsReplyCase statement returning "Bad character in format or data...."Ok, I am confused. Which syntax or example you are looking for?
12317 Oct 2012 @ 01:46 PDTAnalyticsReplyCase statement returning "Bad character in format or data...."Seems like the column C_POL contains some characters data and in the case statement where you are casting the column to DECIMAL is causing the error because of the character data. Why don't yo...
12217 Oct 2012 @ 01:40 PDTDatabaseReplyRoles - Profiles Best PracticesRoles are generally used to manage the access rights, while profiles are used to maintain user parameters / environment settings like spool space, account string etc. In your case I think Roles ar...
12116 Oct 2012 @ 01:47 PDTDatabaseReplySQL Help : Left join Queries aborting due to insufficient spool is because the quantity of data that is brought in spool for joining between the two tables is more than the allocated spool space for the user. Mostly th...
12016 Oct 2012 @ 04:09 PDTDatabaseReplysql help: valid indicator for records that are >= 6 monthsThis is one way of solving it... TEST_TBL is the one from which the customer records are selected, and MASTER_TBL contains the final results with indicators! CREATE TABLE MASTER_TBL( ID INTEGE...
11915 Oct 2012 @ 03:00 PDTDatabaseReplySample without duplicatestry this SELECT * FROM TBL QUALIFY ROW_NUMBER() OVER (PARTITION BY COUNTRY_DESC ORDER BY COUNTRY_DESC) = 1 SAMPLE 2
11815 Oct 2012 @ 02:56 PDTDatabaseReplySharing table or view in multiple ODBC ConnectionsThis link should give you a fair idea about both global temporary tables and volatile tables http://forums.teradata.com/forum/database/difference-between-gtt-and-volatile-tables In short the data...
11715 Oct 2012 @ 02:48 PDTDatabaseReplyTeradata calling procedure within a procedureThe procedures can be called within the body of other procedures. But I don't think you can achieve what you are trying to do by nesting the SYSEXECSQL calls. The procedure expects a SQL in th...
11613 Oct 2012 @ 01:42 PDTToolsReplyBTEQ data format question/DATE format issueWould be nice to see a new thread with new questions! Normally data is distributed in spool on the joining columns hash value. The rule of thumb is that for joining the data has to be on the same ...
11512 Oct 2012 @ 06:55 PDTGeneralReplyLogon errors differenceIf your UserID is unlocked and you are still getting 'userid, password or account is invalid', this means you are not logging in with your correct credentials. Reconfirm from DBA that the u...
11412 Oct 2012 @ 02:52 PDTDatabaseReplyWhat is index join confidenceYou see the 'Index Join Confidence' clause when the join condition contains unique undexes...
11310 Oct 2012 @ 12:15 PDTDatabaseReplyRE: Stats collection and PerformanceCollecting stats is a time and resource consuming process so if the columns are not used then you should avoid it. But if the columns are not used in the query then there is no impact on the query ...

Pages