Hi All,
I have a strange issue.
In a distributed query (see below)
SELECT c.dtepublished
FROM its.dbo.internetinspection a
LEFT OUTER JOIN [ITS].[dbo].[itsimsinspectionxref] b
ON a.Insp_no=b.Insp_no
LEFT OUTER JOIN LSD1HQ.[IMS2000_database].[dbo].[tblInspection] c
ON c.[lngInspection_Key]=b.lngInspection_Key
WHERE a.batch_number=641
I get the following error:
Server: Msg 8179, Level 16, State 1, Line 1
Could not find prepared statement with handle -1.
If I run the same query but with c.* rather than c.dtepublished in the SELECT statement, it runs fine.
I could get round the issue but doing a SELECT INTO a temporary table and then selecting from it, but it’s the principle of it.
I wanted to find out why.
Any ideas??
Thanks in advance
TK
I have a strange issue.
In a distributed query (see below)
SELECT c.dtepublished
FROM its.dbo.internetinspection a
LEFT OUTER JOIN [ITS].[dbo].[itsimsinspectionxref] b
ON a.Insp_no=b.Insp_no
LEFT OUTER JOIN LSD1HQ.[IMS2000_database].[dbo].[tblInspection] c
ON c.[lngInspection_Key]=b.lngInspection_Key
WHERE a.batch_number=641
I get the following error:
Server: Msg 8179, Level 16, State 1, Line 1
Could not find prepared statement with handle -1.
If I run the same query but with c.* rather than c.dtepublished in the SELECT statement, it runs fine.
I could get round the issue but doing a SELECT INTO a temporary table and then selecting from it, but it’s the principle of it.
I wanted to find out why.
Any ideas??
Thanks in advance
TK