#DateForumTypeThreadPost
1804 Jun 2009 @ 05:16 PDTDatabaseReplyRounding Down in TeradataI like this way better...CREATE VOLATILE TABLE Table1 (Col1 DECIMAL(10,5)) ON COMMIT PRESERVE ROWS;INSERT Table1 (0.96);INSERT Table1 (1.56);SELECT Col1, CAST((col1-0.5) AS INTEGER) as answerFROM...
1701 Jun 2009 @ 03:34 PDTDatabaseReplyQuery NeededWould it be any fun at all if someone were to do all your work for you?Try using something similar to SELECT TOP 10 ___ FROM ___ ORDER BY yoursizevalue DESC
1626 May 2009 @ 03:40 PDTDatabaseReplyHierarchical Query - Help RequiredHi. I had similar concerns. Check the end of this thread for solution:http://www.teradata.com/teradataforum/Topic15130-9-1.aspx
1508 May 2009 @ 06:15 PDTDatabaseReplyFor loop problem"On commit preserve rows" version executed without error... Unfortunately, it still yields an empty result set when selecting from either table1 or table2.Attempting to add Begin Transaction after ...
1408 May 2009 @ 11:59 PDTDatabaseReplyFor loop problemFiddled with it some and now no error, but also no records in Test2... CREATE VOLATILE TABLE Test1(location_id INTEGER);CREATE VOLATILE TABLE Test2(location_id INTEGER);INSERT INTO Test1 VALUES(100...
1308 May 2009 @ 11:42 PDTDatabaseReplyFor loop problemI had to leave out some of my code above in order for the forum to accept my post. That's why there are missing semi-colons in my example. Once I put those back in, I get the follow error: "3707...
1207 May 2009 @ 10:25 PDTDatabaseTopicFor loop problemHello there. I'm trying unsuccessfully to use a for loop. Can anyone offer insight as to why this doesn't work?CREATE VOLATILE TABLE PFM_TD_User.Test1(location_id INTEGER)INSERT INTO PFM_TD_User...
1101 May 2009 @ 02:55 PDTDatabaseReplyRecursion in a stored procedureWow! You've been immensely helpful... Thanks.
1001 May 2009 @ 01:02 PDTDatabaseReplyRecursion in a stored procedureDieter. Thanks again. You're query is working well and I adapted it successfully to a recursive view. One glitch, however... The results are shown with the lvl field starting from the top going ...
901 May 2009 @ 08:52 PDTDatabaseReplyRecursion in a stored procedureThanks Dieter. It looks like you're getting the results I'm after except the lvl field now has strange values. I will study your "Transitive Closure" query.
830 Apr 2009 @ 05:41 PDTDatabaseReplyRecursion in a stored procedureAs I haven't available permissions to use your table, can we create one and work from there?CREATE SET TABLE TEST_RTIDB.hierarchy ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, CHE...
724 Apr 2009 @ 03:59 PDTDatabaseReplyRecursion in a stored procedure: ( Didn't work. Tried your code with using Find/Replace to substitute my object names. It returned only the direct children -which is the same result as selecting directly from the source ta...
624 Apr 2009 @ 11:02 PDTDatabaseReplyRecursion in a stored procedureExciting! Thank you, Dieter. I will have to experiment with that.
523 Apr 2009 @ 06:08 PDTDatabaseReplyRecursion in a stored procedureI do not have select with grant access to DBC.databases...Which of the following does your "SELECT * FROM Database_Hierarchy WHERE OwnerName = 'dbc'; " return?a) direct children of 'dbc'b) all chil...
423 Apr 2009 @ 12:52 PDTDatabaseReplyRecursion in a stored procedure>>> Of course you can use WITH RECURSIVE in SPs, but only TD12 allows a SP to return a result set.Really?For this code:CREATE PROCEDURE TEST_RPT_OBJECTS.usp_jw_test( p_org_entity_id integ...
317 Apr 2009 @ 04:42 PDTDatabaseReplyplz help me to solve this query.Not sure if there's an easier way... but this is how I'd do it. (Replace table name with yours) SELECT 'dead_bal' as subject, SUM(CASE WHEN system = 'cc2' THEN dead_bal END) as cc2_bal, ...
217 Apr 2009 @ 04:19 PDTDatabaseReplyHow to install Teradata client and utilities on windows????These are prerequisites for the ODBC or OleDb Driver so do these first:GSS- Teradata Generic Security Services - ClientICU-Shared ICU library for TeradataThen your ODBC driver.Then Teradata Sql Ass...
117 Apr 2009 @ 03:04 PDTDatabaseTopicRecursion in a stored procedureHello. Our organization is transitioning from an Oracle system where we had numerous stored procs that accepted a p_employee_id parameter, then recursively queried a hierarchy table to find all em...