D
DanBakerUSAF
I am new to SQL in queries. I can ussually get what I want with forms and
the query wizard. This I cannot figure out and it seems like a SQL statement
might work. I import data from a spreadsheet automatically (a click of a cmd
button). I have most of the fields removed or appended to except one. I
need to duplicate a feild value to the empty values below it. Example:
ID NSN/MODDACC Description QTY UOM
1 7310-01-507-9310 (Stove) Modern Burner Unit LIN AA0084
2 20 EA
3 1005-00-550-8141 ACCELERATOR, MACHINE
4 25 EA
5 1010-01-043-2044 ACTUATOR FIRING PIN
6 5 RL
Records 1 & 2, 3 & 4 and 5 & 6 both need the same NSN/MODACC# respectively.
The ID#s change but are always sequencial. Basically if the NSN/MODDACC
field is null it needs to equal the previous records NSN/MODDACC. If it is
not null then move to next record.
End result looking like:
ID NSN/MODDACC Description QTY UOM
1 7310-01-507-9310 (Stove) Modern Burner Unit LIN AA0084
2 7310-01-507-9310 20 EA
3 1005-00-550-8141 ACCELERATOR, MACHINE
4 1005-00-550-8141 25 EA
5 1010-01-043-2044 ACTUATOR FIRING PIN
6 1010-01-043-2044 5 RL
Anyway this can be done with either an append or update query? I would even
be able to work with a make table if need be.
This is the last in a long string of firsts for me and would greatly
appreciate any input or suggestions. As I said before SQL and most VB code is
above me, I like to keep it simple. I am looking for a dumb down
explanation. Thank you in advance for your help.
the query wizard. This I cannot figure out and it seems like a SQL statement
might work. I import data from a spreadsheet automatically (a click of a cmd
button). I have most of the fields removed or appended to except one. I
need to duplicate a feild value to the empty values below it. Example:
ID NSN/MODDACC Description QTY UOM
1 7310-01-507-9310 (Stove) Modern Burner Unit LIN AA0084
2 20 EA
3 1005-00-550-8141 ACCELERATOR, MACHINE
4 25 EA
5 1010-01-043-2044 ACTUATOR FIRING PIN
6 5 RL
Records 1 & 2, 3 & 4 and 5 & 6 both need the same NSN/MODACC# respectively.
The ID#s change but are always sequencial. Basically if the NSN/MODDACC
field is null it needs to equal the previous records NSN/MODDACC. If it is
not null then move to next record.
End result looking like:
ID NSN/MODDACC Description QTY UOM
1 7310-01-507-9310 (Stove) Modern Burner Unit LIN AA0084
2 7310-01-507-9310 20 EA
3 1005-00-550-8141 ACCELERATOR, MACHINE
4 1005-00-550-8141 25 EA
5 1010-01-043-2044 ACTUATOR FIRING PIN
6 1010-01-043-2044 5 RL
Anyway this can be done with either an append or update query? I would even
be able to work with a make table if need be.
This is the last in a long string of firsts for me and would greatly
appreciate any input or suggestions. As I said before SQL and most VB code is
above me, I like to keep it simple. I am looking for a dumb down
explanation. Thank you in advance for your help.