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
Describe the architecture of datastage?
Define repository tables in datastage?
Triggers,VIEW,Procedures
What is datastage?
what is use of SDR function?
what is flow of project?
Difference between sequential file and data set?
What is a ds designer?
how can we create rank using datastage?what is the meaning of rank?
Explain ibm infosphere information server and highlight its main features?
What is a quality stage in datastage tool?
What steps should be taken to improve Datastage jobs?
How many types of views are there in a datastage director?
How many types of sorting methods are available in datastage?
How a source file is populated?