Hello there...
I have a SQL-VB problem.
I use a program for a company. It inserts values to a table.
lets says table1
ID, date, amount
I use a vbscript that changes the date. But when in table1 many rows with the same id are inserted, only the last row is affected and the date is changed to the desirable value. I want a kind of loop that will be executed when some rows have the same id.
Any ideas?
I give you the part of the VBScript
I have a SQL-VB problem.
I use a program for a company. It inserts values to a table.
lets says table1
ID, date, amount
I use a vbscript that changes the date. But when in table1 many rows with the same id are inserted, only the last row is affected and the date is changed to the desirable value. I want a kind of loop that will be executed when some rows have the same id.
Any ideas?
I give you the part of the VBScript
Code:
YP=DATEPART("YYYY",DATE.VALUE)
MP=DATEPART("M",DATE.VALUE)
N= DATEPART("D",DATE.VALUE) IF N>0 AND N<16 THEN
DP=12
END IF
IF N>15 THEN DP=27
END IF
END IF
temp="'"&DP&"/"&MP&"/"&YP&"'"
DATE.VALUE= DB.QUERYRESULTS("select convert(datetime,"&temp&",103) as result",null,"result")
Comment