|
Mas Hengki,
Setahu saya di Sybase SQLANywhere 5.5.0.4, perintah yang bisa digunakan adalah:
"set row count" terlebih dahulu sebelum melakukan transaksi entah itu select, delete maupun update.
Lalu jika mau di-normalisasi, tinggal kasih "set row count 0"
Salam,
Afri
******************** SET ROWCOUNT integer The Transact-SQL ROWCOUNT option limits the number of rows fetched for any cursor to the specified integer. This includes rows fetched by re-positioning the cursor. Any fetches beyond this maximum return a warning. The option setting is considered when returning the estimate of the number of rows for a cursor on an OPEN request.
SET ROWCOUNT also limits the number of rows affected by a searched UPDATE or DELETE statement to integer. This might be used, for example, to allow COMMIT statements to be performed at regular intervals to limit the size of the rollback log and lock table. The application (or procedure) would need to provide a loop to cause the update/delete to be re-issued for those rows not affected by the first operation. A simple example is given below:
begin
declare @count integer
set rowcount 20
while(1=1) begin
update employee set emp_lname='new_name' where emp_lname <> 'old_name' /* Stop when no rows changed */
select @count = @@rowcount if @count = 0 break print string('Updated ',@count,' rows; repeating...') commit end set rowcount 0
end In SQL Anywhere, if the ROWCOUNT setting is greater than the number of rows that ISQL can display, ISQL may do some extra fetches to reposition the cursor. Thus the number of rows actually displayed may be less than the number requested. Also, if any rows are re-fetched due to truncation warnings, the count may be inaccurate.
********************
>>> "hengki" <[email protected]> 5/19/2011 11:53 AM >>>
Mas kalau pake sqlanywhere 5.5.04 Build #1867 bisa gak -----Original Message----- pake database apa pak? soalnya beda2 loh masing2 db
|
<<image/xxx>>
<<image/xxx>>
<<image/gif>>
<<image/xxx>>
