| Author |
Topic  |
|
|
kond.mohan
Posting Yak Master
India
140 Posts |
Posted - 02/21/2013 : 09:18:44
|
dear all we are loading the data from ORACLE to Sql server. when i am selecting below part i am getting the 2 records RCT.REF_CODE VALUE 'MAA'
but RCT.REF_CODE VALUE 'MAA' and RCT.REF_CODE VALUE 'MAA ' is different.
----SQLSERVER SELECT REF_CODE,REF_DESC FROM RCT WHERE rct.REF_REC_TYPE ='01' and RCT.REF_CODE = 'MAA' --OUTPUT REF_CODE REF_DESC MAA CHENNAI MAA MASHAD
USING OPEQUERY EXECUTING ON ORACLE DATABASE select * from openquery(finuat,'select REF_CODE,REF_DESC from tbaadm.RCT where rct.REF_REC_TYPE =''01'' and RCT.REF_CODE = ''MAA''') ---------OUTPUT REF_CODE REF_DESC MAA CHENNAI select * from openquery(finuat,'select REF_CODE,REF_DESC from tbaadm.RCT where rct.REF_REC_TYPE =''01'' and RCT.REF_CODE ''MAA ''') --------OUTPUT REF_CODE REF_DESC MAA MASHAD
how can i get the single record throug sql server statemet |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 02/21/2013 : 22:41:12
|
whats the datatype of REF_CODE ?
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
kond.mohan
Posting Yak Master
India
140 Posts |
Posted - 02/22/2013 : 00:17:35
|
| datatype is :REF_CODE(nvarchar(5),null) |
 |
|
|
bandi
Flowing Fount of Yak Knowledge
India
1451 Posts |
Posted - 02/22/2013 : 03:18:19
|
In Oracle database, what is the data type of REF_CODE ?
-- Chandu |
 |
|
|
kond.mohan
Posting Yak Master
India
140 Posts |
Posted - 02/22/2013 : 04:52:57
|
hi all same field in oracle is varchar2 datatype |
 |
|
|
DonAtWork
Flowing Fount of Yak Knowledge
2111 Posts |
|
|
kond.mohan
Posting Yak Master
India
140 Posts |
Posted - 02/22/2013 : 07:24:32
|
DEAR ALL we are connecting through linked server.which using in SSIS packages. fetching all the data without any trnsforamtions between source and distnations(full load).
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 02/23/2013 : 02:08:44
|
are these values taken from some other source like may a file in ssis?
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
bandi
Flowing Fount of Yak Knowledge
India
1451 Posts |
Posted - 02/26/2013 : 09:14:14
|
Hi,
In Oracle, these two statements will give different results for varchar2 datatype, whereas sql server will treat both are same 'select REF_CODE,REF_DESC from tbaadm.RCT where rct.REF_REC_TYPE =''01'' and RCT.REF_CODE = ''MAA'''
'select REF_CODE,REF_DESC from tbaadm.RCT where rct.REF_REC_TYPE =''01'' and RCT.REF_CODE ''MAA ''')
-- Chandu |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 02/26/2013 : 22:42:59
|
Apply RTRIM and do the comparison then
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
| |
Topic  |
|