Skip to content

Instantly share code, notes, and snippets.

@wenbert
Created December 2, 2011 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wenbert/1422862 to your computer and use it in GitHub Desktop.
Save wenbert/1422862 to your computer and use it in GitHub Desktop.
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