#DateForumTypeThreadPost
39105 Jul 2012 @ 04:03 PDTDatabaseReplyConcatanation of the rows from one columns Check Jimms comment in  http://forums.teradata.com/forum/tools/bteq-export-issue You could paste the SQL below into the BTEQ script - no need for a single row SQL - and try it.
39005 Jul 2012 @ 03:32 PDTDatabaseReplyConcatanation of the rows from one columns sure (use a recursive query over the id) but lets assume you have this single string - how do you execute it? How do you fetch the result - rememper number of columns can differ...
38905 Jul 2012 @ 02:45 PDTDatabaseReplyConcatanation of the rows from one columns This might give you an idea SELECT SQL_TEXT FROM ( select CAST(-1 AS INTEGER) AS ID, CAST('Select year_of_calendar !! ''-'' !! month_of_year,' AS VARCHAR(200))...
38805 Jul 2012 @ 02:11 PDTDatabaseReplyPivot query with dynamic number of coumns Yes, it is possible and done in the past. SP will have the problem that they can't execute Selects as dynamic SQLs - at least in the past. Didn't check this for a long time. So t...
38705 Jul 2012 @ 12:02 PDTGeneralReplyrecursivity P.S. I added the ctn condition in case you have loops in your graph - which would end up in an endless loop. So check your output. If it contains ctn = 100 you need either increase the filter co...
38605 Jul 2012 @ 12:00 PDTGeneralReplyrecursivity WITH RECURSIVE base (cod_hijo, cod_padre,ctn) as ( select cod_hijo, cod_padre, cast(1 as smallint) from RECURSIVIDAD where cod_padre <> '' union all select ...
38504 Jul 2012 @ 11:25 PDTDatabaseReplyidentity column help It is reliable to the design. It will assign unique values but not is sequence. Read the manual carefully and be aware of side effects on copy of data etc. you might find some answe...
38404 Jul 2012 @ 11:24 PDTDatabaseReplyConcatanation of the rows from one columns I don't understand your specific requirement. You would need to explain this in more detail.
38304 Jul 2012 @ 11:22 PDTDatabaseReplyHow to Update a table from output of stored procedure so why don't you just use tbl1 in the update statement?
38204 Jul 2012 @ 07:00 PDTDatabaseReplyConcatanation of the rows from one columns Try to avoid coursor as they do not scale in TD. Recurisve queries can do the trick - if you can come up with an order and an first element. Check  http://forums.teradata.com/fo...
38104 Jul 2012 @ 06:15 PDTDatabaseReplyConcatanation of the rows from one columns As a string? And how do you order the values? Check recusive queries.
38004 Jul 2012 @ 06:14 PDTGeneralReplyrecursivity I am not sure that G4 is reflected correctly in your result set - or I did not understand your example correctly. Can you validate please. Would also be nice if you share a ddl and some...
37903 Jul 2012 @ 01:13 PDTDatabaseReplyHow to select the max of different columns? There is no elegant way below 14 and you need to take care of the data types but in case you are on 13.10 a SQL udf can limit the uglyness of the code. REPLACE FUNCTION yourdb.colmax (i1 deci...
37803 Jul 2012 @ 12:19 PDTAnalyticsReplyExtracing ZONE part from a TIMESTAMP(0) WITH TIME ZONE column   SELECT substr(cast(CAST('2010-08-26 14:42:45-08:00' AS TIMESTAMP(0) WITH TIME \ ZONE FORMAT 'YYYY-MM-DDBHH:MI:SS.S(F)Z') as char(25)),20,6); would do the substr
37702 Jul 2012 @ 08:43 PDTAnalyticsReplyExtracing ZONE part from a TIMESTAMP(0) WITH TIME ZONE column Check the extract function. From the manual:   Extracts a single specified full ANSI SQL:2008 field from any DateTime or Interval value, converting it to an exact numeric value....
37602 Jul 2012 @ 08:40 PDTDatabaseReplyneed help So what do you expect from the others / us? Just dump SQL and Explain seems not to work. You would need to give much more qualified information. Why do you think the date is the problem?...
37529 Jun 2012 @ 10:11 PDTGeneralReplyHow to display the last 3 characters of lastname? substr(last_name, characters(last_name)-2,3) You might need to add a case expression in case the last names is shorter then 3 characters....
37429 Jun 2012 @ 04:49 PDTAnalyticsReplyDeleting records using teradataR you can use also direct RJDBC to exec queries in TD drv = JDBC("com.teradata.jdbc.TeraDriver","/PATH/TeraJDBC__indep_indep.14.00.00.12/terajdbc4.jar","/PATH/TeraJDBC_...
37327 Jun 2012 @ 08:45 PDTDatabaseReplyTable Load Timestamp You mentioned in your post "dropped" and in this case it has to be created afterwards. In this scenario D3V1L solution would work. I seems you delete and insert / select afterwards...
37227 Jun 2012 @ 08:39 PDTGeneralReplyHow to generate multiple records from single record select row_number() over (partition by t.id order by c.id) as seq_no, t.id, t.Customername, t.account, t.salary from table t cross join (select calen...
37127 Jun 2012 @ 04:56 PDTDatabaseReplyTable Load Timestamp You might also ask the developers to add a load_date  or load_timestamp field to the table which contains the required information. In case of load_date the impact of space usage can be...
37025 Jun 2012 @ 08:02 PDTToolsReply2616: Numeric overflow occurred during computation error given in Control M can you share the bteq log of the controll M BTEQ run and the manually executed BTEQ run?
36915 Jun 2012 @ 10:15 PDTAnalyticsReplyConnecting to Teradata in R via the teradataR package Can you run my sys_calendar example - as calendar should be available on every system. On a mac I had once the problem that I had to rerun library .jaddClassPath... sections twice...
36814 Jun 2012 @ 01:18 PDTAnalyticsReplyConnecting to Teradata in R via the teradataR package does the table exists in the DB you specified in the tdConnect? I am not aware that JDBC would not work on Red Hat - it works on Suse
36714 Jun 2012 @ 03:00 PDTDatabaseReplySQL Query - Help In this case the union might be best. Otherwise you would need a small product join to duplicate at least the Position 1 rows into two rows.

Pages