sreenu


{ City } s
< Country > india
* Profession * s
User No # 66655
Total Questions Posted # 0
Total Answers Posted # 9

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 44
Users Marked my Answers as Wrong # 8
Questions / { sreenu }
Questions Answers Category Views Company eMail




Answers / { sreenu }

Question { Wipro, 18136 }

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?


Answer

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

Question { CSC, 14545 }

I have a source like file it have Number of records and i want to load without first and last records in target?Datastage?


Answer

using external filter
in this we use command sed -n '1d,
$d'(this is unix command we use we get answer)
(or)
we use command tail +2 |sed -n '$d'

Is This Answer Correct ?    6 Yes 4 No


Question { 7839 }

hi this is kiran
i have one table i want divide the table with two different
table like even rows and odd rows
how can i do this one
tell me plzz


Answer

sourc->transformer->filter->two targets
in the transformer stage we have append new column and
derviation area write mod(@outrownum,2) (where @outrownum in
sysvarible)
after that we put fileter or switch in that
write condition on append column 0 then even records
1 then go odd records

Is This Answer Correct ?    1 Yes 0 No

Question { Patni, 14380 }

col1
123
abc
234
def
jkl
768
opq
567
789

but i want two targetss target1 contains only numeric values
and target2 contains only alphabet values like

trg1
123
234
768
567
789

trg2
abc
def
jkl
opq


Answer

source->transormer->fileter1->transformer1
->filter2 ->tranformer2 joinstage ->target
in source:-
take i/p
transformer :
append new collumn and apply char function is alpha
filter1:
separate 0
filter2:
separate 1
transformer1
add another column @outrownum
transformer 2
add another column @outrownum
we join on @rownum column we will get
do perfect we get answer

Is This Answer Correct ?    1 Yes 0 No

Question { IBM, 7365 }

what is factless fact table?


Answer

a facttable relation with dimension table as
forgienkey,bussiness transaction data and without facts is
called factless fact table

Is This Answer Correct ?    2 Yes 0 No

Question { Cap Gemini, 8951 }

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


Answer

seqfile->sort->transformer->removeduplicate->targer
inser file load
col1
1
1
2
in the sort
key->sort
allowduplicate->true
keychangecolumn->true
in the transformer
create the stage variable
if keychnage=1 then col1 else stagevariablename:col1
drag col1 in transformer
in the derivation area only put stagevariable
remove duplicate:
key:col1
you select last records
we will get answer
col1
11
2

Is This Answer Correct ?    14 Yes 1 No

Question { TCS, 9064 }

A flatfile contains 200 records.I want to load first 50
records at first time running the job,second 50 records at
second time running and so on,how u can develop the job?pls
give the steps?


Answer

flat file nothing but take sequence file use sed -n '1,50p'
using this command in filter option in the first running job.
second running job we use sed -n '51p,100' using this command
in this way we use other two times running job.....

Is This Answer Correct ?    8 Yes 1 No

Question { Polaris, 21658 }

how to retrive the max(sal),deptno,empno in datastage?


Answer

select sal,deptno,empno from emp where sal=(select max(sal)
from emp);
this is write answer check that......after checking any
queries ask me..........

Is This Answer Correct ?    1 Yes 1 No

Question { Polaris, 21658 }

how to retrive the max(sal),deptno,empno in datastage?


Answer

i writing query to in the user defined query we get answer
this is extension to first answer.......

Is This Answer Correct ?    0 Yes 1 No