I have a unique issue and I'm not certain if its SQL causing the issue or my query.
I have two tables that hold product information. One is the overall product data, the other is stock levels based on product metadata. For example, products may have a size, color, and style. Based on the size, color, and style, we can set up what items are in stock. My issue is that products where the size, color, or style are empty do not appear when I join on these tables. Sequel::Model.db[:inventory].left_join(:stock,[[:stock__item_id => : inventory__item_id], [:stock__style => :inventory__style], [:stock__color => :inventory__color], [:stock__size => :inventory__size]]) This results in the SQL SELECT * FROM `inventory` LEFT JOIN `stock` ON ((`stock`.`item_id` = `inventory`.`item_id`) AND (`stock`.`style` = `inventory`.`style`) AND (`stock`.`size` = `inventory`.`size`) AND (`stock`.`color` = `inventory`.`color`)) This is great! The problem is that we have some items where Style is NULL or Color is NULL. Is there a way to include rows where null = null ? Thanks! -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
