Today, I was dizzy. I wrote a pile of garbage and ran a storage process for 40 seconds. Check the reason for this:ProgramToo much data is returned remotely, and network transmission is slow. Finally, I had to face the connection problem and asked my colleagues to shake their heads or be very busy. Let me talk about the logic first:
There are two remote tables: A (ID, filed1)
B (ID, filed2)
I want to join these two tables by ID, and then add an ID condition to retrieve the data I want. What is a simple matter! Poor thing is that nnd, sql6.5 always reports an error. In fact, I only need to return a few pieces of data, and finally I have to use a table to solve it.
Create Table Table1 (ID, filed1, filed2)
Insert (ID, filed1) Select ID, filed1 From A Where ID In (Condition)
Update Table1 Set Filed2 = B. filed2 From B Where Table1.id = B. ID
Sql6.5 really makes me very painful. Who can give me a good solution?