#DateForumTypeThreadPost
290315 Jul 2014 @ 06:51 PDTDatabaseReplyformat for email in create tableWhy do you want to format an email address, it's only a string? A valid email should already include the @ and if you stored both parts separately you simply concat: local_part || '@'...
290215 Jul 2014 @ 06:20 PDTGeneralReplyCan we use coalesce and aggregate function in one derived columnsI can't follow your logic, so I don't know if this is correct, but adding an aggregate function to the coalesce(main.a5,0) or removing the SUM should at least remove that error: ...
290115 Jul 2014 @ 04:06 PDTDatabaseReplyCopy table 1:1 with compressionWhat kind of compression, multi value or block level? Based on your other question I assume MVC. You can use CREATE TABLE new_table (col not null compress (1,2), ...) AS existing_table ...
290015 Jul 2014 @ 03:59 PDTDatabaseReplyNew in Release 13 ? Alter table not possible on columns with statisticsIt's not a bug, this is how it's implemented :-) At least you don't have to re-collect the stats: CREATE TABLE table_copy AS old_table WITH NO DATA COLLECT STATS ON table...
289915 Jul 2014 @ 03:02 PDTGeneralReplyORDER BY cannot be used in sub queriesThis is exactly the same, remove ORDER BY, it is and always was absolutely useless for an INSERT.
289815 Jul 2014 @ 01:31 PDTGeneralReplyORDER BY cannot be used in sub queriesHi Soumik, this query should have failed in every TD release, there's no ORDER BY allowed in an INSERT/SELECT (unless there's a TOP, too). If it worked before it was a bug, now it's c...
289715 Jul 2014 @ 01:06 PDTAsterReplyHow to load Fixed width files into AsterHi Arun, afaik there's no Aster tool to load fixed width files. You need to use any ETL tool supporting Aster or JDBC/ODBC.
289615 Jul 2014 @ 01:04 PDTDatabaseReplyNew to Teradata Help with data typeA phone or email is simply a VarChar with some added validation rules. Which DBMS has built in dataypes like that?
289515 Jul 2014 @ 01:02 PDTDatabaseReplyStored procedure conversion from Oracle to TeradataWhat is this SP supposed to do? Simply returning a result set, then it's: CREATE PROCEDURE RegionSelect () DYNAMIC RESULT SETS 1 BEGIN DECLARE cur_OUT CURSOR WITH RETURN ONLY FOR ...
289415 Jul 2014 @ 12:49 PDTDatabaseReplySybase SIMILAR Function and Teradata 14.0 equivalentYou should create a new topic for a new question. I don't know Sybase, but: 1) + 2) There's no capability like that in a Teradata SP, seems to be used to return some "work in progr...
289314 Jul 2014 @ 09:10 PDTDatabaseReplyAll AMP active for Updates based on primary indexThe only case I can imagine if it's actually a single update using the PI is a LOCKING TABLE. Do you run the update against a view with? Then switching to LOCKING ROW shoul help.
289214 Jul 2014 @ 08:49 PDTDatabaseReplyBlank space check based on the positionWhat's your TD release? In TD14 there are Regular Expression: CASE WHEN regexp_similar(col, '[^B]([0-9]){3}.*') = 1 THEN 'ABC' ... otherwise you need to SUBSTRING each cha...
289111 Jul 2014 @ 03:45 PDTDatabaseReplyROW_NUMBER() Problem in SUb QueryIf you need a DELETE why don't you talk about it instead of SELECT? ROW_NUMBER is only supported for SELECTs, but you don't need it (or ROWID): delete from operations.tll_gnr_master as ...
289011 Jul 2014 @ 01:49 PDTDatabaseReplyCreating a TotalHi Bill, of course you need to add a GROUP BY 1,2
288911 Jul 2014 @ 01:41 PDTDatabaseReplyDBC.QryLog table shows future time.How far into the future, a few hours? Might be because StartTime doesn't include a time zone and is stored in UTC.
288811 Jul 2014 @ 01:36 PDTDatabaseReplyExecuting several Macros in a MacroHi Raghu, all SQL within a macro (including nested macros) is treated as a Multi Statement Request, i.e. a single transaction. If you don't need everything in a single transaction you should ...
288711 Jul 2014 @ 01:33 PDTDatabaseReplyNeed Query for reading XML data from a CLOB objectHi Murugesan, you should have a look at Teradata XML Services for TD14, in 14.10 this will be built-in.
288611 Jul 2014 @ 01:30 PDTDatabaseReplyROW_NUMBER() Problem in SUb QueryThis query is overly complicated (in Oracle, too), should be exactly the same as  select a.* from operations.tll_gnr_master a, operations.site b where a.site_key=b.site_key and b.brand...
288511 Jul 2014 @ 01:26 PDTGeneralReplyHow to use reserved key words as column namesNo. You should try to avoid reserved names as you have to use those double quotes whenever that column is used in any SQL.
288411 Jul 2014 @ 01:21 PDTAsterReplyAster regexp: how to delete 5 lines before certain wordsI can't spot where you specify 5 lines, but this might be due to the forum software stripping off some meta characters... You want to keep the line with 'fax' in it, including the phon...
288310 Jul 2014 @ 11:18 PDTDatabaseReplyYear and Month only field WHERE to_mth >= EXTRACT(YEAR FROM CURRENT_DATE) * 100 + EXTRACT(MONTH FROM CURRENT_DATE) Looks complicated, but the optimizer will resolve it to as a YYYYMM number, check E...
288210 Jul 2014 @ 08:02 PDTToolsReplyFASTLOAD ERRORHi Zeeshan, this error indicates there are less fields in your input record than DEFINEd. Btw, 44 delimiters define 45 columns, but this should not the source of your problem.    
288110 Jul 2014 @ 04:06 PDTDatabaseReplySELECT failed 7453 : interval field overflowYou can't compare an HOUR TO SECOND interval to an INTEGER. What is 30 supposed to be. hours, minutes or seconds? ((FIRSTRESPTIME - FIRSTSTEPTIME) hour(4) to second ) <= INTERVAL '30&...
288010 Jul 2014 @ 02:37 PDTDatabaseReplyExecute Query based on IF conditionYou should write a Stored Procedure for this. If all those queries return compatible columns a Macro might work, too: replace macro xxx (indate date) as ( select .... where indate = ...
287910 Jul 2014 @ 02:33 PDTToolsReplyFASTLOAD ERRORHi Zeeshan, it's hard to tell without more info. Did you use VARTEXT and the correct DELIMITER? Did you DEFINE all fields as VARCHAR?

Pages