Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Input Data is: Emp_Id, EmpInd 100, 0 100, 0 100, 0 101, 1 101, 1 102, 0 102, 0 102, 1 103, 1 103, 1 I want Output 100, 0 100, 0 100, 0 101, 1 101, 1 Means Indicator should either all ZEROs or all ONEs per EmpId. Impliment this using SQL and DataStage both.

6 Answers   IBM,


i have one table with one column in this column i have three rows like 1,1,2 then that rows populate to target as first tow rows as one row and remaing row as one row how it posible? COLUMN_NAME SHIVA RAMU MADHU THEN I WANT TO LIKE SHIVA AND RAMU IN ONE ROW AND MADHU IS ONE ROW IF ANY ONE KNOW PLZ TELL ME

3 Answers   Cap Gemini,


Is the value of staging variable stored temporarily or permanently?

0 Answers  


I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in the output

6 Answers   TCS,


Can you explain kafka connector?

0 Answers  


sed,awk,head

0 Answers   CTS,


hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2, 10, 4.5 1, 30, 5 3, 10, 6 3, 20, 4 1, 20, 9 then target should be in below form... empno,max(salary),min(salary),deptno 1, 9, 3.5, 20 2, 8, 4.5, 20 3, 6, 4, 10 can anyone give data flow in data stage for the above scenario.... thanks in advance...

5 Answers  


country, state 2 tables r there. in table 1 have cid,cname table2 have sid,sname,cid. i want based on cid which country's having more than 25 states i want to display?

3 Answers   Wipro,


What is ibm datastage?

0 Answers  


Where do you see different stages in the designer?

0 Answers  


How do y read Sequential file from job control?

2 Answers   HP, IBM, Telesis,


input like 2 7 8 9 5 1 7 3 6 output:2 5 6 how to find out this plz explain?

2 Answers   HSBC,


Categories