With a little of imagination you can do a lot!!
here is a script, save it as dba_test.vbs on your desktop and you run it by going into Start then Run:
C:\Windows\SysWOW64\wscript.exe "C:\Users\john\Desktop\dba_test.vbs" where "john" is your user name
It will rename your po lines : 01, 02,03, etc, etc
here it is : Dim Connection
Dim Recordset
Dim cmd
Dim var_int
Dim Response
Dim the_line
Dim the_po
the_po = 39244 '
THIS IS THE PO NUMBER, CHANGE IT AS NEED IT Set Connection = CreateObject("ADODB.Connection")
Set Recordset = CreateObject("ADODB.Recordset")
Set cmd = CreateObject("ADODB.Command")
Connection.Open "DSN=MYODBC"
'YOU NEED TO CHANGE THIS !!! Set cmd.ActiveConnection = Connection
Recordset.Open "select bkap_pol_cntr from BKAPPOL where bkap_pol_ponm=" & the_po & " and bkap_pol_pcode <>'' order by bkap_pol_cntr;",Connection
var_int = 1
If Recordset.EOF Then
WScript.Echo("No Records Returned. ")
WScript.Quit
Else
Do While NOT Recordset.Eof
the_line = Recordset("bkap_pol_cntr")
cmd.CommandText = "update BKAPPOL set nkap_pol_um_lin_1='0" & var_int & "' where bkap_pol_ponm=" & the_po & " and bkap_pol_cntr=" & the_line & ";"
cmd.Execute
var_int = var_int + 1
Recordset.MoveNext
Loop
End If
Recordset.Close
Set Recordset=Nothing
Connection.Close
Set Connection=Nothing
'End
WScript.Echo("DONE !!!!")
WScript.Quit
Have fun
Kelloggs
This is for illustrative purposes only. This script is supplied "AS IS" without any warranties and support.