Hi I have scenario like this
s/r table T/r table
ename,sal empno,ename,sal
vijay,2000 1 , vijay, 2000
kumar,3000 2 ,kumar , 3000
ravi ,4000 3 ,ravi , 4000
How can i get target table like that without using
Transformer stage?
Answer Posted / krishna evsg
Hi Vijay
Actually I don't Know Transformer stage, But we can do the
above scnario in SQLSERVER2005. In SQLSERVER2005 we have a
built in function for Row_Number().
create table Source_Tab
(
ename varchar(max)
,sal money
)
GO
create table Target_Tab
(
eno int
,ename varchar(max)
,sal money
)
GO
insert into Source_Tab values('vijay',2000)
GO
insert into Source_Tab values('kumar ',3000)
GO
insert into Source_Tab values('ravi ',4000)
GO
insert into Target_Tab
(
eno
,ename
,sal
)
select ROW_NUMBER() OVER (ORDER BY ename)
AS 'RowNumber',ename,sal from source_Tab
SELECT * FROM Target_Tab
GO
SELECT * FROM source_Tab
GO
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How a source file is populated?
What are datastage sequences?
How to perform incremental load in datastage?
what are .ctl(control files) files ? how the dataset stage have better performance by this files?
How to read the length of word in unix?
Can you filter data in hashed file?
What are some prerequisites for datastage?
Why do we use exception activity in Datastage?
What is the importance of the exception activity in datastage?
What are system variables and sequencers in datastage
Can you explain tagbatch restructure operator?
Name the different sorting methods in datastage.
What is usage analysis in datastage?
What are the components of datastage?
What are some different alternative commands associated with "dsjob"?