Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Read/Update Problem

Status
Not open for further replies.

CHTHOMAS

Programmer
Jun 16, 1999
106
AE
I have records in a table in the format below <br>
<br>
Field1,Field2,Datefield.<br>
<br>
blank, blank,04/03/2000<br>
value, value, blank<br>
value, value, blank<br>
....., ....., .....<br>
....., ....., .....<br>
blank, blank,05/03/2000<br>
value, value, blank<br>
value, value, blank<br>
....., ....., .....<br>
....., ....., .....<br>
<br>
These records are imported from a text file. The records comming after a date field are the records belonging to that date. ie records after 04/03/2000 are the records belonging to that date.<br>
<br>
I want to update the datefield of each record to the corresponding date. ie datefield of records comming after 04/03/2000 should be updated to 04/03/2000. Datefield of records comming after 05/03/2000 should be updated to 05/03/2000. How to accomplish this? Any help or suggestions will be highly appreciated. Thanks in advance.<br>
Regards,<br>
Charley
 
Well you should have an Identifier how do you know which records go together.<br>
Add a 4th field to your table like &quot;ID&quot;<br>
you can sort it but DO NOT make it a primary key Or you can not make it an Autonumber either.<br>
<br>
ID,Field1,Field2,Datefield<br>
1,blank, blank,04/03/2000<br>
1,value, value, blank<br>
1,value, value, blank<br>
....., ....., .....<br>
....., ....., .....<br>
2,blank, blank,05/03/2000<br>
2,value, value, blank<br>
2,value, value, blank<br>
....., ....., .....<br>
....., ....., .....<br>
<br>
--------------<br>
Then you know without a doubt which records are similar.<br>
<br>
<br>
<br>
<br>
<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
Doug,<br>
Sorry that i am not getting you completely. If i want to set the identifier how to do that? ie in the example you did mention, how to set or update the ID field for the records comming after date 04/03/2000 to 1?<br>
Regards,<br>
Charley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top