About
Pricing
Community
Teams
Start Free Trial
Log in
HKFuey
asked on
3/19/2018
SQL Omit hashes
I have a SQL view and want to omit any records with hashes in them.
E.g. ###1234156
Anyone know the syntax?
SQL
3
1
Last Comment
HKFuey
8/22/2022 - Mon
H R
3/19/2018
This works in Oracle 12c:
CREATE TABLE "TESTTABLE"
( "COL1" VARCHAR2(20 BYTE) ) ;
Insert into TESTTABLE (COL1) values ('###1234156');
Insert into TESTTABLE (COL1) values ('1234');
Commit;
SELECT col1
FROM testtable
WHERE INSTR(col1,'#',1)=0;
Drop table "TESTTABLE";
ASKER CERTIFIED SOLUTION
ste5an
3/19/2018
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
HKFuey
3/19/2018
ASKER
That's it, thanks!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
CREATE TABLE "TESTTABLE"
( "COL1" VARCHAR2(20 BYTE) ) ;
Insert into TESTTABLE (COL1) values ('###1234156');
Insert into TESTTABLE (COL1) values ('1234');
Commit;
SELECT col1
FROM testtable
WHERE INSTR(col1,'#',1)=0;
Drop table "TESTTABLE";