[dba-SQLServer] Locking Issue

Mark Rider mark at markkaren.com
Tue Jul 6 10:05:27 CDT 2004


The Update is being done in a SQL statement from VB.Net.  The basic
procedure is as follows:

1) Import the raw Stock data from a text file (DTS Import)
2) Loop through the raw data and create a temp table for each Stock,
including Time, Stock Name and Price
3) Create a Master table with a column for each stock and one for the Time
4) Update the Master Table to hold the Price for each Time for each Stock

This gives me a table that I can then manipulate as needed to get the values
for any given Stock and Time.  All tables are created from within the VB.NET
program, so I am pretty sure it is not a permissions issue.  The actual
update statement is:

UPDATE TempMaster  SET
MarketArray(i) =  tmpi.AveragePrice FROM tmpi , TempMaster
WHERE tmpi.quoteDate = TempMaster.quoteDate

The variable "i" is set in the program, and the necessary punctuation has
been removed for ease of reading. quoteDate is a smalldatetime in all
tables. MarketArray(i) is the Stock Symbol - varchar(5). AveragePrice id a
decimal.

This same program runs fine when I point to the original database - it is
only on the 'new' DB Server that it has problems.

Thanks for the help!

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francis
Harvey
Sent: Tuesday, July 06, 2004 9:32 AM
To: 'dba-sqlserver at databaseadvisors.com'
Subject: RE: [dba-SQLServer] Locking Issue

Mark,

Since the problem seems to be the update, perhaps it would be best to
explain how this is being performed. Are you using batch, stored procedures,
...?

Francis R Harvey III
WB 303, (301)294-3952
harveyf1 at westat.com
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com






More information about the dba-SQLServer mailing list