S
Santiago Gomez
Hello,
I have field called tblProjetcts.ProjectNumber. I need a query that shows
any records that contain a "P" inside the string (char) (example: 04444P).
That's easy.
The hard part, is that some projects with a P in it have a corresponding
number with no P (example: 04444), and that means the project is now active
and thus I do not want to see it (either the 0444P or the 0444) in my
results.
I was thinking about creating using vb to go though each record (with a P),
and searching another complete recordset to find a match for the same
number but no P, then discarding that record, and then MoveNext.
kinda like this:
rs.open "select * from tblProjects where ProjectNumber like '%P%'"
rsCompare.open "select * from tblProjects"
do while not rs.eof
if rs("ProjectNumber") = 'some loop that goes through all the rsCompare
records
.movenext
else ' if there is no match
'add this to another recordset or write to a temporary table
enf if
..movenext
loop
Any help would be greatly appreciated.
Thanks
I have field called tblProjetcts.ProjectNumber. I need a query that shows
any records that contain a "P" inside the string (char) (example: 04444P).
That's easy.
The hard part, is that some projects with a P in it have a corresponding
number with no P (example: 04444), and that means the project is now active
and thus I do not want to see it (either the 0444P or the 0444) in my
results.
I was thinking about creating using vb to go though each record (with a P),
and searching another complete recordset to find a match for the same
number but no P, then discarding that record, and then MoveNext.
kinda like this:
rs.open "select * from tblProjects where ProjectNumber like '%P%'"
rsCompare.open "select * from tblProjects"
do while not rs.eof
if rs("ProjectNumber") = 'some loop that goes through all the rsCompare
records
.movenext
else ' if there is no match
'add this to another recordset or write to a temporary table
enf if
..movenext
loop
Any help would be greatly appreciated.
Thanks