Link to home
Start Free TrialLog in
Avatar of HuiShi
HuiShi

asked on

Using Linked Server in SSRS 2000 Reports( Linked Server Query returns NULL)

Hi there:
  I have a query which requires the liked server in sql server . Below is the query.
However,it always returns NULL data...

Anyone has seen this before?

 thanks

 Hui


select ps_tbl.DESCR from PSDB..SYSADM.PS_PRODUCT_TBL ps_tbl 
where ps_tbl.PRODUCT = ' substring(ccontl.gl_type_id,7,4)'

Open in new window

Avatar of Aneesh
Aneesh
Flag of Canada image

select ps_tbl.DESCR
from PSDB..SYSADM.PS_PRODUCT_TBL ps_tbl
where ps_tbl.PRODUCT =  substring(ccontl.gl_type_id,7,4)   --- no quotes here
Avatar of HuiShi
HuiShi

ASKER

Thanks.  I got  the following error after putting the modified Clause

Can not resolve teh collation confliect between
"SQL_LATIN1_GENERAL_CP1_CS_AS"  and
"SQL_LATIN1_GENERAL_CP1_CI_AS" IN the equal to operation

any idea about that?

thanks

select ps_tbl.DESCR
from PSDB..SYSADM.PS_PRODUCT_TBL ps_tbl
where ps_tbl.PRODUCT COLLATE SQL_LATIN1_GENERAL_CP1_CS_AS = substring(ccontl.gl_type_id,7,4) COLLATE SQL_LATIN1_GENERAL_CP1_CS_AS
Avatar of HuiShi

ASKER

thanks, it works. Can you tell why it's working? also why do I need to punch the
COLLATE SQL_LATIN1_GENERAL_CP1_CS_AS?

Hui
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HuiShi

ASKER

Thanks!