Last active
June 24, 2019 09:55
-
-
Save reciosonny/6d3041228a98e50c4b690e0ff4673d27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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