So, I have this script below (single dashed line below). I want it to prompt for the file and it does. But rather than changes all the words to Uppercase, I only want to change those in the file such as: words = ['select', 'from', 'where']
So, I want all wording in the program (see all the wording below the dashed line), but want just change those words in the file to uppercase.
However, not sure where or how what I need to do to change the coding below. Any help would be great.
Thanks,
Vince
-----------------------------------------------------------------------------------------------------------------------------------------------------
============================================================================
So, I want all wording in the program (see all the wording below the dashed line), but want just change those words in the file to uppercase.
However, not sure where or how what I need to do to change the coding below. Any help would be great.
Thanks,
Vince
-----------------------------------------------------------------------------------------------------------------------------------------------------
words = ['select', 'from', 'where'] totContent = "" print(end="Enter the Name of File: ") fileName = str(input()) try: fileHandle = open(fileName, "r") for content in fileHandle: newContent = content.upper() totContent = totContent + newContent fileHandle.close() try: fileHandle = open(fileName, "w") fileHandle.write(totContent) print("\nAll Words in \"" + fileName + "\" Capitalized Successfully!") print(end="\nWant to see the Content of File (y/n): ") ch = input() if ch=='y': fileHandle = open(fileName, "r") for content in fileHandle: print(end=content) else: print("Exiting...") fileHandle.close() print() except IOError: print("Error Occurred!") except IOError: print("\nThe \"" + fileName + "\" is not Exist!") print("Exiting...")
============================================================================
Select distinct p."First", p."Last", trim(p."First") || '_' || trim(p."Last") || '_' || to_char(p."Birth", 'yyyyymmdd') LinkingField, null SSN, null RegistrationCode, p."Address1", p."Address2", null Address3, "City", "Province" State, substr("Postal", 1, 5) ZipCode, Case when v.FirstDate is null or v.FirstDate >= QStart then 'Y' Else 'N' End NewPatient, -- Case when pol."PlanType" in (0, 1, 2, 3, 4, 5, 14, 16, 18, 22, 25, 26) then 'N' else 'Y' End PrivateInsurance, Case when pol."PolicyId" is null then 'N' Else 'Y' End Insurance, --per Erin 11/16/21 - any type of insurance pol.Company from appoint a left outer join (select "Patient", min(t."TreatmentDate") FirstDate from trx t join njds_isvisit v on t."Type" = v."Type" and t."Id" = v."Id" and t."Treatment" = v."Treatment" where v.IsVisit = 1 and exists (select null from trx t2 join njds_isvisit v2 on t2."Type" = v2."Type" and t2."Id" = v2."Id" and t2."Treatment" = v2."Treatment" where v2.Isvisit = 1 and t2."TreatmentDate" between QStart and QEnd -- >= '01 Sep 2021' and t."Patient" = t2."Patient") Group by "Patient") v on a."Patient" = v."Patient" left outer join (select "Family" Patient, pol."PlanType", i."Name" Company, pol."PolicyId" from policy pol join insuranc i on pol."Company" = i."Company" where pol."Deleted" = 0 and pol."Company" not in (select null from NJDS_NOT_INSURANCE ni where pol."Company" = ni.Company) and (pol."EndDate" is null or pol."EndDate" >= QStart)) pol on a."Patient" = pol.Patient join patient p on a."Patient" = p."Patient" where a."Date" between QStart and QEnd
Larz60+ write Jun-22-2022, 10:34 AM:
(As suggested by deanhystad):
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
I have fixed this for you this time. Please use BBCode tags on future posts.
(As suggested by deanhystad):
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
I have fixed this for you this time. Please use BBCode tags on future posts.