The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.
Thanks for the question, Peter.
Asked: August 22, 2017 - 1:50 pm UTC
Last updated: August 22, 2017 - 2:01 pm UTC
Version: 12c
Viewed 1000+ times
where char_col like :var || '%'
create table t ( x char(10) ); insert into t values ('test'); insert into t values ('testtest'); var v varchar2(10); exec :v := 'test'; select * from t where x = :v; no rows selected select * from t where x like :v || '%'; X ---------- test testtest select * from t where x = cast(:v as char(10)); X ---------- test
The Oracle documentation contains a complete SQL reference.