#DateForumTypeThreadPost
1008 Dec 2015 @ 08:54 PSTDatabaseReplyCASTing Date and Time to Timestamp while CASTing Time from varchar to TIMEHi Jeremy, Please post sample values for time column. If the value in your time column is like '044335', then the below code will help you:- select top 5 CAST (Date AS TIMESTAMP(0)) +(((...
908 Dec 2015 @ 08:28 PSTDatabaseReplyStored Procedure ErrorHi Sharat, Can you confirm if those are error or warning messages. I believe these would be warning messages so still you can go ahead and execute your stored proc after compilation, it will work...
809 Feb 2015 @ 02:45 PSTDatabaseReplyCalling a teradata stored procedure by shell scriptHi Kushal, Put this line of code just prior to your bteq statement. for example, if "/abc/efg/file.txt " is the file name with path. then put this >/abc/efg/file.txt   Hope ...
709 Feb 2015 @ 02:32 PSTDatabaseReplyLong decimal Value is getting round-offHi Pradeep, I do not see any round off happening. Using the same terdata version (14.10.04.04). Check if its rounding off in the sql assistant or the tool which you are using.   Here is th...
619 Sep 2014 @ 03:12 PDTGeneralReplyStored ProcedureCompile it first and then execute it. Try this step 1 REPLACE PROCEDURE CCC.YYYYYC() BEGIN   CREATE VOLATILE TABLE VT_TEXT1     (     Colum...
518 Sep 2014 @ 10:11 PDTDatabaseReplyExport to excelTowards the right side of the result set window, there is an option to "export result set data", you can choose file type there as *.xls and export.  
409 Sep 2014 @ 03:46 PDTGeneralReplyDATA TYPE FOR EMAIL ADDRESS  Here is one sample record INSERT INTO <table_name> VALUES ('ABC0HYD','ABC','2009-11-26','HYDERABAD','040',91,123456789,'IND','SAMP...
309 Sep 2014 @ 01:37 PDTDatabaseReplyDDL's Compare of 2 tablesCheck if this query can help you. select (CASE when (a.cnt=(select count(*) from dbc.columns c where trim(c.databasename)='<any one database name>' and trim(c.tablename)='<tab...
208 Sep 2014 @ 10:44 PDTDatabaseReplyHow do I convert a date or timestamp to a string in TeradataTry using the below query, cast(cast('20130405233422' as timestamp(0) format 'YYYYMMDDHHMISS') as date format 'YYYY-MM-DD')
108 Sep 2014 @ 09:33 PDTDatabaseReplyDays between two dates (different years)Try this.. cast(cast(min(sale_date)as date format 'yyyy-mm-dd') - cast('2013- 11-01' as date format 'yyyy-mm-dd') as decimal(15,0)) as sale_days