Tuesday, October 23, 2012

Most frequest Teradata Production or Development issues

Numeric Overflow Error Occurred


*to avoid this error you can use decimal(18,0)*
select cast(empsalarytotal as decimal(18,0)) from Databasename.Tablename


No more room in database

*because of poor Primary Index *

select TableName, sum(CurrentPerm) as ActualSpace,
count(*)*(max(CurrentPerm)-avg(CurrentPerm)) as WastedSpace


Spool Space Issue


To avoid ---

join the columns that are of same data types
filter the subqueries just to have the rows that joins
collect the statistics(diagnostic helpstats on for session)

bad character in format or data


While I am trying to run the following query .
SELECT
(case
when d.So_Qty is NULL then NULL
when ctr.So_Qty = 0 then NULL
else ctr.So_Qty end) Soq

I am getting the following error
2620 The format or data contains a bad character.

compare string to string

ctr.So_Qty='0'

2 comments:

  1. How Teradata prevents a deadlock ?

    In case of All-AMP operation by multiple users, Teradata will select one AMP as gatekeeper and this AMP will control the readlocks on all AMP's by multiple users.

    ReplyDelete
  2. Good link to read about Teradata Spool space issue and resolution....

    http://www.slideshare.net/jassics/white-paper-on-spool-space-in-teradata

    ReplyDelete