So I've set up 3 tables for some recursive data verification for an
object link embedding procedure.
Basically importing filenames.
The three fields in question are identical.
Document_link.k ey2_value
document_link_s taging.key2_val ue
document_link_s torage.key2_val ue
And these three fields are populated from a substring of the filenames
which are generated in another table.
Filenametbl.pic kno
here is the rub.
If I have 100 identical records in the document link tables with
key2_values that are in Filenametbl, and three hundred records in
Filenametbl, then this query:
select * from Filenametbl where pickno not in (select key2_value from
document_link_s taging) and pickno not in (select key2_value from
document_link_s torage)
should return 200 records.
It returns 0 records.
So while this query:
select * from Filenametbl where pickno not in (select key2_value from
document_link_s taging)
returns 200 records in this scenario,
this query returns 0:
select * from Filenametbl where pickno not in (select key2_value from
document_link_s torage)
I am trying to figure out why that is, as the casting for the
key2_values is exactly the same (varchar(255))
Can anybody tell me how to remedy this sort of thing, as its been
bugging me for about 2 months.
I've been able to work around it, but what it is... is just terribly
ineffiecient.
object link embedding procedure.
Basically importing filenames.
The three fields in question are identical.
Document_link.k ey2_value
document_link_s taging.key2_val ue
document_link_s torage.key2_val ue
And these three fields are populated from a substring of the filenames
which are generated in another table.
Filenametbl.pic kno
here is the rub.
If I have 100 identical records in the document link tables with
key2_values that are in Filenametbl, and three hundred records in
Filenametbl, then this query:
select * from Filenametbl where pickno not in (select key2_value from
document_link_s taging) and pickno not in (select key2_value from
document_link_s torage)
should return 200 records.
It returns 0 records.
So while this query:
select * from Filenametbl where pickno not in (select key2_value from
document_link_s taging)
returns 200 records in this scenario,
this query returns 0:
select * from Filenametbl where pickno not in (select key2_value from
document_link_s torage)
I am trying to figure out why that is, as the casting for the
key2_values is exactly the same (varchar(255))
Can anybody tell me how to remedy this sort of thing, as its been
bugging me for about 2 months.
I've been able to work around it, but what it is... is just terribly
ineffiecient.
Comment