Skip to content

Oracle scripts not working properly #1

@rmrn65

Description

@rmrn65

Escaping of apostrophes on oracle scripts are done wrong (you are using \' instead of '') see reference :
https://stackoverflow.com/questions/5139770/escape-character-in-sql-server

You can resolve this by using the following python script:


import os
directory = 'oracle'


def function(f):
    with open(f, 'r') as file:
        data = file.read()
    

        data = data.replace("\\'","''" )
        data = data.replace("\\\"", "\"\"")
    

    with open(f, 'w') as file:
    

        file.write(data)

for filename in os.listdir(directory):
    f = os.path.join(directory, filename)
    if os.path.isfile(f):
        function(f)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions