1) In a dataset how to delete a single row?
2) i have 50 rows , i want to display 5-7 records only?
How to write the sql query?
3)i have 40 rows,i want to display last row? write sql query?

Answers were Sorted based on User's Feedback



1) In a dataset how to delete a single row? 2) i have 50 rows , i want to display 5-7 records only?..

Answer / segu satish

answer for 3rd question:

select * from emp where rowid =(select max(rowid) from emp)

Is This Answer Correct ?    13 Yes 1 No

1) In a dataset how to delete a single row? 2) i have 50 rows , i want to display 5-7 records only?..

Answer / srinu

1) using external filter we use command is sed we get
2)select * from (select rownum rno,emp.* from emp)
where rno in(5,6,7)
or
select * from (select rownum rno,emp.* from emp)
where rno between 5 and 7
or
select * from emp where rownum<8
minus
select * from emp where rownum<5
in first two are very efiiciency compare to third one
because in third iam using set operator
3)select * from emp where rowid=(select max(rowid) from emp);

Is This Answer Correct ?    11 Yes 0 No

1) In a dataset how to delete a single row? 2) i have 50 rows , i want to display 5-7 records only?..

Answer / reddy obul

__for 2nd question answer is:
select * from table where rowid<8 minus select * from table
where rowid<5
__for 3rd quesion answer is:
select * from emp where rowid in(select max(rowid) from emp)

Is This Answer Correct ?    9 Yes 9 No

1) In a dataset how to delete a single row? 2) i have 50 rows , i want to display 5-7 records only?..

Answer / sarath

for 2nd:
select * from table where rownum<8 minus select * from table where rownum<5;

Is This Answer Correct ?    4 Yes 4 No

1) In a dataset how to delete a single row? 2) i have 50 rows , i want to display 5-7 records only?..

Answer / ravi

1 answere : we can use @rownum =1 and reject the first record....

Is This Answer Correct ?    0 Yes 0 No

1) In a dataset how to delete a single row? 2) i have 50 rows , i want to display 5-7 records only?..

Answer / subbu

2nd answer:

select * from(select rowid from tablename where rowid between 5 and 7);

Is This Answer Correct ?    0 Yes 2 No

1) In a dataset how to delete a single row? 2) i have 50 rows , i want to display 5-7 records only?..

Answer / ritesh chatterjee

Answer to Qust 1

Sed 1d "Dataset Name" from unix by this way you can delete
1st record from dataset,in place of 1 you can place any number.

Answer to Question 2

select * from tablename
where rowid between 2 and 7;

Answer to 3rd qus:-

select * from tablename
where rownum = 40;

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Data Stage Interview Questions

What are transforms and what is the differenece between routines and transforms?

0 Answers  


What a datastage macro?

0 Answers  


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  


Terminate Activity

0 Answers   CTS,


What is aggtorec restructure operator?

0 Answers  






Create a job to load all unique products in one table and the duplicate rows in to another table. The first table should contain the following output A D The second target should contain the following output B B B C C Q2. Create a job to load each product once into one table and the remaining products which are duplicated into another table. The first table should contain the following output A B C D The second table should contain the following output B B C

3 Answers   Deloitte, IBM,


Have you used Unstructured data?

0 Answers   CTS,


specify data stage strength?

1 Answers  


What are the repository tables in datastage?

0 Answers  


How will you move hashed file from one location to another location?

0 Answers   NTT Data,


Difference in the implementation of lookup and join stages,in joining two tables?

7 Answers   TCS,


What are some different alternative commands associated with "dsjob"?

0 Answers  


Categories