jeganmmk89's avatar

Retrive data table that should not be in another table?

I have two tables, that both contain one unique column, i want "column1" from table1 means, that column1 one value should not be in table2, my table structure is

table1:

 "Outlet ID" : "KT2017/001", 
    "Category" : "BKP", 
    "Vendor Name" : "Kishore", 
    "Vendor ID" : "VN0001", 
    "Outlet Name" : "Warhouse Stores", 
    "Outlet Address" : "00 Kennedy Plaza", 
    "Pin Code" : "600100", 
    "Outlet Contact Details" : "044 4551 8215", 
    "ASM / TSO Name" : "Mandarin", 
    "ASM / TSO Contact Details" : "62-(975)750-2218", 
    "Outlet List Shared" : "08-20-17", 
    "Date of recee proposed" : "08-23-17", 
    "Artwork Files shared by client" : "08-20-17",
  "project_id" : "New_Project_chn_1", 
    "manager_id" : "PM0001"
}


table2:
{ 
    "_id" : ObjectId("59f180dbd940bb1fb6486ff2"), 
    "outlet_id" : "KT2017/001", 
    **"project_id" : "New_Project_chn_1",** 
    "reccee_team_id" : "KPTECH001", 
    "project_manager_id" : "PM0001", 
    "vendor_id" : "VN0001", 
    "reccee_id" : "New_Project_chn_1_reccee_1", 
    "status" : "2", 
    "updated_at" : ISODate("2017-10-27T03:49:54.000+0000"), 
    "created_at" : ISODate("2017-10-26T06:29:47.000+0000")
}

0 likes
1 reply
Snapey's avatar

You mean delete rows from table 1 where outlet_id is in table 2?

Have you created any eloquent models?

Please or to participate in this conversation.