Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
3. All those in the 123signup list who are listed as EXPIRED but are listed in the CFAI list>>> Upgrade their status in 123signup to REGULAR exp 07-2012
SELECT
onetwothree.`name`,
cfai.first_name,
cfai.last_name,
onetwothree.`email`, onetwothree.`exp_date`, onetwothree.`days_due`
FROM from_123 onetwothree
INNER JOIN from_cfai cfai ON cfai.email = onetwothree.email
WHERE
onetwothree.days_due > 0
/* or, this could also work */
SELECT
onetwothree.`name`,
cfai.first_name,
cfai.last_name,
onetwothree.`email`, onetwothree.`exp_date`, onetwothree.`days_due`
FROM from_123 onetwothree
INNER JOIN from_cfai cfai ON cfai.email = onetwothree.email
WHERE
onetwothree.exp_date < "7/1/2012"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment