#DateForumTypeThreadPost
40523 May 2008 @ 01:31 PDTDatabaseReplyTo capture the return code in BTEQAFAIK, errorcodes work with only the actual database errors (like table not found etc), not with bteq errors itself (like file not found...)... but then you can check if the file exists or not in a...
40423 May 2008 @ 01:15 PDTDatabaseReplyConcatenation Of two Strings.......And you can't run a select statement from dynamic sql call... you can however declare a dynamic sql cursor if your are on TD12
40319 May 2008 @ 10:47 PDTToolsReplya simple question about IDENTITYgenerated by always means teradata will insert a value of it's own even if you explicitly specified a value for the identity column in your insert.generated by default on the other hand will genera...
40217 May 2008 @ 03:00 PDTDatabaseReplyTo capture the return code in BTEQyou may want to look up the errorcode and errorlevel variables in bteq manual and explore the ways in which you can use it with the .IF control construct in bteq to accomplish what you want.
40108 May 2008 @ 02:01 PDTDatabaseReplyTeradata Recursive SQLI haven't tested... but something like this should work ...WITH RECURSIVE RECTBL(CHLD, PRNT, LVL)AS( SELECT CHILD, PARENT, 1(INTEGER) FROM MYTBL WHERE CHILD = 'G' UNION ALL SELECT MYTBL.CHILD,...
40002 May 2008 @ 08:56 PDTDatabaseReplyRecursive viewIt kind of didn't turn out to be as easy as I thought, but neverthless here's one way... ( The objective was to get all the emps that comes under steve to be pulled out into a view along with their...
39930 Apr 2008 @ 01:39 PDTDatabaseReplyRecursive viewIs there any reason why you can't define this final view itself as a recursive view ? (The final select in the recursive definition can actually be joined with other tables and filter conditions ad...
39824 Apr 2008 @ 09:15 PDTDatabaseReplyBackup/Recovery of DBQLPMCP is normally a onetime setup kind of thing which you would have to purchase from teradata (I think it's sort of done by the PS guys)... and it's kind of "the" standard practice these days...how...
39723 Apr 2008 @ 12:11 PDTDatabaseReplyBackup/Recovery of DBQLHave you considered getting the PMCP package from Teradata ?
39622 Apr 2008 @ 01:36 PDTDatabaseReplyTeradata equivalent with recursiveI think what you are looking for is something like this ....WITH RECURSIVE RECEMP(EMP_ID, EMP_DB, LEVEL)AS( SELECT EMP_ID, EMP_DB, 1(INTEGER) FROM EMP WHERE EMP_ID = 11 UNION ALL SELECT E.EMP_...
39519 Apr 2008 @ 02:56 PDTDatabaseReplyMasking commas within a macro parameteryou cannot have INTO clauses in macros, they can be used in stored procs. how ever, you can't have recursion in stored procs...here's my suggestion ...Replace MACRO database.get_data(Opco_code VARC...
39417 Apr 2008 @ 11:43 PDTToolsReplyFast Export Script Syntax.export outfile C:\Fast_data.txt mlscript C:\Mload.txt format text ;
39317 Apr 2008 @ 11:05 PDTDatabaseReplyMasking commas within a macro parameterA recursive sql is incomplete with out a selectsoyour recursive query should be likeWITH RECURSIVE MYRECTBL(a, b, c)(........)SELECT a, b, x, y FROM MYRECTBL JOIN ANOTHERTBLON a = x;in your macro, ...
39217 Apr 2008 @ 10:52 PDTDatabaseReplyARCHIVE - COPY STATEMENTI was able to restore using that syntax, ofcourse it would put back only that data that it found in the archive.
39115 Apr 2008 @ 10:05 PDTDatabaseReplyARCHIVE - COPY STATEMENTCOPY data table (target.tbl_new)(FROM (srcdb.tbl)),RELEASE LOCK,FILE = partdata;
39015 Apr 2008 @ 09:25 PDTToolsReplyFast Export Script SyntaxControl is not a keyword, you can give any name there ... it's purpose is to define the input file format from which fastexport can read some information (like the conditional filter values that ne...
38915 Apr 2008 @ 09:17 PDTDatabaseReplyMasking commas within a macro parameterThat's going to be extruciatingly painful, perhaps with the help of a bunch of GT tables and all that recursive stuff,we must be able to achieve it...But what could be a practical use for it ?
38815 Apr 2008 @ 09:11 PDTToolsReplyconfiguration of PSA in demo CDtry using DemoTDAT for the DBS name
38715 Apr 2008 @ 09:08 PDTConnectivityReplyjdbc - Invalid date suppliedThat format is what we call a time stamp in teradata... this is different from a date data type.And as far I could remember the date object that you supply to jdbc should be a java.sql.Date object ...
38614 Apr 2008 @ 10:26 PDTDatabaseReplydynamic count(*)The other not so popular workaround is to create a dummy proc under user A which takes a character string as argument and executes it using dynamic sql... and to give execute permission on this pro...
38514 Apr 2008 @ 10:23 PDTAnalyticsReplyHow to Split Output file using SQL?If you can use unix, there's the split command up to the task ...
38407 Apr 2008 @ 01:36 PDTDatabaseReplyMasking commas within a macro parameterYou must be able to make use of the same code, the only change I foresee is to change the cast (INTEGER) with (VARCHAR(30)) or something appropriate.and you can execute the macroexec macroname('val...
38307 Apr 2008 @ 01:20 PDTToolsReplyConditinal Logic with dynamic parameteres in BTEQ.since you just have a 0 or 1 check, you can re-write the query logic to return 0 or >0 rows and make use of the bteq variable ACTIVITYCOUNT along with bteq's if then control language to accompli...
38218 Mar 2008 @ 01:34 PDTToolsReplywhy FastExport never works for me?I am wondering if you are mixing up between bteq and fast export.... they are two different utilities... you invoke the fast export utility via the executable fexp I suggest you to go through some ...
38118 Mar 2008 @ 01:31 PDTAnalyticsReplyCode help needed to summarise tableWhat I don't understand is, just by looking at the data how can I say that call which started at 08:21:32 ended at 08:23:35 and not at 13:02:17 ? (I know some folks who can talk that long :o )

Pages