I HAVE EMP TABLE, 4 COLS R THERE COL1,COL2,COL3,COL4
ID-- 101,102,103,104 SAL-- 1000,4000,2000,5000
DATE-- COLUMN. I WANT TO DISPLAY THE DATA PREVIOUS MONTH
HIGEST SAL ?

Answers were Sorted based on User's Feedback



I HAVE EMP TABLE, 4 COLS R THERE COL1,COL2,COL3,COL4 ID-- 101,102,103,104 SAL-- 1000,4000,2000,5000..

Answer / subhash

Select MAX(SAL) FROM EMP
where to_char(Date,'MM-YYYY')=to_char(sysdate-1,'MM-YYYY')

Is This Answer Correct ?    1 Yes 1 No

I HAVE EMP TABLE, 4 COLS R THERE COL1,COL2,COL3,COL4 ID-- 101,102,103,104 SAL-- 1000,4000,2000,5000..

Answer / indu

select max(sal) from emp where to_char(Date,'MM-YYYY')
=to_char(dateadd(month, -1, GETDATE()),'MM-YYYY');

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

what is the difference between == and eq in UNIX shell scripting?

0 Answers   CTS,


Can you explain how could anyone drop the index before loading the data in target in datastage?

0 Answers  


Differentiate between odbc and drs stage?

0 Answers  


1)How to do error handling in datastage? 2)Did sequential stage accepts .xl files ,xml? znd how?

2 Answers   UHG,


Explain the situation where you have applied SCD in your project?

0 Answers  






table actions available in oracle connector?

0 Answers   CTS,


Please explain me the difference between 3 types of slowly changing dimension in datawarehousing?

3 Answers   TCS,


how many rows sorted in sort stage by default in server jobs

0 Answers   Syntel,


source contains 2 columns comes to target 4 columns how

1 Answers   IBM,


how to sort two columns in single job in datastage.

1 Answers   TCS,


what is the new version in Datastage ? what is the diff b/t New vesion & 7.5 version?

12 Answers   Wipro,


IS FILE SET CAN SUPPORT I/P AND O/P LINK AT A TIME?

1 Answers  


Categories