Showing posts with label bav001. Show all posts
Showing posts with label bav001. Show all posts

Friday, March 30, 2012

Question to linked server, wrong result

First the question and correct result in Oracle
SQL> select distinct anv_uppg, profilkod from ekop2.bav001
where anv_uppg like 'san%' ;
ANV_UPPG PRO
-- --
sanderss SAN
----
Linked server question from query analyzer
SELECT distinct ANV_UPPG, REG_NAMN
FROM HACTAR..EKOP2.BAV001
where anv_uppg like 'san%'
--
sanderss GNO
sanderss SAN
----
I have never seen this before and it usually works fine.
Any idea what's wrong'Are you sure you don't want
SELECT distinct ANV_UPPG, REG_NAMN
FROM HACTAR..EKOP2.BAV001
where pro like 'san%'
becuase the query you showed return 2 records and that is correct for
the field anv_uppg (sanderss)
http://sqlservercode.blogspot.com/|||Problem solved: no longer an issue
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"ln54" wrote:
> First the question and correct result in Oracle
> SQL> select distinct anv_uppg, profilkod from ekop2.bav001
> where anv_uppg like 'san%' ;
> ANV_UPPG PRO
> -- --
> sanderss SAN
>
> ----
> Linked server question from query analyzer
> SELECT distinct ANV_UPPG, REG_NAMN
> FROM HACTAR..EKOP2.BAV001
> where anv_uppg like 'san%'
> --
> sanderss GNO
> sanderss SAN
> ----
> I have never seen this before and it usually works fine.
> Any idea what's wrong'
>
>
>sql