473,396 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

sorting problem with linked server

js
I am using SQL Server 2000. I am getting the following error when
executing the following query. The query joins a view
[Server2].dbx.dbo.vwreports that resides on a linked server. I can sort
on fields on D table or R view individually, but some fields take a
long time to sort even they are on non-cluster indexes. I can not sort
on any field in table E, K, and L at all. Also I tried to save this
query as a view in the local server. SQL Server does not allow
creating a view base on this query.

Does anyone know why?

===== Error here =======
Microsoft OLE DB Provider for SQL Server error '80040e14'
Only text pointers are allowed in work tables, never text, ntext, or
image columns. The query processor produced a query plan that required
a text, ntext, or image column in a work table.

===== Query here =======
SELECT D.*, DATEADD(s, R.open_date, '12/31/1969 08:00:00pm') AS
openDate, DATEADD(s, R.close_date, '12/31/1969 08:00:00pm') AS
closeDate, R.c_last_name AS custLastName, R.c_first_name AS
custFirstName, R.description, (DATEDIFF(s, DATEADD(s, R.open_date,
'12/31/1969 08:00:00pm'), getdate()))/(60*60*24) as lapse, E.[LAST
NAME] AS techLastName, E.[FIRST NAME] AS techFirstName, E.EMPLOYEEID AS
techID, K.MAKE, K.MAKEID, L.MODEL, L.MODELID, R.customer AS customer,
R.iorg_name AS org FROM dbo.DellIDI D LEFT OUTER JOIN dbo.EMPLOYEE E on
D.technicianid = E.employeeid LEFT OUTER JOIN dbo.MAIN M ON D.Serial =
M.[S/N] LEFT OUTER JOIN dbo.MAKE K ON M.MAKE = K.MAKEID LEFT OUTER JOIN
dbo.MODEL L ON M.MODEL = L.MODELID INNER JOIN
[Server2].dbx.dbo.vwreports R ON D.RequestID = R.ref_num order by
(DATEDIFF(s, DATEADD(s, R.open_date, '12/31/1969 08:00:00pm'),
getdate()))/(60*60*24)

Jul 23 '05 #1
1 1705
js (an********@yahoo.com) writes:
I am using SQL Server 2000. I am getting the following error when
executing the following query. The query joins a view
[Server2].dbx.dbo.vwreports that resides on a linked server. I can sort
on fields on D table or R view individually, but some fields take a
long time to sort even they are on non-cluster indexes. I can not sort
on any field in table E, K, and L at all. Also I tried to save this
query as a view in the local server. SQL Server does not allow
creating a view base on this query.


Not having access to your tables and views, and with no information
they look, it is difficult to assess the problem. But judging from
the error messages, there are BLOB columns (text/ntext/image) involved
somewhere, either directly in the query or in the view. If you can,
try to exlucde these columns from the equation, to see if you have
better luck.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kakarot | last post by:
I'm gona be very honest here, I suck at programming, *especially* at C++. It's funny because I actually like the idea of programming ... normally what I like I'm atleast decent at. But C++ is a...
18
by: Matthias Kaeppler | last post by:
Hi, in my program, I have to sort containers of objects which can be 2000 items big in some cases. Since STL containers are based around copying and since I need to sort these containers quite...
3
by: darth | last post by:
Does anyone have heap sorting with queue(doublely linked list) in C? I have heap sort with array but with queue, it's somewhat hard.
3
by: sugaray | last post by:
hi, i have to build a linked-list which has another sturcture _score as it's data entry, so how can i sort such linked-list based on, let say, history score into proper order...
7
by: Foodbank | last post by:
Hi everyone. I'm having trouble with this radix sorting program. I've gotten some of it coded except for the actual sorting :( The book I'm teaching myself with (Data Structures Using C and...
1
by: PhilB | last post by:
I have been having issues trying to merge sort a double linked list. (I would supply the code, but it is locked away on an inaccessable computer.) The list always results in an unsorted list, but...
4
by: FBM | last post by:
Hi, I am working on a program that simulates one of the elements of ATM. The simulation stores events which occurs every some milliseconds for a certain amount of time. Every time that an event...
20
by: martin-g | last post by:
Hi. Mostly I program in C++, and I'm not fluent in C# and .NET. In my last project I began to use LinkedList<and suddenly noticed that can't find a way to sort it. Does it mean I must implement...
4
by: arnuld | last post by:
This program follows from the section 6.5 of K&R2 where authors created a doubly-linked list using a binary-tree based approach. The only thing I have rewritten myself is the getword function. I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.