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
Whats difference betweeen operational data stage (ods) and data warehouse?
Which commands are used to import and export the datastage jobs?
What is the difference between in process and inter process?
how many rows sorted in sort stage by default in server jobs
On which Dimension Table you implemented SCD Type in your Project
What are sequencers?
Differentiate between validated and Compiled in the Datastage?
What are orabulk and bcp stages?
Name the third party tools that can be used in datastage?
Does datastage support slowly changing dimensions ?
There are two file are there .1st file contains 5 records and 2nd file contain 10 records in target they want 50 records.how can achieve this
What are the job parameters?
What is the difference between hashfile and sequential file?
Where do you see different stages in the designer?
What is ibm datastage?