× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Thanks for your reply Birgitta
I almost ALWAYS forget to mention the release that we are on (v5r4), so
unfortunately that method is not available
Again - thanks
Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill



"Birgitta Hauser"
<Hauser@sss-softw
are.de> To
Sent by: "'Midrange Systems Technical
midrange-l-bounce Discussion'"
s@xxxxxxxxxxxx <midrange-l@xxxxxxxxxxxx>
cc

09/23/2010 01:25 Subject
AM AW: usinfg sql to delete records,
but some records are locked by
users
Please respond to
Midrange Systems
Technical
Discussion
<midrange-l@midra
nge.com>






Hi,

If you are on release 6.1 or higher, you may add SKIP LOCKED DATA to your
Update or Delete Statement.

Here the documentation out of the SQL Reference:
SKIP LOCKED DATA
Specifies that the select-statement, searched UPDATE statement (including a
searched update operation in a MERGE statement), or searched DELETE
statement that is prepared in the PREPARE statement will skip rows when
incompatible locks are held on the row by other transactions. These rows
can
belong to any accessed table that is specified in the statement. SKIP
LOCKED
DATA can be used only when isolation level NC, UR, CS, or RS is in effect.
SKIP LOCKED DATA is ignored if it is specified when the isolation level
that
is in effect is RR.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Alan Shore
Gesendet: Wednesday, 22. September 2010 22:59
An: midrange-l@xxxxxxxxxxxx
Betreff: usinfg sql to delete records, but some records are locked by users


Hi everyone
I am using SQL to delete records from a file. Nothing fancy
delete from filea where rectype = '1'

On development, this just flies through
On production - not the same
I think that its is because some users may have some of these records
locked
Apart from asking the users to temporarily sign off (LAST RESORT)
Is there a way within SQL to bypass those records that are locked and
delete all the records that are not locked

I have the luxury of coming back to those non-deleted records later

As always, any and all responses MUCH appreciated
Thanks in advance

Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.