How fetch & insert NULL values in mysql? -
my query-:
select sfo.`customer_email`,cg. customer_group_code did, cg1. customer_group_code cid, cev. value cv, cev1. value cv1, cev2. value cv2, cev3. value cv3, sfo.`increment_id` `sales_flat_order` sfo, `customer_entity` ce, `customer_entity` ce1, `customer_group` cg, `customer_group` cg1, `customer_entity_varchar` cev, `customer_entity_varchar` cev1, `customer_entity_varchar` cev2, `customer_entity_varchar` cev3, order o sfo.dealer_id = ce.entity_id , ce.group_id = cg.customer_group_id , sfo.customer_id = ce1.entity_id , ce1.group_id = cg1.customer_group_id , sfo.dealer_id = cev.entity_id , cev. attribute_id = 5 , sfo.dealer_id = cev1.entity_id , cev1. attribute_id = 7 , sfo.customer_id = cev2.entity_id , cev2. attribute_id = 5 , sfo.customer_id = cev3.entity_id , cev3. attribute_id = 7 , sfo.`increment_id` = o.`increment_id` , o.order_sts = 0 o/p-:
customer_email did cid cv cv1 cv2 cv3 increment_id aa.zz@test.com 100 120 a1 z1 b1 y1 1 bb.uu@fake.com 522 123 p1 l1 k2 j3 2 null 3 so sales_flat_order table stores dealer & customer id...but there may case customer don't have dealer when order takes place, such customers, dealer_id null...in case query can't fetch anythng fails due null... shown above, suppose did=null increment_id =3, not fetch value tables.
so when sfo.customer_id(cid) / sfo.dealer_id(did) null,,i want put such condition can fetch null value & query work fine & insert othr columns?
so how can fetch & insert null values in mysql?
plz guide me...
Comments
Post a Comment