I am not good with SQL, so I am pretty well stuck. This is what I have:
tblDrawings:
drawingID - serves as unique identifier (Replication ID)
partNumber - actual part number
misc fields that aren't important
relDrawingComponents:
partNumber
componentPartNumber
componentCount
I added the drawingID to tblDrawings after the table was populated. However, I had also created parent-child relationships between parts from tblDrawings in relDrawingComponents. That is, a part in tblDrawings will have components also listed as parts in tblDrawings. I have both tables populated already with thousands of records, so I cannot really easily repopulate these tables. What I need is to change the fields in relDrawingComponents. I need partNumber to have that part number's associated drawingID as listed in tblDrawings. In addition, I need componentPartNumber to have that part number's associated drawingID as listed in tblDrawings. I don't really need partNumber or componentPartNumber, just the correct drawingID's for each. This is ideally the table I am looking for:
relDrawingComponents:
drawingID
componentDrawingID
componentCount
Any idea how to write an UPDATE query that would provide me the values required in relDrawingComponents?
Any help is much appreciated! Thanks in advance!!!
Jon
tblDrawings:
drawingID - serves as unique identifier (Replication ID)
partNumber - actual part number
misc fields that aren't important
relDrawingComponents:
partNumber
componentPartNumber
componentCount
I added the drawingID to tblDrawings after the table was populated. However, I had also created parent-child relationships between parts from tblDrawings in relDrawingComponents. That is, a part in tblDrawings will have components also listed as parts in tblDrawings. I have both tables populated already with thousands of records, so I cannot really easily repopulate these tables. What I need is to change the fields in relDrawingComponents. I need partNumber to have that part number's associated drawingID as listed in tblDrawings. In addition, I need componentPartNumber to have that part number's associated drawingID as listed in tblDrawings. I don't really need partNumber or componentPartNumber, just the correct drawingID's for each. This is ideally the table I am looking for:
relDrawingComponents:
drawingID
componentDrawingID
componentCount
Any idea how to write an UPDATE query that would provide me the values required in relDrawingComponents?
Any help is much appreciated! Thanks in advance!!!
Jon