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

What are the differences between datastage and informatica?

568


How will you load you daily/monthly jobs datas in to Fact and Dimension table using datastage.

2987


How can one find bugs in job sequence?

782


How many types of stage?

673


im new to this tool im now at project plz tell me step by step process how to design plz help me i wnt to go with exp for job plz give me d proper design and explination

1627






Differentiate between hash file and sequential file?

578


i have a job with 3 possibiliies finish with ststus ok abbort warning how do you handle these 3 in job sequence? explain the situation where you have appiled scd in your project? chandu

2270


A signal has a wavelength of 1 micro min in air.how far can the front of the wave travel during 1000periods?

2027


How many types of views are there in a datastage director?

832


In Datastage, how you can fix the truncated data error?

640


How many areas for files does datastage have?

640


What is the difference between server job and parallel jobs?

663


What are the primary usages of datastage tool?

623


What are the functionalities of link partitioner and link collector?

594


What are the different kinds of views available in a datastage director?

600