Skip to content

Instantly share code, notes, and snippets.

@reciosonny
Last active June 24, 2019 09:55
Show Gist options
  • Select an option

  • Save reciosonny/6d3041228a98e50c4b690e0ff4673d27 to your computer and use it in GitHub Desktop.

Select an option

Save reciosonny/6d3041228a98e50c4b690e0ff4673d27 to your computer and use it in GitHub Desktop.
use iframer;
update sale s set FullyPaid=1
where YEAR(s.Created) between 2012 and 2018 and s.FramerID = 'bea8ac99-04dd-48da-8db8-ba572bf8ffe2';
select * from sale s
where YEAR(s.Created) between 2012 and 2018 and s.FramerID = 'bea8ac99-04dd-48da-8db8-ba572bf8ffe2' and fullypaid=0;
use iframer;
update job as j
inner join sale s
on j.SaleID = s.id
set j.Completed = 1, j.Collected = 1
where YEAR(s.Created) between 2018 and 2019 and s.FramerID = '';
/*where s.id = '21393bfc-24b6-430b-9119-23f0a434faab';*/
select * from job j
inner join sale s
on j.SaleID = s.id
where YEAR(s.Created) between 2018 and 2019 and s.FramerID = 'bea8ac99-04dd-48da-8db8-ba572bf8ffe2';
/*where s.id = '21393bfc-24b6-430b-9119-23f0a434faab';*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment