hovercraft
Technical User
I'm really at a loss for how to accomplish this.
I want to update a table (tbl1) which has a list of pre-defined serial numbers (my_serial) and some empty fields (casenum, ticketnum, dob, lastname)
I need to update tbl1 with records from a second table (tbl2). tbl2 has the fields (cust_casenum, cust_ticketnum, cust_dob, cust_lastname)
Not all of the fields are empty in tbl1, so I'm trying to find the next record with empty fields (empty being casenum,ticketnum etc...my_serial is populated) and update them to the value of tbl2.
I thought perhaps I could nest a COUNT of the records in tbl2 as the value for TOP in a sql statement but then I found out I couldn't use UPDATE with TOP and now my brow hurts from squinting and scowling.
Does anyone have any suggestions on how to tackle this?
Thanks in advance,
Hovercraft
I want to update a table (tbl1) which has a list of pre-defined serial numbers (my_serial) and some empty fields (casenum, ticketnum, dob, lastname)
I need to update tbl1 with records from a second table (tbl2). tbl2 has the fields (cust_casenum, cust_ticketnum, cust_dob, cust_lastname)
Not all of the fields are empty in tbl1, so I'm trying to find the next record with empty fields (empty being casenum,ticketnum etc...my_serial is populated) and update them to the value of tbl2.
I thought perhaps I could nest a COUNT of the records in tbl2 as the value for TOP in a sql statement but then I found out I couldn't use UPDATE with TOP and now my brow hurts from squinting and scowling.
Does anyone have any suggestions on how to tackle this?
Thanks in advance,
Hovercraft