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

How do you run datastage job from the command line?

0 Answers  


how to find out number of records imported into source file?

1 Answers  


Why do we use exception activity in Datastage?

0 Answers  


What is the difference between validated and compiled in the datastage?

0 Answers  


Question 4) source target c1 c1 c2 c3 c2 c4 c4 c5 c3 c6 c7 c4 c5 c6 c7 Singal Source and Singal Target only subash,

3 Answers   TCS,






i have a scenario in which i/p columns areID,salary with 1,1000 2,2000 and 3,3000 i need an extra column in the o/p named avg(salary)how can i get it?

4 Answers   L&T,


State the difference between an operational datastage and a data warehouse?

0 Answers  


types of errors in datastage?

2 Answers   Reliance,


how to sort two columns in single job in datastage.

1 Answers   TCS,


In a table 100 records are there after 50records job is aborted how can u insert all records in target table.

1 Answers   Cap Gemini,


Hi Gus, Can u pls tell me How can u Call the Shell Scripting/Unix Commands in Job Sequence?

3 Answers   IBM,


diff between changecapture & diffrence stage which situvation we can use the diffrence stage ?

1 Answers   TCS,


Categories