Solved

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

Posted on 2009-05-08
6
191 Views
Last Modified: 2012-05-06
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

0
Comment
Question by:HuiShi
  • 3
  • 3
6 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 24338005
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
0
 

Author Comment

by:HuiShi
ID: 24338111
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
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 24338201

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
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:HuiShi
ID: 24338428
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
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 24338464
the columns in the where clause have different collations, thats why you were getting the error. and the COLLATE function just convert a column /value into a different collation
0
 

Author Closing Comment

by:HuiShi
ID: 31579537
Thanks!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now