473,385 Members | 1,325 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,385 software developers and data experts.

Hanging Query

Hello everyone. We have a script with a periodic hanging query. What i mean, is that it sometimes seems to work, it sometimes seems to just hang up and never finish.

I have identified the query to be:

Update tp
set tp.descrip = bb.description
from [translation-new].dbo.products as tp, brokerbin.dbo.[compaq_parts] as bb
where tp.descrip IS NULL and
tp.code = bb.[Part Number] and
bb.Cond = 'NEW';

Here are the tables:

brokerbin.dbo[compaq_parts]:

[Part Number] - varchar(255)
Mfg - varchar(255)
Cond - varchar(255)
Price - varchar(255)
Qty - varchar(255)
[BBin Freq] - varchar(255)
Description - varchar(255)

[translation-new].dbo.products:

id - Int
catcount - Int
agrpcount - Int
pgrpcount - Int
disp_order - Int
code - varchar(256)
name - varchar(256)
tumbnail - varchar(256)
image - varchar(256)
price - float
cost - float
descrip - varchar(256)
weight - float
length - float
width - float
height - float
taxable - smallint
TDProdID - varchar(20)
active - smallint
cond - varchar(256)
basecode - varchar(256)
RecordSource - varchar(256)

I have been able to use the Where Clause to perform a select 100% of the time. however when this where is used in an update it stops working and the resource usage for the sqlserver is at 100% CPU. I am at a loss on this one.. thanks for any help you can provide.

--Dave
Feb 9 '07 #1
1 1512
iburyak
1,017 Expert 512MB
It is just a guess:

Try to change this line

[PHP]tp.descrip IS NULL [/PHP]
to

[PHP]isnull(tp.descrip, '') > ''[/PHP]
Feb 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Harlan Messinger | last post by:
A publication style guide indicates that for a table heading like the following, Table 3. Wheat and rye harvest in European countries in years that end in 3 or 7 or when a new prime minister...
25
by: Shannon Jacobs | last post by:
Maybe there is a simple trick here, and I'm not spotting it... Is there a guru of CSS hanging around here who can help out? The page in question has a multi-column table with a list of links in...
4
by: paulmac106 | last post by:
Hi, Periodically I run some very complex queries or stored procedures that "hang", and the bigger problem is that it locks up all of the database clients ie 50 users connecting to the db via a...
0
by: Anthony Ezkinazi | last post by:
I have the following query: SELECT a.address1, a.address2, a.address3, a.address4, a.name, a.id id, c.description, c.id category_id, c.name cat_name, MATCH (keywords)AGAINST...
1
by: =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?= | last post by:
Hello guys, I was wondering if anybody here had implemented a solution where Tables are aligned according to what the hanging indent tells us when there is a potential for the table overflowing...
5
by: Stanimir Stamenkov | last post by:
I'm trying to style an icon "hanging" below the first line of a heading and I've found interesting difference between Mozilla and the other browsers I'm trying with - Safari 3.1.1, Opera 9.27 and...
3
by: Microsoft | last post by:
Hi I have a c# program that continually runs 24/7 and performs a variety of tasks based on a timer. There is one routine that hangs every Saturday morning without fail. If I restart the...
2
by: kj | last post by:
Hi! I have a Pythonoob question. I have a script that hangs indefinitely at random times; the only thing to do at this point is to kill it. I'm looking for suggestions on how to troubleshoot...
0
by: ljkorhon | last post by:
We use an Access front-end to run reports by linking to our SQL database. The end users get to the Access file over Citrix and I have a local copy on my hard drive. The problem that I'm running...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.