Avatar of HKFuey
HKFuey
Flag for United Kingdom of Great Britain and Northern Ireland asked on

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

Avatar of undefined
Last Comment
HKFuey

8/22/2022 - Mon
H R

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

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

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