Home All Groups Group Topic Archive Search About

Question to linked server, wrong result



Author
20 Jan 2006 1:15 PM
ln54
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??

Author
20 Jan 2006 1:52 PM
SQL
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/
Are all your drivers up to date? click for free checkup

Author
20 Jan 2006 2:02 PM
ln54
Problem solved:  no longer an issue

Show quoteHide quote
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

"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??
>
>
>
>
>
>

Bookmark and Share