sql - Yes/No Calculation Based Off Of Other Tables Record -


i having issue calculating column in 1 table based off of tables records value. here layout:

tblcontainers:

container  isrented 00-0033    yes   00-0044    no 

tblrentals:

customer   isrenting   container brian      yes         00-0044 jake       no          00-0033 

so tblcontainers contains of containers, tblrentals contains of rental history company. can see containers referenced in both tables, renting. if in tblrentals, container listed has yes in isrenting column, in tblcontainers, isrented switched yes. in example above, in tblcontainers, isrented container 00-0033 changed no, , isrented 00-0044 changed yes.

i have found others this, however, they're based on sum's , pretty new bare me. reference others below see if guys me out.

thanks help!

references:

calculate field's value based on multiple records in table in access db

i need calculate values record in database based off of other values in other records

this last 1 similar on same table, it's not crossing tables.
access tables , calculations

if i'm understanding correctly, want use update statement join:

update tblcontainers c    inner join tblrentals r on c.container = r.container  set c.isrented = r.isrented 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -