M
mcnewsxp
i need to put a value in one field if another field equal one value and into
3 other fields if the value is something else.
so result = "NEG" if example <> 'XXX' else res1, res2, res3 = "NEG"
here's what i got:
sql = "INSERT INTO [tblDetail] " & _
"(itemnum, detailnum, location, passage, detailline, example, result ) " & _
"SELECT [tblTempDetail].itemnum, " & txtRealtimeNum.Value & _
", [tblTempDetail].Location & ' ; Plate ' & [tblTempDetail].Plate,
[tblTempDetail].Passage, " & _
"[tblTempDetail].detailline, [tblTempDetail].examples, 'NEG' " & _
"FROM [tblTempDetail] " & _
"WHERE [tblTempDetail].RealtimeNum = " & txtRealtimeNum.Value & _
" ORDER BY [tblTempDetail].TempKey"
can it be done with one query like this?
tia,
mcnewsxp
3 other fields if the value is something else.
so result = "NEG" if example <> 'XXX' else res1, res2, res3 = "NEG"
here's what i got:
sql = "INSERT INTO [tblDetail] " & _
"(itemnum, detailnum, location, passage, detailline, example, result ) " & _
"SELECT [tblTempDetail].itemnum, " & txtRealtimeNum.Value & _
", [tblTempDetail].Location & ' ; Plate ' & [tblTempDetail].Plate,
[tblTempDetail].Passage, " & _
"[tblTempDetail].detailline, [tblTempDetail].examples, 'NEG' " & _
"FROM [tblTempDetail] " & _
"WHERE [tblTempDetail].RealtimeNum = " & txtRealtimeNum.Value & _
" ORDER BY [tblTempDetail].TempKey"
can it be done with one query like this?
tia,
mcnewsxp