Created
June 13, 2018 14:13
-
-
Save sancarn/2bd5ad4136ab293c8168f410f3677756 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
| Alter Table S104 (Add CAB Logical, KST Logical, PLT Logical) | |
| select * from S104 where Adoption_Date <> "" into qNoBlank | |
| select * from qNoBlank where Adoption_Date < CurDate() into qCAB | |
| select * from qNoBlank where Adoption_Date >= CurDate() into qKST1 | |
| select * from S104 where Adoption_Date = "" into qBlank | |
| select * from qBlank where Date_Confirmation < CurDate() or dwellings(DWF_Total_m3_per_sec) < 50 into qKST2 | |
| select * from qBlank where Date_Confirmation > CurDate() and dwellings(DWF_Total_m3_per_sec) >= 50 into qPLT | |
| update S104 set CAB = 0, KST = 0, PLT = 0 | |
| update qCAB set CAB = 1, KST = 1, PLT = 1 | |
| update qKST1 set KST = 1, PLT = 1 | |
| update qKST2 set KST = 1, PLT = 1 | |
| update qPLT set PLT = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment