OPENQUERY will solve your problem. Examples:
--This will fail:
select * from server1.bb01_db.dbo.bb01 (nolock)
where process_dt = '2002-12-02' and mid = '03301001' and
tran_dt = '2002-12-02'
--This will work if you have your linked servers set up --
correctly:
select * from openquery(server1, 'select * from
bb01_db.dbo.bb01 (nolock)
where process_dt = ''2002-12-02'' and mid = ''03301001''
and tran_dt = ''2002-12-02''')Ths will also work
exec server1.bb01_db.dbo.sp_executesql N'select * from bb01 (nolock)
where process_dt = ''2002-12-02'' and mid = ''03301001'' and
tran_dt =''2002-12-02'''
If those are datetimes then you should use yyyymmdd especially with remote
server calls just in case the dateformats are different.
"CurtM" wrote:
> OPENQUERY will solve your problem. Examples:
> --This will fail:
> select * from server1.bb01_db.dbo.bb01 (nolock)
> where process_dt = '2002-12-02' and mid = '03301001' and
> tran_dt = '2002-12-02'
> --This will work if you have your linked servers set up --
> correctly:
> select * from openquery(server1, 'select * from
> bb01_db.dbo.bb01 (nolock)
> where process_dt = ''2002-12-02'' and mid = ''03301001''
> and tran_dt = ''2002-12-02''')
>sql
Showing posts with label fail. Show all posts
Showing posts with label fail. Show all posts
Wednesday, March 28, 2012
Monday, March 26, 2012
Opening report in new window
I have a problem when opening a sql 2000 report in a new window. As
soon as the the report is opened, asp.net post-backs will fail.
This is what I do:
window.open('http//:[ip address]/reportserver?/ReportFolder/
ReportName')
As soon as I do that, asp.net post-backs on the opener will 'do
nothing'.
strange thing is that if I open the report using the name of the
server rather than ip address, it works fine
window.open('http//:[server name]/reportserver?/ReportFolder/
ReportName')
it also works fine on a development machine using 'localhost'.
The behavior I describe happens when the application is deployed to a
production server. Our customer must use the ip address of the server
for various reasons.
I've tried using a relative url ('../../reportserver?...') and i get
the same behaviour.
Any ideas?Have you tried using Globals!ReportServerUrl
"ruben@.lindenservices.com" wrote:
> I have a problem when opening a sql 2000 report in a new window. As
> soon as the the report is opened, asp.net post-backs will fail.
> This is what I do:
> window.open('http//:[ip address]/reportserver?/ReportFolder/
> ReportName')
> As soon as I do that, asp.net post-backs on the opener will 'do
> nothing'.
> strange thing is that if I open the report using the name of the
> server rather than ip address, it works fine
> window.open('http//:[server name]/reportserver?/ReportFolder/
> ReportName')
> it also works fine on a development machine using 'localhost'.
> The behavior I describe happens when the application is deployed to a
> production server. Our customer must use the ip address of the server
> for various reasons.
> I've tried using a relative url ('../../reportserver?...') and i get
> the same behaviour.
> Any ideas?
>sql
soon as the the report is opened, asp.net post-backs will fail.
This is what I do:
window.open('http//:[ip address]/reportserver?/ReportFolder/
ReportName')
As soon as I do that, asp.net post-backs on the opener will 'do
nothing'.
strange thing is that if I open the report using the name of the
server rather than ip address, it works fine
window.open('http//:[server name]/reportserver?/ReportFolder/
ReportName')
it also works fine on a development machine using 'localhost'.
The behavior I describe happens when the application is deployed to a
production server. Our customer must use the ip address of the server
for various reasons.
I've tried using a relative url ('../../reportserver?...') and i get
the same behaviour.
Any ideas?Have you tried using Globals!ReportServerUrl
"ruben@.lindenservices.com" wrote:
> I have a problem when opening a sql 2000 report in a new window. As
> soon as the the report is opened, asp.net post-backs will fail.
> This is what I do:
> window.open('http//:[ip address]/reportserver?/ReportFolder/
> ReportName')
> As soon as I do that, asp.net post-backs on the opener will 'do
> nothing'.
> strange thing is that if I open the report using the name of the
> server rather than ip address, it works fine
> window.open('http//:[server name]/reportserver?/ReportFolder/
> ReportName')
> it also works fine on a development machine using 'localhost'.
> The behavior I describe happens when the application is deployed to a
> production server. Our customer must use the ip address of the server
> for various reasons.
> I've tried using a relative url ('../../reportserver?...') and i get
> the same behaviour.
> Any ideas?
>sql
Subscribe to:
Posts (Atom)