Ed Dobias
10-20-2004, 08:40 AM
Good Morning
I have searched the BB but did not find any information to help...
I have 1 table that has serial number and model number. The serial numbers are "good" but the model numbers are not always typed in correctly. So, I have to go out to a cross-reference table that has serial number to model number relationship. What I need to do is find matching serial numbers in
the table where the model number in the cross reference table starts with a '37'.
Here is my attempt:
select
a.dlr_preg_model_no,
a.dlr_preg_serial_no,
b.dlr_inv_model_no,
b.dlr_inv_serial_no
from
ecd.stage_dlr_product_reg@ECM_TEST a,
dlr_inv_model_no b
where
b.dlr_inv_serial_no = a.dlr_preg_serial_no
and left(rtrim(b.dlr_inv_model_no), 2) in ('37')
The problem is no records are returned. However, I can verify manually that there are serial numbers with model numbers in the cross-reference table that start with '37' and are in the other table.
Any ideas? Do I need a Join in the somewhere?
Thanks for the help,
EJD
I have searched the BB but did not find any information to help...
I have 1 table that has serial number and model number. The serial numbers are "good" but the model numbers are not always typed in correctly. So, I have to go out to a cross-reference table that has serial number to model number relationship. What I need to do is find matching serial numbers in
the table where the model number in the cross reference table starts with a '37'.
Here is my attempt:
select
a.dlr_preg_model_no,
a.dlr_preg_serial_no,
b.dlr_inv_model_no,
b.dlr_inv_serial_no
from
ecd.stage_dlr_product_reg@ECM_TEST a,
dlr_inv_model_no b
where
b.dlr_inv_serial_no = a.dlr_preg_serial_no
and left(rtrim(b.dlr_inv_model_no), 2) in ('37')
The problem is no records are returned. However, I can verify manually that there are serial numbers with model numbers in the cross-reference table that start with '37' and are in the other table.
Any ideas? Do I need a Join in the somewhere?
Thanks for the help,
EJD