Sponsored Content
Full Discussion: Minute(4) issue in teradata
Top Forums Shell Programming and Scripting Minute(4) issue in teradata Post 303019956 by himanshupant on Wednesday 11th of July 2018 05:05:40 AM
Old 07-11-2018
Minute(4) issue in teradata

I have values below for which diff field is giving error like
"invalid time interval" in teradata

Might be it is not doing calculation anymore after exceeding minute(4) value

Code:
END_TS 2/2/2018 08:50:49.000000
START_TS 1/5/2018 17:30:02.000000
SLA_TIME 23:59:59.000000


Code:
select (cast((cast(JRDC.END_TS as timestamp) -Cast(CAST( cast(JRDC.START_TS as DATE FORMAT 'YY/MM/DD') AS  TIMESTAMP(0)) + 
(SLA_TIME - TIME '00:00:00.000000' HOUR TO SECOND) as timestamp) minute(4)) +  CAST(1 AS interval minute) as decimal )) -1 as DIFF
from base_tbl.xyz


Last edited by rbatte1; 07-11-2018 at 01:01 PM.. Reason: Removed Bold for whole code block
 

10 More Discussions You Might Find Interesting

1. Programming

Unix - teradata

I am trying execute a sql file from the script and the sql file has the following code snippet, which throws out the error given below FOR C_FINELINE_LP AS CURSOR C_SLS FOR SELECT * FROM WM_UTIL.FLT_DEP WHERE LOAD_IND = 'N' DO ..... ..... .... END FOR; FOR C_FLTSLS_STR_LP AS... (0 Replies)
Discussion started by: yschd
0 Replies

2. Programming

compile a program in C with teradata sentences using cc

hi, I want to compile a program in C. It have a multiple calls to teradata. I have no idea how to compile in Aix. The compiler that I should be use is cc. I tried cc -G -KPIC tdsfbd0358.c this generates a tdsfbd0358.i and after I have no Idea what I have to make, a link? how?... (3 Replies)
Discussion started by: kajum
3 Replies

3. Programming

Connect To Teradata

How do i connect from C program to teradata Database? The C program is being executed from a Unix script, AIX. I am calling a C program from a Unix shell script and the C Program executes some SQLs on Teradata Database. (3 Replies)
Discussion started by: yschd
3 Replies

4. Shell Programming and Scripting

Take minute per minute from a log awk

Hi, I've been trying to develop a script that performs the parsing of a log every 1 minute and then generating some statistics. I'm fairly new to programming and this is why I come to ask if I can lend a hand. this is my log: xxxx 16/04/2012 17:00:52 - xxxx714 - E234 - Time= 119 ms.... (8 Replies)
Discussion started by: jockx
8 Replies

5. Shell Programming and Scripting

Fast export in UNIX using Teradata creating issue

Hi All, I am trying to export a file using Fast Export (Teradata) in UNIX. The desired output length is 550 bytes, but the output file is creating string till 75 characters. How to get the full length file? .LOGON .EXPORT file=export.txt; SELECT CAST(('' || (CAST('UD ' AS CHAR(3))) || ... (2 Replies)
Discussion started by: unankix
2 Replies

6. Shell Programming and Scripting

Teradata connectivity through UNIX by use bteq

Hi, I want a script for connecting teradata to load the file to teradata table. Can you please help me out. Thanks in advance. (1 Reply)
Discussion started by: victory
1 Replies

7. Shell Programming and Scripting

Execute teradata queries from a file

In a .txt file i have a set of teradata queries which i need to execute and capture result for all queries.Is there any way to run teradata queries from a file? (1 Reply)
Discussion started by: katakamvivek
1 Replies

8. UNIX and Linux Applications

Using BTEQ with perl to Teradata

Has anyone used either bteq or mload for inserting into a Teradata Database via perl. We're running Red Hat Enterprise 5.7. I've gotten the DBD::ODBC drivers installed and running. I installed the Teradata ICU, TeraGSS and ODBC pkgs. We are using perl to insert data across the network into... (1 Reply)
Discussion started by: islanderman
1 Replies

9. Shell Programming and Scripting

Teradata fastexport in ksh

Hi, I am trying to use Teradata fastexport in ksh, but getting error as below temp1.ksh: line 7: syntax error at line 10: `newline' unexpected below is my code: #!/bin/ksh LOGON_STR="TDDB/user,paswd;" DATAFILE=/path/a.lst; DEBUG=0 >$DATAFILE fexp > /dev/null... (3 Replies)
Discussion started by: usrrenny
3 Replies

10. Shell Programming and Scripting

Connection with Teradata through shell Script

Hi All, As we are using SQLPLUS command to connect Oracle Database in unix: Like below syntax: sqlplus username/password@dbname << EOI SET HEADING OFF SPOOL MAX_DATE_VAL.txt select max(LAST_UPDT_DATE) from source_defect; SPOOL OFF here the result is stored in... (0 Replies)
Discussion started by: Shilpi Gupta
0 Replies
IO::Async::Timer::Absolute(3pm) 			User Contributed Perl Documentation			   IO::Async::Timer::Absolute(3pm)

NAME
"IO::Async::Timer::Absolute" - event callback at a fixed future time SYNOPSIS
use IO::Async::Timer::Absolute; use POSIX qw( mktime ); use IO::Async::Loop; my $loop = IO::Async::Loop->new; my @time = gmtime; my $timer = IO::Async::Timer::Absolute->new( time => mktime( 0, 0, 0, $time[4]+1, $time[5], $time[6] ), on_expire => sub { print "It's midnight "; $loop->stop; }, ); $loop->add( $timer ); $loop->run; DESCRIPTION
This subclass of IO::Async::Timer implements one-shot events at a fixed time in the future. The object waits for a given timestamp, and invokes its callback at that point in the future. For a "Timer" object that waits for a delay relative to the time it is started, see instead IO::Async::Timer::Countdown. EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters: on_expire Invoked when the timer expires. PARAMETERS
The following named parameters may be passed to "new" or "configure": on_expire => CODE CODE reference for the "on_expire" event. time => NUM The epoch time at which the timer will expire. Once constructed, the timer object will need to be added to the "Loop" before it will work. Unlike other timers, it does not make sense to "start" this object, because its expiry time is absolute, and not relative to the time it is started. AUTHOR
Paul Evans <leonerd@leonerd.org.uk> perl v5.14.2 2012-10-24 IO::Async::Timer::Absolute(3pm)
All times are GMT -4. The time now is 06:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy