Skip to contents

Reads an SQL file line by line, replaces tabs with spaces, and converts single-line SQL comments (--) into C-style comments (/* ... */).

Usage

get_sql(filepath)

Arguments

filepath

A string representing the path to the SQL file.

Value

A single string containing the processed SQL code.

Examples

# Example usage:
# sql_code <- get_sql("path/to/sql_file.sql")