T
tim
I'm trying write to table 3 any records that are not the same any of the
70+ fields that I need to check between table 1 and table 2.
(name , addr, etc ...)
the problem is, some of fields have nulls and I can't concatenate the sql
string. (and the well be string is too long as well)
so can I write the whole record set from table 1 to table 3.
something like ---- strSQL_ins1 = "insert into particip_changes" + rsd!
if needed - code so far.
these work:
Set rsd = db.OpenRecordset("SELECT * " & _
" from particip_today order by GROUP, PARTIC, EFFDT, END")
Set rs = db.OpenRecordset("SELECT * " & _
" from particip_yesterday order by GROUP, PARTIC, EFFDT, END")
VP_GROUP = rsd!GROUP
....
VY_GROUP = rs!GROUP
....
the compare works:
.... compare 70+ fields, if one is diff write whole record.
myStatus = (VP_GROUP <> VY_GROUP)
....
myStatus = myStatus Or (VP_INITDT <> VY_INITDT)
If myStatus = True Then
ins_flag = 1
Else
ins_flag = 0
End If
These do not work - what would ?
strSQL_ins1 = "insert into particip_changes" + rsd!
nor does
strSQL_ins1 = "insert into particip_changes" + rsd!*
this works but I would like to write the record set rsd! to be sure i have
the correct record. ( could have multiply GROUP, PARTIC, EFFDT, END)
'strSQL_ins1 = "insert into particip_format_c_changes select
particip_format_c.*, * from particip_format_c where GROUP = '" + rsd!GROUP
.......
TIA
70+ fields that I need to check between table 1 and table 2.
(name , addr, etc ...)
the problem is, some of fields have nulls and I can't concatenate the sql
string. (and the well be string is too long as well)
so can I write the whole record set from table 1 to table 3.
something like ---- strSQL_ins1 = "insert into particip_changes" + rsd!
if needed - code so far.
these work:
Set rsd = db.OpenRecordset("SELECT * " & _
" from particip_today order by GROUP, PARTIC, EFFDT, END")
Set rs = db.OpenRecordset("SELECT * " & _
" from particip_yesterday order by GROUP, PARTIC, EFFDT, END")
VP_GROUP = rsd!GROUP
....
VY_GROUP = rs!GROUP
....
the compare works:
.... compare 70+ fields, if one is diff write whole record.
myStatus = (VP_GROUP <> VY_GROUP)
....
myStatus = myStatus Or (VP_INITDT <> VY_INITDT)
If myStatus = True Then
ins_flag = 1
Else
ins_flag = 0
End If
These do not work - what would ?
strSQL_ins1 = "insert into particip_changes" + rsd!
nor does
strSQL_ins1 = "insert into particip_changes" + rsd!*
this works but I would like to write the record set rsd! to be sure i have
the correct record. ( could have multiply GROUP, PARTIC, EFFDT, END)
'strSQL_ins1 = "insert into particip_format_c_changes select
particip_format_c.*, * from particip_format_c where GROUP = '" + rsd!GROUP
.......
TIA