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

Hi any one has datasatge 8.5 certication dump could you please provide your details i will contact you. send reply to my mail rajaadivi@gmail.com Thanks in Advance

2 Answers  


If you want to use the same piece of code in different jobs, how will you achieve it?

0 Answers  


What is the process of killing a job in datastage?

0 Answers  


How do u convert the columns to rows in datastage?

0 Answers  


How to display errors in datastage?

1 Answers   TCS,






What is the version control how can i apply this in DataStage can any one tell me the anser

4 Answers   IBM,


how can we join one oracle & flat files ?

2 Answers   ME,


what is the difference between lookup stage reject link and merge stage reject link in datastage Parallel jobs? interm of output in Merge Reject link and Look Up Reject link ?

4 Answers   HCL,


What are routines in datastage? Enlist various types of routines.

0 Answers  


which dim, fact tables used in bank domain

1 Answers   HSBC, IBM,


what is advantages of snowflake when it is used?

3 Answers   IBM,


1.how to generate even numbers in surrogate or tranformar stage ? 2. how many ways to remove duplicate values?

5 Answers   Gallega, TCS,


Categories