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


Please Help Members By Posting Answers For Below Questions

How a source file is populated?

609


What are datastage sequences?

663


How to perform incremental load in datastage?

662


what are .ctl(control files) files ? how the dataset stage have better performance by this files?

2179


How to read the length of word in unix?

880






Can you filter data in hashed file?

3339


What are some prerequisites for datastage?

615


Why do we use exception activity in Datastage?

710


What is the importance of the exception activity in datastage?

618


What are system variables and sequencers in datastage

604


Can you explain tagbatch restructure operator?

697


Name the different sorting methods in datastage.

607


What is usage analysis in datastage?

805


What are the components of datastage?

646


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

649