#DateForumTypeThreadPost
38723 Jul 2015 @ 08:21 PDTDatabaseReplyhelp needed in a regular expressionHi.   SELECT REGEXP_SUBSTR(TheColumn,'(?<=U\=g)[0-9]*')   HTH   Cheers.   Carlos.
38622 Jul 2015 @ 12:12 PDTGeneralReplyHow I filter special Chars(*&^%...) in the WHERE clause, i want to pick just Alphanumeric.Hi.   The single quote is the escape for single quotes ;-). Try '' instead of '.   If in TD 14, you could use REGEXP_REPLACE().   SELECT REGEXP_REPLACE(COLUMN, '...
38520 Jul 2015 @ 11:59 PDTGeneralReplyHow I filter special Chars(*&^%...) in the WHERE clause, i want to pick just Alphanumeric.Hi. Yo may use oTRANSLATE() to get rid of the unwanted characters. HTH. Cheers.
38426 Jun 2015 @ 04:56 PDTGeneralReplysubstract valueHi. SELECT COL1 - CAST(COL2 AS INTERVAL HOUR TO SECOND); HTH. Cheers. Carlos.
38322 Jun 2015 @ 08:44 PDTDatabaseReplyCreate a PK and PI on a NoPI tableKatja: When you create a NoPI table... well, it cannot have a Primary Index. If you create a primary key on it, Teradata will enforce a USI instead. It STILL cannot create a PI on a NoP...
38211 Jun 2015 @ 12:45 PDTDatabaseReplyHEX string to Binary bitsHi: If your HEX value is in a string (VARCHAR, CLOB) and yoy need a VARBYTE or BLOB as output, maybe TO_BYTES() is what you're looking for. HTH. Cheers. Carlos.
38110 Jun 2015 @ 12:22 PDTGeneralReplyHOW TO GET ODD NUMBER ROWS IN A TABLE IN TERADATAHi: SELECT * FROM TABLE WHERE ID MOD 2 = 1; Cheers. Carlos.
38009 Jun 2015 @ 12:30 PDTDatabaseReplyOversized LOB filename encountered.Hi. Filename must go either without single quotes or with double quotes. Cheers. Carlos.
37903 Jun 2015 @ 12:38 PDTDatabaseReplyTeradata Express - No more room in database SamplesHi. 1. What is the max perm space for Samples DB? What is the perm space used for it? What is the size of the data being loaded? 2. The perm space is counted per AMP, so you could actually run ou...
37829 May 2015 @ 07:15 PDTDatabaseReplyFinding Leap year in Teradata REPLACE FUNCTION IS_LEAP_YEAR (the_year INTEGER) RETURNS BYTEINT LANGUAGE SQL CONTAINS SQL DETERMINISTIC SQL SECURITY DEFINER COLLATION INVOKER INLINE TYPE 1 RETURN CASE WHEN the_year M...
37727 May 2015 @ 04:23 PDTDatabaseReplyGet the date and time in yyyy-mm-dd 00:00:00 format in TERADATA SQLHi. In Teradata Dates are Dates, Times are Times and Timestamps are Timestamps. This is not Oracle. Cheers. Carlos.
37627 May 2015 @ 04:11 PDTDatabaseReplyNeed help in insert date statementHi. ON COMMIT PRESERVE ROWS is missing in your CREATE TABLE definition. Cheers. Carlos.
37522 May 2015 @ 06:18 PDTGeneralReplycopy Stored Procedures from one dbase to another and recompileVince: ARC (arcmain) is the basic tool for backups in Teradata. It used to be included in the Teradata Tools and Utilities, but from version 14 (?) it is not. I guess you gan get it easily enough ...
37422 May 2015 @ 12:24 PDTGeneralReplycopy Stored Procedures from one dbase to another and recompileVince: arcmain can copy/restore SP's from one DB to another. HTH. Cheers. Carlos.
37314 May 2015 @ 08:36 PDTGeneralReplyRemoving Logical DuplicatesHi. 1.- Paris is in France, isn't it? ;-) 2.- Distance between countries is a blurry concept, IMHO ;-) 3.- Sounds like a homework... ;-) Cheers. Carlos.
37212 May 2015 @ 12:42 PDTDatabaseReplyNull accepted in column defined as Not nullHi: '00'xC is not a Teradata NULL. You can insert '00'xC in a NOT NULL CHAR column. oReplace is returning white spaces for the '00'xC (it does nor replace them at all) and...
37111 May 2015 @ 03:37 PDTGeneralReplyCreat Duplicate Rows Based on Value in CellHi: Using a commodity table (CALENDAR) for a join or using a recursive query can be solutions for you. HTH. Cheers. Carlos.
37008 May 2015 @ 06:29 PDTToolsReplyTTU for Mac OS Hi. Never heard of this ;-) Good to know. Cheers. Carlos.
36908 May 2015 @ 12:18 PDTToolsReplyTTU for Mac OS No. TD Studio and jdbc driver are the only tools for Mac (as far as I know). Cheers. Carlos.
36829 Apr 2015 @ 02:11 PDTDatabaseReplyTop 10 rows for each dateHi. If you need TOP only for SAMPLING (whithout ORDER BY) you could try stratified sampling.   SELECT *   FROM TheTable SAMPLE WHEN TheDate = '2014-01-01' THEN 10  &nbs...
36725 Apr 2015 @ 01:06 PDTTeradata StudioReplyTeradata Studio 15 (Linux) crashes when opening Query Developement PerspectiveHi all. I finally fixed the annoying problem by installing the new jre 1.8 and changing a couple of environment variables. It wasn't so difficult after all... Cheers. Carlos.
36614 Apr 2015 @ 03:48 PDTConnectivityReplyODBC errorHi. The driver must look for the catalog file in order to resolve text messages from codes, and It cannot find it. HTH. Cheers. Carlos.  
36513 Apr 2015 @ 01:41 PDTConnectivityReplyODBC errorHi. You likely failed in setting NLSPATH environment variable. HTH. Cheers. Carlos.
36401 Apr 2015 @ 03:40 PDTDatabaseReplyNeed help on converting Integer and date to timestamp columnHi: You could try :   SELECT CAST(ROWDATE AS TIMESTAMP(0))+ CAST(STARTTIME/100 AS INTERVAL HOUR(2))+ CAST(STARTTIME MOD 100 AS INTERVAL MINUTE(2)) FROM DB_NAME.TEST   HTH Cheers....
36301 Apr 2015 @ 12:19 PDTDatabaseReplyAggregation/WHERE/HAVING statements in Teradata 13.10 vs 14Hi. This query shouldn't run in 13.10 either. You should use HAVING instead. Please, post a REAL execution. Cheers. Carlos.

Pages