Hello all. I am hoping someone can help me with this one. I tried [EMAIL PROTECTED] but no one was able to assist.

I currently have a DB table that I imported from a spreadsheet called Products. What I am doing it trying to normalize it a bit as it is a PIA to work with. I created a table called Colors with the following fields:

Color_ID        int PK
Hex_Code   varchar
Color_Code varchar

And I have the Products table that has the same fields. I did an import of the Hex_Code and Color_Code into the Colors table. There are 1312 records in the colors table. The hex_code contains duplicates as does  the Color_Code field which has the color names. There are repeated values as well as the color_Code and the Hex_Code combinations are unique, but individually they are repeated. For instance, there are 7 instances of Ash, each with a different hex code. There are two instances of Ash Grey with different color codes, and so on.

The same values exist in the Products table (of course, there are 16K products in the database). The reason for this is that you can have the same style with the same colors, and they have different sizes. So what I am trying to do is to update the Products table with the color_ID's from the Color table where the color_Codes AND the Hex_Codes match. I was trying to use a sub query to do this but I am not having any luck at all. If anyone has anything to offer on this I would appreciate it.

Thanks,

Bruce
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to