#DateForumTypeThreadPost
15518 Jun 2007 @ 06:37 PDTDatabaseReplyError when trying to leave a while loopWhen a rollback happens, any open cursors gets automatically closed. In your caseCLOSE weeks_to_arc_cursor;fails after the transaction abort, because it's already closed as part of the rollback.
15415 Jun 2007 @ 05:55 PDTDatabaseReplyDate validation in TeradataI cannot recall the names of the wise guy who suggested this idea, but with due credit to that genius, this is the technique that you can use.SELECT T.* FROMMYTABLE TINNER JOINSYS_CALENDAR.CALENDAR...
15315 Jun 2007 @ 05:37 PDTDatabaseReplyDifference Between Cylinder Migrate and Cylinder SplitWhen the Cylinder is full, TD would first try to do a Defragmentation. Which means it will try to move all free blocks to the bottom of the cylinder. with some luck these contiguous free blocks ca...
15214 Jun 2007 @ 11:18 PDTToolsReplyConnect two different teradata box and retreive dataThe short answer is that you can't do a query across two TD servers.Now the long answer is, I have seen folks using MS-Access kind of utilities to do that sort of thing, but mind that these utiliti...
15114 Jun 2007 @ 11:12 PDTDatabaseReplyMax Row Lenghthit's sort of like how our 80GB laptop hard drive in fact is 74.5 GB
15014 Jun 2007 @ 02:40 PDTDatabaseReplyMax Row LenghthLOBs are never stored as part of the physical row of the data subtable, but are implemented as LOB subtables. So there will be a LOB subtable for each LOB column in the table.The primary data row i...
14914 Jun 2007 @ 12:23 PDTToolsReplyQueryman Paramaterized QueriesI would wonder if it's an issue with some particular version of Queryman, it does work fine (don't prompt again) with 7.1 for me...
14814 Jun 2007 @ 12:20 PDTDatabaseReplyMS Word document as LOBWord documents would go in as BLOB.While I haven't tried with BLOBs, I haven't had any issues with using SQL assistant with CLOBs, as long as I turn on the "Use native large object support" in the ...
14713 Jun 2007 @ 11:16 PDTDatabaseReplyall proc definitionsYou will have to use SHOW PROCEDURE ; to get stored procedure definition. This is because SPs are internally stored by TD as a kind of system tables. (That's why you can't create an SP on a DB with...
14613 Jun 2007 @ 11:09 PDTToolsReplyGenerate Fastload script from FastexportFastexport is capable of generating only a multiload script, as you mentioned.You might find it easier to do an ARCHIVE and COPY using arcmain if you are looking to make a copy of the table as such...
14513 Jun 2007 @ 07:15 PDTDatabaseReplyAlter Datatype for a columnYou can look up the table listed under the heading "Rules for Changing the Data Type for a Column" in the Data Definition Statements Manual.
14413 Jun 2007 @ 06:42 PDTAnalyticsReplyPre-Fixed the DateI haven't tested the syntax, but I think this would do the job. ( Assuming Date_2 is between Date_1 and Date_4 )SELECT 100 * SUM(CASE WHEN T1.DATECOL BETWEEN DATE_1 AND DATE_2 THEN T1.PURCHA...
14313 Jun 2007 @ 06:11 PDTAnalyticsReplyPre-Fixed the DateNot sure I got your question,Is this something that you are looking for ?SELECT T1.* FROM MYTABLE1 T1, MYTABLE2 T2, DATELOOKUP D1WHERE D1.DATENME = 'Date1' AND T1.BILLDATE = D1.DATEVAL AND T1.BIL...
14213 Jun 2007 @ 04:39 PDTAnalyticsReplyPre-Fixed the DateTricky, but possible.Sel X1 ,X2 ,X3. . . .From MyTable,(SELECT MAX(CASE DATENME WHEN 'Date_1' THEN DATEVAL ELSE NULL END) , MAX(CASE DATENME WHEN 'Date_2' THEN DATEVAL ELSE NULL END) FROM DATEL...
14113 Jun 2007 @ 04:05 PDTAnalyticsReplyPre-Fixed the DateI think you will have to use a table driven approach for this ....One option I can think of is to create a lookup table like this ...CREATE TABLE DATELOOKUP( DATENME VARCHAR(30) NOT NULL, DATEVAL...
14013 Jun 2007 @ 02:45 PDTAnalyticsReplyPre-Fixed the DateI wonder if you are talking about NAMED say like ...SELECT 7*10 (NAMED X01), X01 + 12 (NAMED X02), X01+X02 TOTAL
13913 Jun 2007 @ 01:58 PDTAnalyticsReplyRegression: Predict Next ValueIs this the actual query ? I see a few syntax issues (like no tablename given after the from in the inner query - derived table, there's a comma after the derived table name, etc ...)Anyways, here'...
13813 Jun 2007 @ 12:31 PDTAnalyticsReplyRegression: Predict Next ValueThere are functions already available to do that .......to give a sample ...SELECT X, A*X + C YFROM(SELECT REGR_SLOPE(Y, X) A, REGR_INTERCEPT(Y, X) CFROM REGRESSIONDATA) REGRVALS(A, C), REGRES...
13712 Jun 2007 @ 02:06 PDTConnectivityReplyPassing XML modeled string into a teradata macro (similar to OPENXML in SQL Server)Check out this.http://www.teradata.com/t/go.aspx/index.html?id=123796Though I believe it's not up to date, there were some work done in the beginning of the year. As I mentioned, your NCR support g...
13612 Jun 2007 @ 01:43 PDTConnectivityReplyPassing XML modeled string into a teradata macro (similar to OPENXML in SQL Server)Teradata had developed a package of sophisticated UDFs to do XML parsing and related stuff some time this year. While I don't have specific details, you may want to get in touch with your Teradata ...
13512 Jun 2007 @ 12:41 PDTUDAReplypROBLEM WITH TIMESTAMPYou need to first find out what is the format of data in the varchar columns, then use appropriate format clause while inserting into timestamp column. If you can post your data format, we might be...
13411 Jun 2007 @ 01:32 PDTDatabaseReplyrelation between spool space and collect stats?Collecting statistics doesn't reduce spool space on it's own. It helps optimizer to make "better" decisions. which might often lead to reduced spool space usage. (For example it might decided to du...
13309 Jun 2007 @ 11:56 PDTUDAReplyHow to get ASCII Value of CharacterOops you are right, it doesn't work for certain character values because of non integers in the o/p ... my bad ! :-)
13208 Jun 2007 @ 02:50 PDTUDAReplyHow to get ASCII Value of CharacterAssuming we are in the ASCII limit (0-256)SELECT COL1, ((CHAR2HEXINT(COL1) (INTEGER) (NAMED HVAL))/100*16*16 + (HVAL MOD 100)/10 * 16 + (HVAL MOD 10)) AS ASCIIVALFROM MYTABLE ;
13108 Jun 2007 @ 01:53 PDTUDAReplyreading a hexadecimal as charYou would have to first find out what is the exact format of the record. whether the characters are represented using ASCII or EBCIDIC , whether there are null indicators for the field etc, etc ......

Pages