Solved

How to declare 2 dim varchar array, lock table

Posted on 2002-07-08
1
1,104 Views
Last Modified: 2008-02-26
i use sql server 7.
1) how to declare varchar array of 2 dimension and how to use it?
2) How to lock a table [i want to lock when a critical procedure is being executed. i want the table to be locked till proc is executed]
0
Comment
Question by:sanjaykattimani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
ID: 7139838
1) you cannot declare arrays in SQL Server, for data storage I would create a table with 2 address columns.

2) use transactions and locking hints:
CREATE yourproc
AS
BEGIN TRANSACTION
SELECT * FROM YOURTABLE (HOLDLOCK, UPDLOCK) <WHERE somecondition>
...


COMMIT TRANSACTION
GO

CHeers
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question