Is there a way where I can only update the top x records in an update statement? The reason I ask is because the below statement will not work. Also, is there a way to make the selection random? Thanks.
Swi
Code:
Option Explicit
Dim conn, rs, num_marked
Set conn = CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\BCC\MM2010\Lists\;Extended Properties=dBASE 5.0;User ID=;Password="
conn.Execute "UPDATE [COLOR=red]TOP 2[/color] [TEST-A.DBF] SET [CODE1] = 'X' WHERE VAL([ZIP4]) BETWEEN 201200000 AND 201209999", num_marked
conn.Close
Set conn = Nothing
WScript.Echo num_marked1 + num_marked2 & " records marked for selection!"
Swi