I am working with a sample in a Oracle ODBC.
con <- DBI::dbConnect(
drv = odbc::odbc(),
dsn = "oracle_dsn"
)
my_table <- tbl(con, in_schema("my_schema", "my_table"))
n <- 100
my_table %>% slice_sample(n = n) %>% show_query()
Showing this query
SELECT
"column 1",
"column 2",
....
FROM (
SELECT
"column 1",
"column 2",
....,
ROW_NUMBER() OVER (ORDER BY **RANDOM()**) AS "q02"
FROM ("my_schema"."my_table")
) "q01"
WHERE ("q02" <= 100)
But ORACLE does not recognize RANDOM without the package prefix dbms_random (that statement works replacing RANDOM() by dbms_random.RANDOM()).
I do not have privileges to make that synonym in my Oracle database, but I thought should do not assume a synonym.
Could you add the prefix or show me how to? Thanks.
I am working with a sample in a Oracle ODBC.
Showing this query
But ORACLE does not recognize RANDOM without the package prefix dbms_random (that statement works replacing RANDOM() by dbms_random.RANDOM()).
I do not have privileges to make that synonym in my Oracle database, but I thought should do not assume a synonym.
Could you add the prefix or show me how to? Thanks.