Below is the example as how we can select timestamp values in Teradata:-
If you want to know on particular time how many employee have join us then you can use equals to sign(=)
SELECT EMPNO, EMPNAME, EMPSAL, JOIN_DATE FROM EMPLOYEE
WHERE JOIN_DATE = TIMESTAMP '2010-01-15 08:02:42';
If you are not sure when the employee has join you and you need to find out from the number of day's then you can use something like below mentioned:-
SELECT EMPNO,EMPNAME,EMPSAL,JOIN_DATE
FROM EMPLOYEE
WHERE JOIN_DATE > TIMESTAMP '2010-01-15 08:02:42'
AND JOIN_DATE < TIMESTAMP '2010-01-30 11:20:30';
If you want to know on particular time how many employee have join us then you can use equals to sign(=)
SELECT EMPNO, EMPNAME, EMPSAL, JOIN_DATE FROM EMPLOYEE
WHERE JOIN_DATE = TIMESTAMP '2010-01-15 08:02:42';
If you are not sure when the employee has join you and you need to find out from the number of day's then you can use something like below mentioned:-
SELECT EMPNO,EMPNAME,EMPSAL,JOIN_DATE
FROM EMPLOYEE
WHERE JOIN_DATE > TIMESTAMP '2010-01-15 08:02:42'
AND JOIN_DATE < TIMESTAMP '2010-01-30 11:20:30';
No comments:
Post a Comment