Quantcast
Browsing all 14773 articles
Browse latest View live

How to identify tables that have been Block-level compressed using SQL -...

I guess, DBC tables don't store that information.

View Article


Date Conversion - topic by Malleshkr

The date field is in the format 'DD-MON-YY'. But wherein the data which i receive is as below. EX: 12-Aug-12 1-Aug-12 The first if i handle using the substring the second value will be handled wrongly....

View Article


Date Conversion - response (1) by pawan0608

Internally, Teradata does not store Date as in any speicifc Date format, it stores Date value as a four-byte signed integer value dervied based on (YEAR - 1900) * 10000 + (MONTH * 100) + DAY   Format...

View Article

Date Conversion - response (2) by Malleshkr

Yes right...But the source file has the data as mentioned above. Where "DD" is coming as 1 and not "01". And thats where am seeing the problem that my code is not working.   Code sample:...

View Article

Date Conversion - response (3) by Qaisar Aftab Kiani

Hi Mallesh, You can simple check the length of incoming date string and based on that you can concatenate 0 in the start and make the string in a standard format for your rest of the code, like SELECT...

View Article


_UNICODE in comments - procedures - response (2) by bjteradata

Did you ever find out a solution for this?  I have found that when a procedure is saved in Atanasuite and compiled in Studio Express these show up occassionally.

View Article

_UNICODE in comments - procedures - response (3) by bjteradata

I found that there was a "tab" character in the procedure I was creating on the server.  Turns out that Atanasuite creates it fine with the tab, but Studio Express adds this _UNICODE business.  I guess...

View Article

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

Thank you Dieter!!

View Article


Date Conversion - response (4) by harpreet singh

Here you go SELECT '12-Aug-12' AS COL1 , CAST(CASE WHEN CHAR_LENGTH(SUBSTRING(COL1 FROM 1 FOR POSITION('-' IN COL1)-1))=1 THEN '0'||COL1 else COL1 end AS DATE FORMAT 'DD-MMM-YY') ; SELECT '2-Aug-12' AS...

View Article


Diff btw hard and soft RI - response (5) by arvindp

Hi joedsilva Thansk for the explanation. How does the soft RI will really improve the query performance, when we join the 2 tables, the rule is to have both the table data on the same AMP.   Thanks in...

View Article

SQL Help : Left join - response (3) by mathiroom

If you use AND operator in OUTER JOIN it will take more SPOOL, try WHERE clause but it will filter the result based on the inner table.

View Article

Does the order of columns matter in SQL statement - topic by jyo1105

Hi all,   I am completly new to teradata. I have a query to run in SQL assistant which has some calculated columns. I wonder if order of the columns matter. For example when 1st column depends on 2nd...

View Article

Does the order of columns matter in SQL statement - response (1) by Qaisar...

Hi Jyo, No the sequence of columns doesn't matter as long as they are in the same SQL scope. Your query should run fine. Regards, Qaisar Aftab Kiani.

View Article


Tearadata SQL Help - Very much Urgent - topic by reddy27

Hi All, We need to make rows for data in columns.  In other works, there are say 5 columns each representing one product and we need to transform that information and create 5 rows one for each...

View Article

Diff btw hard and soft RI - response (6) by Qaisar Aftab Kiani

You get the performance gains while loading or maintaining the tables because in case of child table the database engine doesn't look for the related parent table key rather load the table assuming the...

View Article


Tearadata SQL Help - Very much Urgent - response (1) by Qaisar Aftab Kiani

What is PROD_LVL_NM? Can you share the sample input data and the expected output data to help understand the problem more clearly.

View Article

Tearadata SQL Help - Very much Urgent - response (2) by Qaisar Aftab Kiani

You can UNION multiple SELECT statements to transform the results from rows into columns like Considering PROD_LVL_NM is a unique random value generated against each row... SELECT KEY, ROW_NUMBER()...

View Article


Tearadata SQL Help - Very much Urgent - response (3) by reddy27

Mapping:   Source COLUMN Transformation TargetTable Field Tablename PRODUCT_1   t_prd SOR_PROD_CD Tablename PRODUCT_1 The value is  PROD_X_OTH_HIER_PROD.OTH_HIER_CHAR_PROD_CD where OTH_HIER_KY = 14...

View Article

Tearadata SQL Help - Very much Urgent - response (4) by reddy27

It is more like reading colums from the same row of a source table and inserting one row for each matching column..in other words converting from columns to rows but the key should be the same for all...

View Article

Date Conversion - response (7) by mathiroom

sel case char('12-aug-12') when 9 then add_months((('12-aug-12')(format 'dd-mmm-yy',date)),12*100) end, case char('1-aug-12') when 8 then add_months((('0'||('1-aug-12'))(format...

View Article
Browsing all 14773 articles
Browse latest View live