Jump to content

Cross Referencing one table with other and updating via certain rules


Recommended Posts

I have been doing this by using a php file for years on several different tables and know this must be one of the clunkiest ways to do this and instead of researching for days to try to find the answer I thought I would just ask. I figure this is a super easy thing to do once you know how.

 

Old_Table ID,name,category,status,details

 

New_Table ID,name,category,status,details,date_entered,date_updated

 

I want to update the Category of New_Table with Old_Table category IF New_Table Category = ""

 

Another example would be:

 

Master_Table ID,name,address,category,status,details,date_entered,date_updated,end_date

 

Sub_Table SID,name,address,details,date_entered,date_updated,end_date

 

I want to add to Master_Table with Sub_Table data only if the data is NEW OR status on Master (of identical address or at least 95% close) isn't set to "Never" then I want to update end_date of now.

 

Is there a way to do these 2 queries as an actualy query? Or is my clunky way of making a php file to cross reference about the best way to check?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.