# Unquoting allows to understand the structure of a
# possibly complex quoted identifier
dbUnquoteIdentifier(
ANSI(),
SQL(c('"Catalog"."Schema"."Table"', '"Schema"."Table"', '"UnqualifiedTable"'))
)
# The returned object is always a list,
# also for Id objects
dbUnquoteIdentifier(ANSI(), Id("Catalog", "Schema", "Table"))
# Quoting and unquoting are inverses
dbQuoteIdentifier(
ANSI(),
dbUnquoteIdentifier(ANSI(), SQL("UnqualifiedTable"))[[1]]
)
dbQuoteIdentifier(
ANSI(),
dbUnquoteIdentifier(ANSI(), Id("Schema", "Table"))[[1]]
)
Run the code above in your browser using DataLab