
Hey folks,
I came a cross this image in a study i was doing on application development. Thought i would share, gave me a chuckle.
Here is a simple sample that updates fields of one table with values from two other tables:
UPDATE tblOne SET tblOne.clientName=tblTwo.firstName+' '+tblTwo.lastName,
tblOne.clientAddress=tblThree.streetAddress+' '+tblThree.city+', '+tblThree.prov+' '+tblThree.postal
FROM tblOne
INNER JOIN tblTwo ON tblOne.clientID=tblTwo.id
INNER JOIN tblThree ON tblTwo.id=tblThree.userID
WHERE tblOne.clientID=1
Easy Peasy, and it saved me a lot of programming code in cfml to transfer information from one table to an existing record of an other table.