October 2014

Ignore accents in Oracle queries

–Set the comparison to LINGUISTIC alter session set NLS_COMP=LINGUISTIC; –Set the SORT to GENERIC_M_AI (AI means Accent insensitive, and case insensitive) alter session set NLS_SORT=GENERIC_M_AI; –Create a table and load some data CREATE TABLE test_query (my_text VARCHAR2(100)) / insert into test_query (my_text) VALUES (‘test-‘); insert into test_query (my_text) VALUES (‘TEST-‘); insert into test_query (my_text) VALUES […]

Read more →

Dynamically set the name of the spool file

In SQPlus you can dynamically set the spool file: COLUMN script_name new_val script_name SELECT ‘&file_path’ AS script_name FROM dual; SPOOL &script_name SELECT * FROM dual; SPOOL OFF

Read more →