ITALIAORIANA
Technical User
Hi,
I have a table that I need to update blank description fields with an existing description. The existing description is based on a 5 character code. (example 12345 is the code) I need to update any other codes with the same initial 5 characters with that description. So 12345AB, 12345CD, 12345EF should all have the same description as 12345 for any that are blank. I wrote a select query to review the results, however it is not working properly because I keep getting zero results. Can someone tell me if this is written incorrectly for what I am looking to do?
SELECT A.IPCD_ID, A.IPCD_DESC, B.IPCD_DESC FROM CMC_IPCD_PROC_CD A
INNER JOIN CMC_IPCD_PROC_CD B ON A.IPCD_ID = LEFT(B.IPCD_ID,5)
WHERE A.IPCD_DESC = ''
Thanks
Deana
I have a table that I need to update blank description fields with an existing description. The existing description is based on a 5 character code. (example 12345 is the code) I need to update any other codes with the same initial 5 characters with that description. So 12345AB, 12345CD, 12345EF should all have the same description as 12345 for any that are blank. I wrote a select query to review the results, however it is not working properly because I keep getting zero results. Can someone tell me if this is written incorrectly for what I am looking to do?
SELECT A.IPCD_ID, A.IPCD_DESC, B.IPCD_DESC FROM CMC_IPCD_PROC_CD A
INNER JOIN CMC_IPCD_PROC_CD B ON A.IPCD_ID = LEFT(B.IPCD_ID,5)
WHERE A.IPCD_DESC = ''
Thanks
Deana