Quantcast
Channel: Teradata Forums - Database
Browsing all 14773 articles
Browse latest View live

SQL to find Row Count - response (1) by robpaller

No. DBQL doesn't seem to log records inserted, deleted, or updated by INSERT, UPDATE, DELETE, or MERGE operations. Do you have any timestamp or date fields on the table to track when records have been...

View Article


Data Cleansing using SQL - response (6) by kalpanaceo

Data cleansing is the process of uncovering and correcting inconsistent records from a table, a set, or database. This is used mainly in databases to identify imperfect, incorrect, erroneous and...

View Article


Create Timestamp from Date and Time - response (2) by td_apprentice

hey Petr, just found a solution: SELECT CAST((CURRENT_DATE + .5) AS TIMESTAMP(0)) + (( CURRENT_TIME - TIME '00:00:00') HOUR TO SECOND(0)) ;

View Article

SQL Question - response (6) by abc_munmun

i need to pull a string between two chars.for ex- abc#read#efg  .i need to puul the string between the 1st and 2nd '#'.Substring won't help.so i am not sure how to proceed.

View Article

SQL to find Row Count - response (2) by dnoeth

If STEPINFO is enabled then dbc.QryLogSteps.RowCount records the activitycount. Based on StepName: - UPD: updates - DEL: deletes - MRG: inserts (ins/sel) - MRM: inserts, RowCount2 -> updates There...

View Article


Issue with Decimal(38,0) data type in BTEQ - topic by suresh1802

Hi, I am trying to export data from a table in which one column  has a data type of Decimal(38,0).    Query: select sa from aa; Result: When I run the select statement in SQL assistant....the output is...

View Article

Timestamp difference help needed! - response (1) by CarlosAL

Hi: Not sure about what you're after. You could try something like:   WHEN ( CAST(call_end_tmstp AS DATE) = CAST(rec_last_updt_tmstp AS DATE)        AND        CAST(rec_last_updt_tmstp AS TIME(0)) >...

View Article

Left Function || Conversion of Sql Server to Teradata - topic by e-smile

Hello everyone,   Sorry. I'm disturbing your. I have a question about conversion of SQL Server Query to Teradata Query about LEFT function.  If anyone can help me in conversion of query to teradata;...

View Article


Left Function || Conversion of Sql Server to Teradata - response (1) by CarlosAL

You don't give DDL's, your attempts and the errors you get, but   SELECT    CASE       WHEN (SUBSTR(COLUMNNAME,1,2) <> '60' AND COLUMNNAME2 IN (1,2))          THEN 2       ELSE 1 END FROM...

View Article


SQL to find Row Count - response (3) by robpaller

Learned something new! Thanks Dieter. Didn't even consider StepInfo. Step Info does generate a significant volume so from a historical basis you'd want to keep 30-60 days tops and maybe build aggregate...

View Article

Left Function || Conversion of Sql Server to Teradata - response (2) by e-smile

Thank you for update Carlos, it's working.   Thanks. Ismail

View Article

How to force duplication of the rows from a small table on all AMPs -...

Aftab, Thanks again. yes you were right. I tried the above approach and it still didn't help. The larger table is still being redistributed. There is already a secondary index in the larger table col1,...

View Article

SQL Left Join question - response (3) by ganeshh

select c.customer_id, o.order_dte from customers c LEFT OUTER JOIN orders o where c.customer_id = o.customer_id;

View Article


SQL to find Row Count - response (4) by macktd

Hi dieter, could you please explain diff blw                        rowcount|rowcount2|rowcount3

View Article

Issue with Decimal(38,0) data type in BTEQ - response (1) by dnoeth

Try FORMAT 'Z(38)' or FORMAT '9(38)' Dieter

View Article


SQL to find Row Count - response (5) by dnoeth

Cut'n'paste from the Database Administration manual: RowCount If StepName is MRM (Merge Row Multiple) or EXE (MultiLoad), RowCount is the number of rows inserted. For all other steps, RowCount is the...

View Article

SQL Question - response (7) by dnoeth

Of course Substring will help, ugly, but working: CASE WHEN x LIKE '%#%#%' THEN SUBSTRING(SUBSTRING(x FROM POSITION('#' IN x) + 1) FROM 1 FOR POSITION('#' IN SUBSTRING(x FROM POSITION('#' IN x) + 1)) -...

View Article


How to force duplication of the rows from a small table on all AMPs -...

Hi Ajyush, a NUSI on tablea.col1 will not be used for joins (unless you use a very restrictive WHERE condiition). Did you check for missing stats (using DIAGNOSTIC HELPSTATS ON FOR SESSION)?...

View Article

Bizarre error "a character string failed conversion to a numeric value" -...

Hi,    I coldn't figure out why this query would fail on my 13.10.04 instance, it seems teradata db has a problem with type checking in a derived table.   This works select count(case  when W_AREA_CODE...

View Article

SQL Left Join question - response (4) by sin

select c.customer_id, o.order_dte from customers c LEFT OUTER JOIN orders o ON c.customer_id = o.customer_id;  

View Article
Browsing all 14773 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>